Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
litespeed_wiki:cache:litemage:troubleshooting:price-not-update-when-changes-mad-through-db [2018/06/15 18:03] Jackson Zhang |
litespeed_wiki:cache:litemage:troubleshooting:price-not-update-when-changes-mad-through-db [2018/11/02 19:35] (current) Lisa Clarke [How to Trigger a Price Update] Added new script options |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Price doesn't change at front end when I update product price through db directly, How to fix it? ====== | + | ====== Price Changed in Database not Showing in Store ====== |
- | 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 you update a product price directly in the databasem the price change may not display in the store's frontend. Here's how to fix that. |
- | 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. | + | Magento 1 stores have access to some special extensions or scripts that will update the database directly instead of using Magento's built-in methods. When product price is updated through a direct database change instead of the Magento Admin Panel, the cached frontend page is not updated, and the old price continues to be displayed. |
- | How to trigger price update in this situation? | + | On the other hand, when using the built-in method to update a price, Magento will send out proper events that LiteMage can capture. Under these circumstances, LiteMage can notify LiteSpeed Server to purge the related tags, resulting in an up-to-date fronted. In the direct database update case, there's no event triggered, so LiteMage will not be notified of such change and there will be no way to tell the server to purge those pages. |
- | 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. | + | ===== How to Trigger a Price Update ===== |
+ | So, how do you trigger a price update in this situation? | ||
+ | |||
+ | You might consider excluding the price from the cache, but that's not a good idea. LiteMage is not designed to exclude the price block. It would slow down every page and make it unusable. Instead, for your data feed, you can include ''magento_dir/shell/litemage_purge.php'' to trigger a purge for the related products in the existing price change script. This script can purge any particular product IDs, category_IDs, store_IDs, or raw tags. | ||
<code> | <code> | ||
magento_dir/shell/litemage_purge.php | magento_dir/shell/litemage_purge.php | ||
+ | </code><code> | ||
Usage: php litemage_purge.php -- [options] | Usage: php litemage_purge.php -- [options] | ||
- | --products <product IDs> Comma delimited product IDs | + | |
- | --cats <category_IDs> Comma delimited category IDs | + | --products <product IDs> Comma delimited list of product IDs. |
- | --stores <store_IDs> Comma delimited store IDs | + | --skus <SKU_IDs> Comma delimited list of SKU IDs. |
- | --tags <raw tags> Comma delimited raw tags. You need to understand LiteMage internals to use this. | + | --related When used with "products" and "skus" options, will purge their related products (configurable/bundled) and related categories. |
- | --all Flush all cached files in LiteSpeed Web Server.r. | + | --cats <category_IDs> Comma delimited list of category IDs. |
+ | --stores <store_IDs> Comma delimited list of store IDs. | ||
+ | --tags <raw tags> Comma delimited list of raw tags. Advanced: must understand LiteMage internals to use this option. | ||
+ | --all Flush all cached files in LiteSpeed Web Server. | ||
</code> | </code> | ||