How to truncate delivery address
PrestaShop how to hide the product price
PrestaShop Hide Add to cart Button
PrestaShop 1.7 : Adding a js script in a CMS page
By default you can not add a js code in a description of a CMS page you but can add only HTML code. So if you have a custom code that HTML and js code you can easily … Read More
PrestaShop desable product combinations when out of stock
If you want desable a combination when the quantity is equal to zero you can use the following code. Open the file : templates/catalog/_partials/product-variants.tpl Try implement the same method inside each foreach loop you want. {foreach from=$group.attributes_quantity key=nka_id item=comb} {if… Read More
Show number of products next to each category in Category tree menu for 1.7
If you wish to show the number of products of each category in the category tree menu you can add this function in the module ps_categorytree. Go to modules/ps_categorytree/ps_categorytree.php and place this code in the end of the class .… Read More
Programmatically change order status to accepted
If you wish to change an Order Status to ” Payment Accepted ” you can use this code: $id_order=Tools::getValue(‘id_order’); $order=new Order($id_order); /* here we validate the order*/ $history = new OrderHistory(); $history->id_order = (int)$order->id; $history->changeIdOrderState(2, (int)($order->id)); //order status=2… Read More
Show product tags in product details page
You are under prestashop 1.7.x and you are looking to display the tags in the “Options” tab on your product page. Here is the code you need: {assign var=tags value=Tag::getProductTags($product->id)} {assign var=id_lang value=Context::getContext()->language->id} {assign var=product_tags value=$tags[$id_lang] } <ul> {foreach… Read More