Cart: Functions that are in the cart library of opencart are: $this->cart->getProducts(): This is the line which is used for getting the products that are in the cart. public function getProducts() { $product_data = array(); foreach ($this->session->data['cart'] as $key => $value) { $array = explode(':', $key); $product_id = $array[0]; $quantity = $value; $stock = TRUE; if (isset($array[1])) { $options = explode('.', $array[1]); } else { $options = array(); } $product_query = $this->db->query("SELECT *, wcd.unit AS weight_class, mcd.unit AS length_class FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "weight_class wc ON (p.weight_class_id = wc.weight_class_id) LEFT JOIN " . DB_PREFIX . "weight_class_description wcd ON (wc.weight_class_id = wcd.weight_class_id) LEFT JOIN " . DB_PREFIX . "length_c...
Comments
Post a Comment