Jump to content
Optimus_Sam

(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)

Share this post


Link to post
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');
}

Share this post


Link to post
Share on other sites

Hi Vekia,

 

Thank you for the swift response. i did both suggestions. But i still can't seem to see any change...

 

www. verwarmingsshop.be

 

what did i do wrong here? :(

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

it is really weird that this separate solution works for new products module

anyway, glad to hear that it works for you now :)

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Hi, change the "Always Show block" - even when there aren't any products to "NO" fixed my problem also. I also cleared the smarty cache and Forced compilation.

 

Thank you

Share this post


Link to post
Share on other sites

Hello, i have same problem,
new product not showing on homepage,
i was try all suggest from this post but not work   :( 

help me please :mellow: 

Share this post


Link to post
Share on other sites

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 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More