Jump to content

Getting wrong images on module


Recommended Posts

Hi,

I'm developping a module which will show the title and image on configuration page.

I'm getting the wrong image... here is my code to get the image given a productID

                    'legend' => array(
                        'title' => $product['name'] . '    ===>    ' . $this->context->link->getImageLink($product['link_rewrite'], $product['id_product'], 'home_default'),
                        'image' => $this->context->link->getImageLink($product['link_rewrite'], $product['id_product'], 'home_default')
                    ),

but I'm getting other products image....

See images... "Brown bear vector graphics" which is product ID = 13, I get the URL as http://prestashop-test.com/13-home_default/brown-bear-vector-graphics.jpg but I getting the image of "Hummingbird cushion" which is product ID = 11

 

how can I solve that issue?

 

Thanks

image1.thumb.png.3f4f07087e0d6c8b26dd98c6718d19ed.pngimage2.thumb.png.f294d1c2b49b8780ff3d5472dcf61a9a.png

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...