本文整理汇总了PHP中Shop::getProductProperties方法的典型用法代码示例。如果您正苦于以下问题:PHP Shop::getProductProperties方法的具体用法?PHP Shop::getProductProperties怎么用?PHP Shop::getProductProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shop
的用法示例。
在下文中一共展示了Shop::getProductProperties方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: min
$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";
示例2: explode
$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" => 'Список заказов');