本文整理汇总了PHP中JSFactory::getAllManufacturer方法的典型用法代码示例。如果您正苦于以下问题:PHP JSFactory::getAllManufacturer方法的具体用法?PHP JSFactory::getAllManufacturer怎么用?PHP JSFactory::getAllManufacturer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSFactory
的用法示例。
在下文中一共展示了JSFactory::getAllManufacturer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listProductUpdateData
function listProductUpdateData($products, $setUrl = 0)
{
$jshopConfig = JSFactory::getConfig();
$userShop = JSFactory::getUserShop();
$taxes = JSFactory::getAllTaxes();
if ($jshopConfig->product_list_show_manufacturer) {
$manufacturers = JSFactory::getAllManufacturer();
}
if ($jshopConfig->product_list_show_vendor) {
$vendors = JSFactory::getAllVendor();
}
if ($jshopConfig->show_delivery_time) {
$deliverytimes = JSFactory::getAllDeliveryTime();
}
$image_path = $jshopConfig->image_product_live_path;
$noimage = $jshopConfig->noimage;
JPluginHelper::importPlugin('jshoppingproducts');
$dispatcher = JDispatcher::getInstance();
foreach ($products as $key => $value) {
$dispatcher->trigger('onListProductUpdateDataProduct', array(&$products, &$key, &$value));
$use_userdiscount = 1;
if ($jshopConfig->user_discount_not_apply_prod_old_price && $products[$key]->product_old_price > 0) {
$use_userdiscount = 0;
}
$products[$key]->_original_product_price = $products[$key]->product_price;
$products[$key]->product_price_wp = $products[$key]->product_price;
$products[$key]->product_price_default = 0;
if ($jshopConfig->product_list_show_min_price) {
if ($products[$key]->min_price > 0) {
$products[$key]->product_price = $products[$key]->min_price;
}
}
$products[$key]->show_price_from = 0;
if ($jshopConfig->product_list_show_min_price && $value->different_prices) {
$products[$key]->show_price_from = 1;
}
$products[$key]->product_price = getPriceFromCurrency($products[$key]->product_price, $products[$key]->currency_id);
$products[$key]->product_old_price = getPriceFromCurrency($products[$key]->product_old_price, $products[$key]->currency_id);
$products[$key]->product_price_wp = getPriceFromCurrency($products[$key]->product_price_wp, $products[$key]->currency_id);
$products[$key]->product_price = getPriceCalcParamsTax($products[$key]->product_price, $products[$key]->tax_id);
$products[$key]->product_old_price = getPriceCalcParamsTax($products[$key]->product_old_price, $products[$key]->tax_id);
$products[$key]->product_price_wp = getPriceCalcParamsTax($products[$key]->product_price_wp, $products[$key]->tax_id);
if ($userShop->percent_discount && $use_userdiscount) {
$products[$key]->product_price_default = $products[$key]->_original_product_price;
$products[$key]->product_price_default = getPriceFromCurrency($products[$key]->product_price_default, $products[$key]->currency_id);
$products[$key]->product_price_default = getPriceCalcParamsTax($products[$key]->product_price_default, $products[$key]->tax_id);
$products[$key]->product_price = getPriceDiscount($products[$key]->product_price, $userShop->percent_discount);
$products[$key]->product_old_price = getPriceDiscount($products[$key]->product_old_price, $userShop->percent_discount);
$products[$key]->product_price_wp = getPriceDiscount($products[$key]->product_price_wp, $userShop->percent_discount);
}
if ($jshopConfig->list_products_calc_basic_price_from_product_price) {
$products[$key]->basic_price_info = getProductBasicPriceInfo($value, $products[$key]->product_price_wp);
} else {
$products[$key]->basic_price_info = getProductBasicPriceInfo($value, $products[$key]->product_price);
}
if ($value->tax_id) {
$products[$key]->tax = $taxes[$value->tax_id];
}
if ($jshopConfig->product_list_show_manufacturer && $value->product_manufacturer_id && isset($manufacturers[$value->product_manufacturer_id])) {
$products[$key]->manufacturer = $manufacturers[$value->product_manufacturer_id];
} else {
$products[$key]->manufacturer = new stdClass();
$products[$key]->manufacturer->name = '';
}
if ($jshopConfig->admin_show_product_extra_field) {
$products[$key]->extra_field = getProductExtraFieldForProduct($value);
} else {
$products[$key]->extra_field = '';
}
if ($jshopConfig->product_list_show_vendor) {
$vendordata = $vendors[$value->vendor_id];
$vendordata->products = SEFLink("index.php?option=com_jshopping&controller=vendor&task=products&vendor_id=" . $vendordata->id, 1);
$products[$key]->vendor = $vendordata;
} else {
$products[$key]->vendor = '';
}
if ($jshopConfig->hide_delivery_time_out_of_stock && $products[$key]->product_quantity <= 0) {
$products[$key]->delivery_times_id = 0;
$value->delivery_times_id = 0;
}
if ($jshopConfig->show_delivery_time && $value->delivery_times_id) {
$products[$key]->delivery_time = $deliverytimes[$value->delivery_times_id];
} else {
$products[$key]->delivery_time = '';
}
$products[$key]->_display_price = getDisplayPriceForProduct($products[$key]->product_price);
if (!$products[$key]->_display_price) {
$products[$key]->product_old_price = 0;
$products[$key]->product_price_default = 0;
$products[$key]->basic_price_info['price_show'] = 0;
$products[$key]->tax = 0;
$jshopConfig->show_plus_shipping_in_product = 0;
}
if ($jshopConfig->product_list_show_qty_stock) {
$products[$key]->qty_in_stock = getDataProductQtyInStock($products[$key]);
}
$image = getPatchProductImage($products[$key]->image, 'thumb');
$products[$key]->product_name_image = $products[$key]->image;
$products[$key]->product_thumb_image = $image;
if (!$image) {
//.........这里部分代码省略.........
示例2: getManufacturerInfo
function getManufacturerInfo()
{
$manufacturers = JSFactory::getAllManufacturer();
if ($this->product_manufacturer_id && isset($manufacturers[$this->product_manufacturer_id])) {
return $manufacturers[$this->product_manufacturer_id];
} else {
return null;
}
}