Beispiel #1
0
 $parentId = (int) $cat_content['id'];
 $prices = $db->get_single("select min(price) as min, max(price) as max from fw_products where status='1' and parent='{$parentId}'");
 $smarty->assign('filterPrices', $prices);
 foreach ($products_list as $v => $key) {
     /*$tmp=explode("##|##",$key['properties']);
     			$products_list[$v]['properties']=array();
     			foreach ($tmp as $val => $k) {
     				if (substr_count($k,"||#||")>0) {
     					$tmp2=explode("||#||",$k);
     					$products_list[$v]['properties'][]=$tmp2;
     					if (substr_count($products_list[$v]['properties'][$val][3],"\n")>0) $products_list[$v]['properties'][$val][3]=explode("\n",$products_list[$v]['properties'][$val][3]);
     				}
     			}
     		print_r($products_list[$v]['properties']);*/
     $products_list[$v]['full_url'] = $shop->getFullUrlProduct($products_list[$v]['id'], "catalog");
     $products_list[$v]['sizes'] = $shop->getProductProperties($products_list[$v]['id'], 'size', 0, 1);
 }
 $smarty->assign("products_list", $products_list);
 if ($cat_list[$f]['full_title'] != '/') {
     $nav_titles = explode("/", $cat_list[$f]['full_title']);
     $nav_urls = explode("/", $cat_list[$f]['full_url']);
     unset($nav_titles[count($nav_titles) - 1]);
     unset($nav_urls[count($nav_urls) - 1]);
     for ($l = 0; $l < count($nav_titles); $l++) {
         $navigation[] = array("url" => $nav_urls[$l], "title" => trim($nav_titles[$l]));
     }
 }
 $smarty->assign("cat_list", $cat_list);
 switch ($cat_content['param_level']) {
     case 1:
         $template = "shop.f_catalog_1.html";
Beispiel #2
0
             $product['properties'][$val] = $tmp2;
             if ($tmp2[2] == "1") {
                 $product['properties'][$val][3] = explode("\n", $tmp2[3]);
             }
         }
     }
     $product = String::unformat_array($product);
     $product = String::unformat_array($product);
     //$product_properties = $db->get_all("select * from fw_products_properties where product_id='$id'");
     if ($product['additional_products'] != '') {
         $additional_products = $db->get_all("SELECT * FROM fw_products WHERE id IN (" . $product['additional_products'] . ")");
         $smarty->assign("additional_products", $additional_products);
     }
     $photos_list = $db->get_all("SELECT * FROM fw_products_images WHERE parent='{$id}' ORDER BY sort_order");
     $types_list = $db->get_all("SELECT * FROM fw_products_types WHERE status='1' ORDER BY name");
     $product_properties = $shop->getProductProperties($id, 'size');
     $colors = $db->get_all("select * from colors order by id desc");
     $smarty->assign('colors', $colors);
     $smarty->assign("currency_admin", $cur_admin);
     $smarty->assign('types_list', $types_list);
     $smarty->assign('product_properties', $product_properties);
     $smarty->assign('photos_list', $photos_list);
     $smarty->assign('photos_count', count($photos_list));
     $smarty->assign('photo_height', PRODUCT_PREVIEW_HEIGHT + 10);
     $smarty->assign("cat_list", $cat_list);
     $smarty->assign("product", $product);
     $smarty->assign("mode", "edit");
     $template = 'shop.a_edit_product.html';
     break;
 case $action == 'orders':
     $navigation[] = array("url" => BASE_URL . "/admin/?mod=shop&action=orders", "title" => 'Список заказов');