Exemplo n.º 1
0
include "inc/init.inc.php";
/* 
 * Defining the pages
 */
$pages = array("category");
/* 
 * Controller routines
 */
$id = $_GET["id"];
$seo = $_GET["seo"];
$left_limit = 0;
$right_limit = 0;
if ($seo != "") {
    $res = ShopobjectsCtl::SeoGetShopobjects($seo, DEFAULT_LANGUAGE, "price", "ASC", 0, 0, array("name", "img1", "price", "short_description"));
} else {
    $res = ShopobjectsCtl::GetShopobjects($id, DEFAULT_LANGUAGE, "price", "ASC", 0, 0, array("name", "img1", "price", "short_description"));
}
if (count($res["products"]) == 0) {
    $res = 0;
}
/* 
 * Assignments to the engine
 */
$tpl->assign("content_pages", $pages);
$tpl->assign("res", $res);
$tpl->assign("title", $res["title"]);
$tpl->assign("keywords", $res["keywords"]);
$tpl->assign("description", $res["description"]);
$tpl->assign("img", $res["attributes"]["img1"]["value"]);
/* 
 * Output of the page
Exemplo n.º 2
0
 * Init routine
 */
include "inc/init.inc.php";
/* 
 * Defining the pages
 */
$pages = array("category");
/* 
 * Controller routines
 */
$searchstring = $_GET["searchstring"];
$_GET["page"] != "" ? $page = $_GET["page"] : ($page = 1);
$constraint = array(array("OR" => array("name" => array("LIKE", $searchstring)), array("short_description" => array("LIKE", $searchstring)), array("description" => array("LIKE", $searchstring)), array("vendor" => array("LIKE", $searchstring)), array("tags" => array("LIKE", $searchstring))));
$left_limit = 0;
$right_limit = 0;
$res = ShopobjectsCtl::SearchProducts($constraint, $left_limit, $right_limit, array(), "ASC", DEFAULT_LANGUAGE, array("name", "img1", "price", "short_description"));
$res["pages"] = ceil($res["count"] / CATEGORY_PRODUCT_COUNT);
if (count($res["products"]) == 0) {
    $res = 0;
}
/* 
 * 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");
Exemplo n.º 3
0
 * Init routine
 */
include "inc/init.inc.php";
/* 
 * Defining the pages
 */
$pages = array("get_product_details");
/* 
 * Controller routines
 */
$id_product = $_GET["id_product"];
$seo = $_GET["seo"];
if ($seo != "") {
    $res = ShopobjectsCtl::SeoGetProductDetails($seo);
} else {
    $res = ShopobjectsCtl::GetProductDetails($id_product);
}
if ($res["class"] == "sizeprod") {
    $sizes = array();
    $sizes[$res["attributes"]["size"]["value"]] = $res["id"];
    foreach ($res["variations"] as $variation) {
        $sizes[$variation["attributes"]["size"]["value"]] = $variation["id"];
    }
    asort($sizes);
    $res["sizes"] = $sizes;
}
$tags = explode(",", $res["attributes"]["tags"]["value"]);
$res["attributes"]["tags"]["arr"] = $tags;
/* 
 * Assignments to the engine
 */
Exemplo n.º 4
0
 * Init routine
 */
include "inc/init.inc.php";
/* 
 * Defining the pages
 */
$pages = array("get_content_details");
/* 
 * Controller routines
 */
$id_content = $_GET["id_content"];
$seo = $_GET["seo"];
if ($seo != "") {
    $res = ShopobjectsCtl::SeoGetContentDetails($seo);
} else {
    $res = ShopobjectsCtl::GetContentDetails($id_content);
}
/* 
 * Assignments to the engine
 */
$tpl->assign("content_pages", $pages);
$tpl->assign("res", $res);
$tpl->assign("title", $res["title"]);
$tpl->assign("keywords", $res["keywords"]);
$tpl->assign("description", $res["description"]);
$tpl->assign("img", $res["attributes"]["img1"]["value"]);
/* 
 * Output of the page
 */
$tpl->draw("header");
$tpl->draw("body");