Jump to content

Cannot see price changes in Featured Products


Recommended Posts

Hi Presta people

 

Can any one guide me

 

Recently i made a offer Sales for chirstmas Price lowred for Diffrent Product ...

 

I change prices in Backoffice For products . I put discount for each product which is home page

 

After i change price . when i logged in Home page . i cannot see the prices.  i need to login backoffice > perfomance > Clear Cache  . Without clear the Cache . cannot see new Prices . . every time i need to do this . Without Clear cache . How to see price diffrence and other changes ..

i dont like to clearcache every time i update the price.

 

what is the best configuation to avoid every time clearcache

 

here my configuarion image

perfomance.png

Link to comment
Share on other sites

I don't know of a 'clean' way to stop this behavior.  You can modify modules/homefeatured/homefeatured.php

	public function hookDisplayHome($params)
	{
		if (!$this->isCached('homefeatured.tpl', $this->getCacheId('homefeatured')))
		{
			$category = new Category(Context::getContext()->shop->getCategory(), (int)Context::getContext()->language->id);
			$nb = (int)Configuration::get('HOME_FEATURED_NBR');
			$products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8));

			$this->smarty->assign(array(
				'products' => $products,
				'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
				'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
			));
		}
		return $this->display(__FILE__, 'homefeatured.tpl', $this->getCacheId('homefeatured'));
	}

// STOP CHECK FOR CACHE: 
// NOTE homefeatures WILL NO LONGER USE CACHE
	public function hookDisplayHome($params)
	{
//		if (!$this->isCached('homefeatured.tpl', $this->getCacheId('homefeatured')))
//		{
			$category = new Category(Context::getContext()->shop->getCategory(), (int)Context::getContext()->language->id);
			$nb = (int)Configuration::get('HOME_FEATURED_NBR');
			$products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8));

			$this->smarty->assign(array(
				'products' => $products,
				'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
				'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
			));
//		}
		return $this->display(__FILE__, 'homefeatured.tpl', $this->getCacheId('homefeatured'));
	}

Link to comment
Share on other sites

×
×
  • Create New...