Clearing product price cache

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 года назад
musoviich wrote:
try Settings > Catalog Settings > disable "Cache product prices"

tried and it chaning price on homepage & catalogs, but old price is on product page

After changing that setting you probably need to restart the site.
3 года назад
New York wrote:
try Settings > Catalog Settings > disable "Cache product prices"

tried and it chaning price on homepage & catalogs, but old price is on product page
After changing that setting you probably need to restart the site.


Thanks for advice, i tried it and same thing, productbox(viewvox) price is changing but price on product page and cart are not changing, they still take price from cache.

Lets make an example
1. Disable cache price
2. Create a product with 50$ price
- on productbox and product page is price 50$
3. Change price with SQL Studio
UPDATE [genelec_nop].[dbo].[Product] SET [price]=60 WHERE [sku]=41942

4. Refresh page
- catalog price change from 50$ to 60$ bit on product page is still 50$
5. When i go to buy product from catalog or from product page, in cart is still 50$ price.
3 года назад
I found this routine ClearCache(Product entity)
in nopCommerce_4.30\Libraries\Nop.Services\Catalog\Caching\ProductCacheEventConsumer.cs
Maybe that will do it ?
3 года назад
Yidna wrote:
I found this routine ClearCache(Product entity)
in nopCommerce_4.30\Libraries\Nop.Services\Catalog\Caching\ProductCacheEventConsumer.cs
Maybe that will do it ?


af1racing wrote:

af1racing gave me the same advice but same thing is happening again.
2 года назад
go to \Libraries\Nop.Services\Catalog\ProductService.cs
find GetProductById methods na dreplace with blow code:

  public virtual Product GetProductById(int productId)
        {
            if (productId == 0)
                return null;
            if (_catalogSettings.CacheProductPrices)
                return _productRepository.ToCachedGetById(productId);
            else
                return _productRepository.GetById(productId);
        }
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.