I would like to add several images in my product, the problem is that I don’t know how to do it, because for the moment I can only add one image via url! If someone has the solution or documentation, I would be interested! Thanks ! My code : Answer
Tag: prestashop
Prestashop – Add multiple categories to a product
I’m trying to add more categories in my product but once created, the product keeps only the id_cetegory_default. My code : Result : Thanks in advance! Answer You need to call updateCategories function to add product into multiple categories. So once your product get saved; you can call this funtion. For example:
Prestashop updateCategories() inconsistent times, works almost instantly sometimes and sometimes it slows to a crawl
Has anyone had any issue with using Prestashop’s Product class updateCategories() before for updating lots of products categories at once? We’re using this to map supplier categories to our own categories and we need to change 100’s-1000’s of products categories. The problem we’re running into is that updateCategories usually slows down to a crawl when updating larger amounts of products
How to add payment fee to cart in Prestashop?
I want to add payment fee to cart with a product created for payment fees. But when i add to cart the product for fee then i use $cart->getOrderTotal(), it doesn’t show the real price with fee. It shows the order total as product price without fee. I use SpecificPrice class for this action. And i think prestashop orders page
Prestashop 1.7 module front controller 404
I am developing a Prestashop 1.7 module and I have a problem with the Front Controller Module. When I try to access the page I get a 404 error. Here are the files : modules/cbd_calculator/cbd_calculator.php modules/cbd_calculator/controller/front/display.php : modules/cbd_calculator/views/templates/front/display.tpl : I call the uri: http://localhost/modules/cbd_calculator/display or http://localhost/index.php?fc=module&module=cbd_calculator&controller=display They give me a 404 error… I am blocked with this problem, how can
HTML Template PHP get Header() – How access to its content?
I’m new with PHP and I’m trying to modify the header of a pdf created by a prestashop module. I would like to delete the logo image “spo devis”. I searched during long time and I finaly …
PrestaShop: How to refresh cart after creating specifc price
I have small problem 😉 I working with PrestaShop 1.7.6.9 (manual instaltion on shared hosting) and 1.7.7.1 (docker image from PrestaShop) I create module where price is calculated via code and saved in DB via SpecificPrice class. Saving work excellent, but I have other problem. When i go to cart product priced didn’t change. But when I wait some time
How to render Html with smarty
I’m trying to render my raw HTML with smarty. The original text contains spaces and text returns, but when displayed, HTML is shown as plain text. Also, I tried to add {$brand.description|strip_tags:’UTF-8′} as a filter for my string. But it’s only deleting my HTML. How can my smarty template render this string as pure HTML? Answer Answer is… Also, you
Prestashop Repository not found
Good morning. i have a problem using the new Symfony architecture. i created a modern controller where routing is working perfect. now i want to search products with ProductRepository. MyModule/src/…
Delegating the hook handler of a module M in a class C doesn’t work: this handler is not triggered
Consider this Prestashop 1.7 module M: class M extends Module { public function __construct() { $this->c = new NegoceClassesC($this); } } As you can see, I give its …