Esempio n. 1
0
    $T->set_var('item_url', $row['ecom_item_url']);
    if ($row['ecom_item_ship_printed']) {
        $T->set_var('ship_printed_checked', 'checked');
    }
    if ($row['ecom_ship_media']) {
        $T->set_var('ship_media_checked', 'checked');
    }
    if ($row['ecom_ship_library']) {
        $T->set_var('ship_library_checked', 'checked');
    }
    $T->set_var('submit_value', $LANG_ECOM[139]);
    $T->set_var('submit_name', 'update_item');
} else {
    //$shipping = getShipping(0);
    $catagory = get_catagory(0);
    $catagory_list = get_catagory_list();
    $T->set_var('catagory', $catagory);
    $T->set_var('catagory_list', $catagory_list);
    $T->set_var('fixed_price_checked', 'checked');
    //Default is fixed price
    $T->set_var('error', $error);
    $T->set_var('site_url', $PHP_SELF);
    $editor = new FCKeditor('description_long');
    $editor->Width = '800';
    $editor->Height = '300';
    $T->set_var('editor', $editor->CreateHtml());
    $T->set_var('submit_value', $LANG_ECOM[140]);
    $T->set_var('submit_name', 'add_item');
}
$T->set_var('msg_4', $LANG_ECOM[4]);
$T->set_var('msg_10', $LANG_ECOM[10]);
Esempio n. 2
0
$T->set_var('msg_14', $LANG_ECOM[14]);
$T->set_var('msg_102', $LANG_ECOM[102]);
$T->set_var('msg_143', $LANG_ECOM[143]);
//Add item to chart
if (isset($_GET['add_id'])) {
    $add_id = COM_applyFilter($_GET['add_id']);
    require_once $_CONF['path'] . "/plugins/ecommerce/shopping_cart.class.php";
    $c = new shopping_cart($_SESSION['cart']);
    $_SESSION['cart'] = $c->add_to_cart($add_id, "1");
}
//Build the Where clause can only search by catagory and name as of now.
if ($s->get_catagory() != "" && $_GET['name_search'] != "") {
    $where_clause = "ecom_item_name LIKE '%" . $name_search . "%' AND " . get_catagory_list($s->get_catagory());
} else {
    if ($s->get_catagory() != "") {
        $where_clause = get_catagory_list($s->get_catagory());
    } else {
        if ($_GET['name_search'] != "") {
            $where_clause = "ecom_item_name LIKE '%" . $name_search . "%'";
        } else {
            $where_clause = "1=1";
        }
    }
}
//Get config options
$config_res = DB_query("SELECT * FROM {$_TABLES['ecom_config']}");
$config_row = DB_fetchArray($config_res);
//Get start item
if (isset($_GET['page'])) {
    $item_start = $page * $config_row['item_per_page'] - $config_row['item_per_page'];
} else {