dhobo Posted March 8, 2012 Share Posted March 8, 2012 Seems like a very simple question, but where do the cart products from? In the shopping-cart.tpl template you have the smarty variable $products available, but which class/controller is giving this to the template? I would expect CartController, but I don't see it there Link to comment Share on other sites More sharing options...
presty Posted October 24, 2012 Share Posted October 24, 2012 I have not been able to find it. Where is this $products comming from? Link to comment Share on other sites More sharing options...
neonode Posted November 6, 2013 Share Posted November 6, 2013 Hi guys, have you found a solution? Link to comment Share on other sites More sharing options...
PascalVG Posted November 7, 2013 Share Posted November 7, 2013 Try classes/Cart.php it's created/filled in public function getSummaryDetails($id_lang = null, $refresh = false) : ... $products = $this->getProducts($refresh); <--- filled here ... return array( 'delivery' => $delivery, 'delivery_state' => State::getNameById($delivery->id_state), 'invoice' => $invoice, 'invoice_state' => State::getNameById($invoice->id_state), 'formattedAddresses' => $formatted_addresses, 'products' => array_values($products), <- there it is... ready to be used in tpl file 'gift_products' => $gift_products, 'discounts' => $cart_rules, 'is_virtual_cart' => (int)$this->isVirtualCart(), 'total_discounts' => $total_discounts, 'total_discounts_tax_exc' => $total_discounts_tax_exc, 'total_wrapping' => $this->getOrderTotal(true, Cart::ONLY_WRAPPING), 'total_wrapping_tax_exc' => $this->getOrderTotal(false, Cart::ONLY_WRAPPING), 'total_shipping' => $total_shipping, 'total_shipping_tax_exc' => $total_shipping_tax_exc, 'total_products_wt' => $total_products_wt, 'total_products' => $total_products, 'total_price' => $base_total_tax_inc, 'total_tax' => $total_tax, 'total_price_without_tax' => $base_total_tax_exc, 'is_multi_address_delivery' => $this->isMultiAddressDelivery() || ((int)Tools::getValue('multi-shipping') == 1), 'free_ship' => $total_shipping ? 0 : 1, 'carrier' => new Carrier($this->id_carrier, $id_lang), ); ... Hope this helps, pascal Link to comment Share on other sites More sharing options...
neonode Posted November 7, 2013 Share Posted November 7, 2013 aaaah Amazing! Regards Michal Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now