i have crated one catalog price rule as below:
Websites : Main Website
Customer Groups : Wholesale, Destributer 1, Destributer 2
From : 06/18/2012
Priority : 0
Conditions : Attribute set is not custom
Actions : Apply as percentage of original
Discount Amount : 13.043500
Discard subsequent rules : Yes
All this conditions are fulfilled, still sometimes i don’t get applied rule price(special price) sometimes.
when i didn’t get that special price, i didn’t get customer group id from followin file path : MagentoCatalogRuleModelResourceModelRule.php
public function getRulePrices(DateTimeInterface $date, $websiteId, $customerGroupId, $productIds)
{
$connection = $this->getConnection();
$select = $connection->select()
->from($this->getTable('catalogrule_product_price'), ['product_id', 'rule_price'])
->where('rule_date = ?', $date->format('Y-m-d'))
->where('website_id = ?', $websiteId)
->where('customer_group_id = ?', **$customerGroupId**)
->where('product_id IN(?)', $productIds, Zend_Db::INT_TYPE);
return $connection->fetchPairs($select);
}