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