Search code examples
phpmagentomagento-1.9productdiscounts

discount calculation not working in Products and cart page


I have magento(v 1.9.2.4) site and I have to give 30% in every Products and its work on some Products and not work in some other Products.

enter image description here

now i'm edit any product detail(change name or price) then, it's work fine for that particular Product and show discount on that Product. enter image description here

for solution i did Index Management but its not work.

Any help or suggestion will be appreciated.


Solution

  • Firstly you may need to check with Catalog Price Rules

    Try click on Apply Rules button , also you need to have proper configuration in System->configuration->system->cron and follow this link

    you have definition of observer for catalog_product_save_commit_after event to apply all rules to product after product has been saved:

    <?xml version="1.0"?>
    
    <!-- app/code/core/Mage/CatalogRule/etc/config.xml -->
    
    <config>
    
        <!-- Other code -->
    
        <adminhtml>
    
            <!-- Other code -->
    
            <events>
    
                <!-- Other code -->
    
                <catalog_product_save_commit_after>
                    <observers>
                        <catalogrule>
                            <class>catalogrule/observer</class>
                            <method>applyAllRulesOnProduct</method>
                        </catalogrule>
                    </observers>
                </catalog_product_save_commit_after>
    
                <!-- Other code -->
    
            </events>
        </adminhtml>
    </config>