Jump to content

(SOLVED)New Products Block not showing


Recommended Posts

Hello everyone,

 

How is it going? :)

 

I have a problem. On the right side of my webshop i have the "new products" block. But after my upgrade to the newest Prestashop version it's not showing any items at all. Only when you click on the link it gives you the pictures and everything.

 

Does somebody have a fix for this?

 

Thanks in advance,

 

Sam

 

Verwarmingsshop.be is the website.

Edited by Optimus_Sam (see edit history)
Link to comment
Share on other sites

this: http://www.prestashop.com/forums/topic/255371-solved-new-products-block-doesnt-show-any-products/

or this: 

 

open: modules/blocknewproducts/blocknewproducts.php

public function hookRightColumn($params)
{
if (!$this->isCached('blocknewproducts.tpl', $this->getCacheId()))
{
if (!Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY') && !($newProducts = Product::getNewProducts((int)$params['cookie']->id_lang, 0, (int)Configuration::get('NEW_PRODUCTS_NBR'))))
return;


$this->smarty->assign(array(
'new_products' => $newProducts,
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
));
}
return $this->display(__FILE__, 'blocknewproducts.tpl', $this->getCacheId());
}

and change it to:

 

public function hookRightColumn($params)
{


if (!Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY') && !($newProducts = Product::getNewProducts((int)$params['cookie']->id_lang, 0, (int)Configuration::get('NEW_PRODUCTS_NBR'))))
return;


$this->smarty->assign(array(
'new_products' => $newProducts,
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
));
return $this->display(__FILE__, 'blocknewproducts.tpl');
}
Link to comment
Share on other sites

Hello...same problem here. Tried all of the posted"fixes" and none work. Tried uninstalling/re-installing, setting days for new at higher number, tried the code replacement...all failed!

 

I am trying to present this site to a client and cannot do that with this bug...

 

Please help!

 

Thanks

Link to comment
Share on other sites

I found a resolution when addressing a separate issue. I noticed that when I was trying to configure the New Products Module, one of the "Must Have" modules was also being configured - ???. So I sent out a post on how to remove the "Must Have" Modules. I received a reply and tried the fix. When I did that, my New Products module worked fine again!

 

Here is the post and fix...hope it helps:

http://www.prestashop.com/forums/topic/277255-solved-remove-must-have-modules-from-list/?do=findComment&comment=1391836

Link to comment
Share on other sites

 

this: http://www.prestashop.com/forums/topic/255371-solved-new-products-block-doesnt-show-any-products/

or this: 

 

open: modules/blocknewproducts/blocknewproducts.php

public function hookRightColumn($params)
{
if (!$this->isCached('blocknewproducts.tpl', $this->getCacheId()))
{
if (!Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY') && !($newProducts = Product::getNewProducts((int)$params['cookie']->id_lang, 0, (int)Configuration::get('NEW_PRODUCTS_NBR'))))
return;


$this->smarty->assign(array(
'new_products' => $newProducts,
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
));
}
return $this->display(__FILE__, 'blocknewproducts.tpl', $this->getCacheId());
}

and change it to:

 

public function hookRightColumn($params)
{


if (!Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY') && !($newProducts = Product::getNewProducts((int)$params['cookie']->id_lang, 0, (int)Configuration::get('NEW_PRODUCTS_NBR'))))
return;


$this->smarty->assign(array(
'new_products' => $newProducts,
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
));
return $this->display(__FILE__, 'blocknewproducts.tpl');
}

 

I was able to fix this particular issue after trying your fix for a separate issue! Here it is:http://www.prestashop.com/forums/topic/277255-solved-remove-must-have-modules-from-list/?do=findComment&comment=1391836

Link to comment
Share on other sites

OMG

You guys are not gonna believe this one. It's really weird but the only thing i did (after all the presented fixed you guys posted and didn't work for me) was change the "Always Show block" - even when there aren't any products to "NO".

 

And then it suddenly worked :) So i just wanted to post this so you guys can try this, what i call "The Ridiculous Fix" :)

 

Thanks for all the support guys.

  • Like 1
Link to comment
Share on other sites

This was 'the' only problem I was having with my store, I tried everything which somehow never worked, "Ridiculous Fix" worked like a charm.. as soon as I got the email notification, I tried it, refreshed the store's homepage page and BINGO. Genius you are, who would have thought it could work that way.. :)

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...
  • 1 year later...

Hi,

 

 

I am running my website http://slmobileprice.com using Prestashop English v1.5.6.2. 

 

Actually i have a problem. On the right side of my website i have the "New Products" Block. All products is listing their. But there is one issue whenever i am uploading new product that is not showing in "New Products" Block on same day. That product will appear after one day.

 

Could any one tell me the reason? how to solve this problem.

 

Thanks,

Somit 

Link to comment
Share on other sites

  • 9 months later...

I have face trouble, products are not showing in any category that have 5 (10000) digit product ID, however product Id 9999 is showing when descending by reference. I have 1.6.0.9 version. However when click on pagination link second page all product are displayed. Need help.

Link to comment
Share on other sites

  • 1 year later...

Hello just thought i would let everyone know that i fixed the problem by disabling the "new products block" module then resetting it. I couldn't figure out where to change the "Always show block"

 

I have no clue how to even get to that option. I am using prestashop 1.7.1.1. I Also did force compilation and clear cache before that but it didn't work by itself. Check out my website for 3D Printing Supplies & Cool Gadgets. http://www.infinity-gear.com

  • Like 1
Link to comment
Share on other sites

  • 1 year later...
On 9/26/2013 at 4:18 PM, Optimus_Sam said:

OMG

You guys are not gonna believe this one. It's really weird but the only thing i did (after all the presented fixed you guys posted and didn't work for me) was change the "Always Show block" - even when there aren't any products to "NO".

 

And then it suddenly worked :) So i just wanted to post this so you guys can try this, what i call "The Ridiculous Fix" :)

 

Thanks for all the support guys.

 

 

Thanks for sharing.  Where do I change "Always Show block"  settings in PrestaShop 1.7.4.2?  Apologies for the trivial question :)

Edited by alsharif
Need to be notified of replies (see edit history)
Link to comment
Share on other sites

On 5/9/2017 at 6:39 AM, INFINITY-GEAR said:

Hello just thought i would let everyone know that i fixed the problem by disabling the "new products block" module then resetting it. I couldn't figure out where to change the "Always show block"

 

I have no clue how to even get to that option. I am using prestashop 1.7.1.1. I Also did force compilation and clear cache before that but it didn't work by itself. Check out my website for 3D Printing Supplies & Cool Gadgets. http://www.infinity-gear.com

 

Thanks a lot for sharing. You saved the day.    I followed your steps exactly as you stated by disabling then resetting thee module after which "New product block" showed up.  I also could not figure out from were to change the "Always show block".

Again, thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...