This is an old revision of the document!


Price doesn't change at front end when I update product price through db directly, How to fix it?

For user's Magento 1 store, it has some special scripts( there are various extensions/scripts that will update the database directly instead of using Magento built-in methods) to update product price through database change directly instead of Magento Admin Panel. The front end is cached and the price doesn't show the updated figure.

When using built-in method, Magento will send out proper events that LiteMage can capture, so it can notify LiteSpeed Server to purge related tags. In the db direct update case, there's no event triggered, so LiteMage will not be notified of such change and no way to tell server to purge those pages.

How to trigger price update in this situation?

The user might think how to exclude the price from the cache? No, not that way. LiteMage is not designed to exclude price block, which will slow down every page and make it not usable. Instead, for user's data feed, he can use “magento_dir/shell/litemage_purge.php” to do the purge for the related productions in his existing price change script. It can purge any particular product IDs, category_IDs, store_IDs, or raw tags.

magento_dir/shell/litemage_purge.php

Usage:  php litemage_purge.php -- [options]
--products <product IDs>    Comma delimited product IDs
--cats <category_IDs>       Comma delimited category IDs
--stores <store_IDs>        Comma delimited store IDs
--tags <raw tags>           Comma delimited raw tags. You need to understand LiteMage internals to use this.
--all                       Flush all cached files in LiteSpeed Web Server.r.
  • Admin
  • Last modified: 2018/06/15 18:03
  • by Jackson Zhang