Reputation: 219
I have a web service that is called to get products for a prestashop project. The web service is returning information about the product and also each product have a link representing the image of the product. I know that prestashop stores images into "img/p/id/picture.ext", but I want to find a solution to store that URL in the database and output everywhere in template files that picture. I want to know if there is a module for this, or how should I solve this the fastest way ? Thank you guys!
Upvotes: 0
Views: 2519
Reputation: 3106
The easiest way would be to save the product image URL in an unused product field (e.g., Reference) and modify the src
attribute of the product image img
tag in product.tpl
:
<img src="{$product->reference}">
Upvotes: 2