Jump to content

pirouzmm

Members
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • First Name
    Michel
  • Last Name
    Pirouz

pirouzmm's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. I had the same problem. Here my solution which worked for me: // Get id_order_slip based on customer ID and Order ID $orderSlipTemp = OrderSlip::getOrdersSlip((int)($order->id_customer), (int)($order->id), true); // Create objects and PDF $orderSlip = new OrderSlip((int) ($orderSlipTemp[0][id_order_slip])); $orderNew = new Order((int)$orderSlip->id_order); if (!Validate::isLoadedObject($orderNew)) die(Tools::displayError('The order cannot be found within your database.')); $orderNew->products = OrderSlip::getOrdersSlipProducts($orderSlip->id, $orderNew); $pdf = new PDF($orderSlip, PDF::TEMPLATE_ORDER_SLIP, $this->context->smarty); $file_attachement['content'] = $pdf->render(false); $file_attachement['name'] = 'ZSGT-'.sprintf('%06d', $orderSlip->id).'.pdf'; $file_attachement['mime'] = 'application/pdf';
  2. I had the same problem. Restoring the default product.tpl file did not work. The solution was to edit the ajax-cart.js as described below. Edit the ajax-cart.js file ('your theme' > js > modules > blockcart. Around line 141 where it reads for product page 'add' button... comment the if out. The result should look like this: //for product page 'add' button... // if ($('.cart_block').length) { $(document).off('click', '#add_to_cart button').on('click', '#add_to_cart button', function(e){ e.preventDefault(); ajaxCart.add($('#product_page_product_id').val(), $('#idCombination').val(), true, null, $('#quantity_wanted').val(), null); }); // } Worked for me.
×
×
  • Create New...