*/ $pages = array("cart"); /* * Controller routines */ $id_product = $_POST["id_product"]; $quantity = $_POST["quantity"]; $size_txt = $_POST["size_txt"]; $pic = $_POST["pic"]; if ($size_txt != "") { $price = $_POST["price"]; $name = $_POST["name"]; $short_description = $_POST["short_description"] . " - " . $size_txt; $res = CartCtl::Add(SessionCtl::GetSession(), $id_product, $quantity, $price, $name, $short_description, DEFAULT_LANGUAGE, "FREE_ELEMENT", 0, array(array("lang" => DEFAULT_LANGUAGE, "name" => "pic", "value" => $pic))); } else { $res = CartCtl::Add(SessionCtl::GetSession(), $id_product, $quantity, "price", "name", "short_description", DEFAULT_LANGUAGE, "PRODUCT", 0, array(array("lang" => DEFAULT_LANGUAGE, "name" => "pic", "value" => $pic))); } $tpl->assign("cart", $res); /* * Assignments to the engine */ $tpl->assign("content_pages", $pages); $tpl->assign("res", $res); /* * Output of the page */ $tpl->draw("header"); $tpl->draw("body"); $tpl->draw("menu"); $tpl->draw("head"); $tpl->draw("content");