zen_get_product_is_always_free_shipping($lookup)
该函数通过商品的ID返回该商品是否免运费的。如果是则返回true,否则返回false;
主要查询了 products 表。在includes/database_tables.php中定义:
define(‘TABLE_PRODUCTS’, DB_PREFIX . ‘products’);
函数源代码: [color=#000000] function zen_get_product_is_always_free_shipping($lookup) {[/color]
global $db;
$sql = "select p.product_is_always_free_shipping from " . TABLE_PRODUCTS . " p where p.products_id='" . (int)$lookup . "'";
$look_up = $db->Execute($sql);
if ($look_up->fields['product_is_always_free_shipping'] == '1') {
return true;
} else {
return false;
}
}