touchdez Posted June 18, 2013 Share Posted June 18, 2013 (edited) I uploaded a new product over the weekend and it doesn't show in the sidebar. The number of days to show as new is set to 20. What am I doing wrong? Here is the link: http://touchdezines.com/shop/ Edited June 18, 2013 by touchdez (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 18, 2013 Share Posted June 18, 2013 I uploaded a new product over the weekend and it doesn't show in the sidebar. The number of days to show as new is set to 20. What am I doing wrong? well, for the first, you should try: 1) clear cache in your prestashop store 2) turn on force compilation 3) go to preferences > products and try to increase the value of: 4) this is for debug purposes: in the blocknewsproducts.tpl file try to add {$new_products|var_dump} right before the: <!-- MODULE Block new products --> 1 Link to comment Share on other sites More sharing options...
touchdez Posted June 18, 2013 Author Share Posted June 18, 2013 (edited) Hi, vekia! The cache in the store is cleared, force compilation is turned on, changed 20 to 21, and made the change to the blocknewproducts.tpl file - nothing changed on the page. I also changed the wording "Do not allow new products at this time" to "No new products at this time" and that doesn't show, either. I just checked and no new products show on the page after clicking the "New Products" link. 3 hours later I have uninstalled and reinstalled the module, made the changes and changed the wording again, and it still doesn't show anything, except the change in wording. I have again changed the wording to "???Do not allow new products at this time.", but I still do not see a change. Another thing I see, is that I have a module blocknewproducts in my shop/modules folder and another one in my themes/ nice/modules folder. Is that how it should be? Edited June 18, 2013 by touchdez (see edit history) 1 Link to comment Share on other sites More sharing options...
shoulders Posted July 18, 2013 Share Posted July 18, 2013 i got this, what i did was increase the number of days a new product could be a new product to 10,000. It must be that i had not new products at all. Anyway here is the link. http://www.inmotionhosting.com/support/edu/prestashop-15/catalog-setup/setting-days-new 2 Link to comment Share on other sites More sharing options...
periyasamy Posted April 8, 2015 Share Posted April 8, 2015 this all code fake Link to comment Share on other sites More sharing options...
rucvanpr Posted June 27, 2015 Share Posted June 27, 2015 I also meet that problem on my [spam-filter] website, I try to fix like this, and it work for me. added BlockNewProducts::$cache_new_products = $this->getNewProducts(); to hook function. public function hookdisplayHomeTabContent($params) { if (!$this->isCached('blocknewproducts_home.tpl', $this->getCacheId('blocknewproducts-home'))) { BlockNewProducts::$cache_new_products = $this->getNewProducts(); $this->smarty->assign(array( 'new_products' => BlockNewProducts::$cache_new_products, 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), 'homeSize' => Image::getSize(ImageType::getFormatedName('home')) )); } if (BlockNewProducts::$cache_new_products === false) return false; return $this->display(__FILE__, 'blocknewproducts_home.tpl', $this->getCacheId('blocknewproducts-home')); } 2 Link to comment Share on other sites More sharing options...
chirag_0110 Posted July 21, 2016 Share Posted July 21, 2016 Hi I try with above solution but it not shoe new product block on my displayHome. This is my code // 0035 Added to display new product to displayHome page. public function hookDisplayHome($params) { if (!$this->isCached('blocknewproducts_home.tpl', $this->getCacheId('blocknewproducts-home'))) { BlockNewProducts::$cache_new_products = $this->getNewProducts(); $this->smarty->assign(array( 'new_products' => BlockNewProducts::$cache_new_products, 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), 'homeSize' => Image::getSize(ImageType::getFormatedName('home')) )); } if (BlockNewProducts::$cache_new_products === false) return false; return $this->display(__FILE__, 'blocknewproducts_home.tpl', $this->getCacheId('blocknewproducts-home')); } I found solution later. Need to turn on "Always display this block" from admin/modules/new product block/configuration. Please see image for reference. Thanks 1 Link to comment Share on other sites More sharing options...
UnionShirtSupply Posted February 10, 2017 Share Posted February 10, 2017 (edited) Hi I try with above solution but it not shoe new product block on my displayHome. This is my code // 0035 Added to display new product to displayHome page. public function hookDisplayHome($params) { if (!$this->isCached('blocknewproducts_home.tpl', $this->getCacheId('blocknewproducts-home'))) { BlockNewProducts::$cache_new_products = $this->getNewProducts(); $this->smarty->assign(array( 'new_products' => BlockNewProducts::$cache_new_products, 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), 'homeSize' => Image::getSize(ImageType::getFormatedName('home')) )); } if (BlockNewProducts::$cache_new_products === false) return false; return $this->display(__FILE__, 'blocknewproducts_home.tpl', $this->getCacheId('blocknewproducts-home')); } I found solution later. Need to turn on "Always display this block" from admin/modules/new product block/configuration. Please see image for reference. Thanks Ok, i realized i did not have force compilation on, and put cache off, Now it works for New Products. Now do i leave it set to force compilation? and cache to yes or no? Edited February 10, 2017 by UnionShirtSupply (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts