11

We have the same problem, we use a PHP script to apply the Catalog Price Rules with the following PHP script (placed in the shell directory): <?php require_once '../Mage.php'; ini_set('display_errors', 1); #Varien_Profiler::enable(); Mage::setIsDeveloperMode(true); umask(0); Mage::app('default'); Mage::app()->setCurrentStore(Mage_Core_Model_App::...


9

I wanted to get the final_price for the product in /product/view/hero.phtml. So that I could display the stickers based on the discount. Below is what worked for me after spending some time in Magento core: $finalPriceModel = $_product->getPriceInfo()->getPrice('final_price'); It will return the instance of Magento\Catalog\Pricing\Price\FinalPrice. ...


8

Try this in you phtml file. $_priceIncludingTax = Mage::helper('tax') ->getPrice($_product, $_product->getFinalPrice());


8

Go to Backend , you can see Promotions > Catalog Price Rules > Add New Rule Than enter the information. Under Rule information , status - Active, Website : Main website select customer Groups than under Actions, you can find more information here : http://www.hostknox.com/tutorials/magento/catalog-price-rules http://merch.docs.magento.com/ce/...


7

I had the same issue, but on 1.8.1.0, so i tried to update to 1.9.0.1, still the same issue. But I found why this happens: This method: Mage_Rule_Model_Condition_Product_Abstract::prepareConditionSql() Returns a part of a sql-statement, like so: cpf.sku IN('SKU') What's interesting is that the IN contains the exact string that was entered in admin, like ...


7

Ensure that your Magento cron is setup correctly: Installing and Verifying Magento: Setting Up Cron Jobs Check if the cron-job is running look into cron_schedule-db-table use /cron.php to refresh delete /var/cache for changes in etc/config.xml cron-sections (not sure to also truncate db-table) Check if price-calculation happens after indexing. "After ...


7

Problem in this instance is on these lines $fromTime = (int) strtotime($rule->getFromDate()); $toTime = (int) strtotime($rule->getToDate()); They are not using Magento time methods to take in to consideration timing zones and in the comparison it uses following line. (Few lines after the above lines) $coreDate = $this->_factory->getModel('...


7

Connect to the backend Go to Promotions > Catalog Price Rules Click Add New Rule Rule Name: 30% off Status: Active Websites : Choose the websites you want to apply the discount for Customer Groups: Choose the customer groups you want to apply the discount for In the Actions tab, under Discount Amount type 30 select apply to the "by percentage of product ...


7

It is pretty easy to do this in Magento 2.1. You need to add a row to the catalogrule table using the module (in your own module): app/code/Vendor/Rules/Setup/InstallSchema.php namespace Vendor\Rules\Setup; use Magento\Framework\Setup\InstallSchemaInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\...


6

I spend sometime to understand this :) And The script calculate prices for the current day, the previous day and the next day. In Which, Updates include interval 3 days [in Magento 2.2.X] current day - 1 days before + 1 days after Daily update catalog price rule by cron /vendor/magento/module-catalog-rule/Cron/DailyCatalogUpdate.php Update ...


6

Magento takes the minimal value (lowest price) from the following calculated price variations Product Price Tier Price Group Price (CE1.7+) Special Price Catalog Rule Price Reference as Marius says above, slide #9 from Ivan Chepurnyi (used to be part of the Magento Core Team so should know the correct answer!)


6

First of all, I would like to point out that Shopping cart price rule different from all others. In Magento, the lowest amount of below prices will be used as the cart price whenever a product is cart. Catalog Price Rule. Group Price of product Tier Price Special Price. Example: Suppose, product prices are like Catalog Price Rule. is 200 Group Price ...


6

If you don't have many rules or many products you can try this: $website = Mage::app()->getWebsite(); $product = $this->getProduct(); $rules = Mage::getModel('catalogrule/rule')->getCollection() ->addWebsiteFilter($website) //filter rules for current site ->addIsActiveFilter(1); //filter active rules foreach ($rules as $rule) { ...


6

Had exactly same issue. If final price was ending with .50 or lower, it would drop the decimal part, and if .51 and higher, it would keep it. This started happening as we updated from magento CE 1.9.0.1 to 1.9.2.4. After spending a day digging, I found that it happens in mysql. Portion of the sql code that produces error: SELECT `cppt`.`...


6

We had to get the final price from a CRON process so our solution was first to set current store /** @var \Magento\Store\Model\StoreManager */ $storeManager->setCurrentStore(1); /** @var \Magento\Catalog\Model\Product $product */ $finalPrice = $product->getPriceInfo()->getPrice('final_price')->getAmount()->getValue(); $oldPrice = $product-&...


5

You can load every (non-EAV!) entity just by adding a second argument to load: $entity->load($value, $column); The problem is, if the column is not unique you get one of the matching entities back, and you don't know which. For your case this should be: $catalogrule->load('10% to all items', 'name');


5

Poonya,you can load the product by product id $pro=Mage::getModel('catalog/product')->load($_product->getId()); $OrgPrice=$pro->getPrice(); $finalPrice=$pro->getFinalPrice(); Hope ,it will help you.. Or Goes to app/code/core/Mage/Catalog/Product/List.php copy to app/code/local/Mage/Catalog/Product/List.php then find function ...


5

Please note that this issue has been solved in Magento EE 1.14.2.0. The fix is darn simple : In Mage_Rule_Model_Condition_Product_Abstract::prepareConditionSql() : replace $value = $this->getValue(); by $value = $this->getValueParsed();


5

you can do this by tax helper $_priceInclTax = Mage::helper('tax')->getPrice($_product, $_finalPrice, true, null, null, null, null, null, false); Here $_finalPrice=$_product->getFinalprice() Original: public function getPrice($product, $price, $includingTax = null, $shippingAddress = null, $billingAddress = null, ...


5

Here is how you can get the discount percentage. Let's say $_product is the current product instance: <?php $originalPrice = $_product->getPrice(); $finalPrice = $_product->getFinalPrice(); $percentage = 0; if ($originalPrice > $finalPrice) { $percentage = ($originalPrice - $finalPrice) * 100 / $originalPrice; } if ($percentage) { echo ...


5

source : https://stackoverflow.com/questions/25280095/magento-catalog-price-rule-disappears-at-night credits for genius "Alexei Yerofeyev". mostly i will never forget this man. Yes, this is a bug in Magento (or some logic beyond my understanding). When Magento displays products on frontend, it checks if there are catalog rules for this date. And the date ...


5

I just had the same requirement. For a quick solution copy theme file Magento_GroupedProduct\templates\product\price\final_price.phtml to your custom theme and sum prices in template with <?php /* * Show combined price instead of minimal price for grouped products. */ $products = $block->getSaleableItem()->getTypeInstance()->...


4

I hate to give a 'have you updated?' - "solution" but I cannot comment without posting it as an 'answer'. There are several problems with Catalog Price Rules in 1.8 and 1.9.0.1 - Updating to 1.9.1 solves several issues with conditions. Usually around overlapping rules. http://www.magentocommerce.com/knowledge-base/entry/ce19-later-release-notes#ce-19-1910-...


4

It seems I've stumble upon the answer. To recalculate the 'final' price that gets calculated by applying all of the catalog price rules you need to run this: Mage::getModel('catalogrule/rule')->applyAllRulesToProduct($product); One thing that gave me problems is that in messing around trying to figure this out I set a special price with the following: $...


4

I had a lot of issues with the catalog price rules reindexing before. My latest solution (that seams to work) was to change the hour when the cron for reindexing of catalog rules run. Here is why. I'm using a time zone with GMT+2. The default cron is set to run at 1.00. So I put a log to see when the cron starts and when it ends. My surprise was to see the ...


4

you don't need to edit any of the cron files, it's not even recommended. catalog rules do have some problems, but they can be solved directly or by adding an extra cronjob. the reason you're not seeing the cronjob in the db is because the job runs daily at 1:00 AM GMT and gets cleaned up after a few hours. You can use n98-magerun to list your cron jobs, ...


4

Product to catalog price rules data is stored in the table catalogrule_product In that table you will find the product_id field that relates back to your product. You should be able to build a query that checks the table for the product in question. Not 100% what your intended functionality would involve, but doing a separate query for each product to ...


4

Hook onto the event: salesrule_rule_save_after and catalogrule_rule_save_after for shopping cart and catalog rules respectively. Also, to just be on the safe side you could check in the observer you are going to create that the admin session is active before you log what you need to from the admin session. The model corresponding to the Shopping cart rules ...


4

Old question, but for others looking, this seems to be an efficient method: $product = $this->getProduct(); Mage::getModel('catalogrule/rule')->loadProductRules($product); var_dump($product->getMatchedRules()); See Mage_CatalogRule_Model_Rule for reference.


4

In production mode Magento should be reindexed by a cronjob, see the documentation for further explanation: http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html. If not in production you can force the index to be reloaded with this Magento command: php bin/magento indexer:reindex


Only top voted, non community-wiki answers of a minimum length are eligible