Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

  • 0
Theo

[Solved, temporary solution found] Please help: TB Blog Related Products Images Not Displaying

Question

Posted (edited)

Hi  

Using 30Bz 1.1.0 Naria theme:
On a Blog Post: It seems that the images for related products are not being displayed...

I see this has been asked here as well - any solution?
https://forum.thirtybees.com/topic/3505-niara-theme-glitches-discussion/?tab=comments#comment-30768

Note: this appears to be working in the Community Default theme though.

Screenshot of it not working in Naria:

blog-related-products.png

Edited by Theo

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0
Posted (edited)
11 hours ago, Theo said:

Hi

Using 30Bz 1.1.0 Naria theme:
On a Blog Post: It seems that the images for related products are not being displayed...

I see this has been asked here as well - any solution?
https://forum.thirtybees.com/topic/3505-niara-theme-glitches-discussion/?tab=comments#comment-30768

Note: this appears to be working in the Community Default theme though.

 

Here is a quick correction, but it will need to be modify in the source files too and updated on github with a proper fix.. but here you go for Niara :

Find the /modules/beesblogrelatedproducts/beesblogrelatedproducts.php

around line 164 modify the image name "home_default" to "Niara_home"

 

161:           if ($products) {
162:              foreach ($products as &$product) {
163:                   $product['link'] = $this->context->link->getProductLink($product['id_product']);
164:                   $product['image'] = $this->context->link->getImageLink($product['id_product'], $product['id_image'], 'Niara_home');
165:               }
166:           }
167:           Cache::store($key, $products);

That will work, but like I said it should be fully modified for Niara or any theme name.. it's under consideration, be patient 🙂

Thank you for the report by the way !

Edited by zen
  • Thanks 1

Share this post


Link to post
Share on other sites
  • 0
16 hours ago, zen said:

 

Here is a quick correction, but it will need to be modify in the source files too and updated on github with a proper fix.. but here you go for Niara :

Find the /modules/beesblogrelatedproducts/beesblogrelatedproducts.php

around line 164 modify the image name "home_default" to "Niara_home"

 


161:           if ($products) {
162:              foreach ($products as &$product) {
163:                   $product['link'] = $this->context->link->getProductLink($product['id_product']);
164:                   $product['image'] = $this->context->link->getImageLink($product['id_product'], $product['id_image'], 'Niara_home');
165:               }
166:           }
167:           Cache::store($key, $products);

That will work, but like I said it should be fully modified for Niara or any theme name.. it's under consideration, be patient 🙂

Thank you for the report by the way !

Hi Zen

This works, thank you. Although with the caveat that it's a temporary, Naria specific issue as you mentioned.
Hopefully it get's sorted in future release.

Thanks again.

Share this post


Link to post
Share on other sites
  • 0

yes @musicmaster it also a way to fix it by adding "home_default" as a an image type, but you'll have 2 images with the same dimensions on the server.

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, zen said:

yes @musicmaster it also a way to fix it by adding "home_default" as a an image type, but you'll have 2 images with the same dimensions on the server.

That is a risk. But with an automated replacement system you have the risk that the replacement will not have the same 250x250 format as the original for which the layout was built. It might even rectangular instead of square.

Share this post


Link to post
Share on other sites
  • 0
On 10/3/2019 at 5:24 PM, zen said:

around line 164 modify the image name "home_default" to "Niara_home"

It's better to change it to just "home". Then this module works for other themes as well.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
  • 0
On 10/5/2019 at 2:34 PM, Traumflug said:

It's better to change it to just "home". Then this module works for other themes as well.

Great, thanks - I assume the "home" fix is going to be included in future Naria / TB release?

Share this post


Link to post
Share on other sites
  • 0
On 10/4/2019 at 2:21 PM, zen said:

yes @musicmaster it also a way to fix it by adding "home_default" as a an image type, but you'll have 2 images with the same dimensions on the server.

There is another point. It is one of the core principles of Prestashop that everything still works when you delete .htaccess. And that helps greatly when solving problems.

That principle is left here. For that reason I consider it dirty programming.

Share this post


Link to post
Share on other sites
  • 0
On 10/5/2019 at 2:34 PM, Traumflug said:

It's better to change it to just "home". Then this module works for other themes as well.

That's right and the best way to fix it properly !!

 

16 minutes ago, musicmaster said:

There is another point. It is one of the core principles of Prestashop that everything still works when you delete .htaccess. And that helps greatly when solving problems.

That principle is left here. For that reason I consider it dirty programming.

I never tried Presta without .htaccess, but if you setup "home" as a an image type (after blog module modified) it will work I guess.

Share this post


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