本文整理汇总了PHP中producthelper::getSpecialProductComment方法的典型用法代码示例。如果您正苦于以下问题:PHP producthelper::getSpecialProductComment方法的具体用法?PHP producthelper::getSpecialProductComment怎么用?PHP producthelper::getSpecialProductComment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类producthelper
的用法示例。
在下文中一共展示了producthelper::getSpecialProductComment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$cart_mdata = str_replace("{category_name}", $manufacturer_products[$i]->category_name, $cart_mdata);
$cart_mdata = str_replace("{category_heading_start}", "", $cart_mdata);
$cart_mdata = str_replace("{category_heading_end}", "", $cart_mdata);
} else {
$cart_mdata = $cart_mdata1[0] . $cart_mdata2[1];
}
$cname = $manufacturer_products[$i]->category_name;
$cart_mdata = str_replace("{category_heading_start}", "", $cart_mdata);
$cart_mdata = str_replace("{category_heading_end}", "", $cart_mdata);
}
$link = JRoute::_('index.php?option=com_redshop&view=product&pid=' . $manufacturer_products[$i]->product_id);
$product_name = "<a href='" . $link . "'>" . $manufacturer_products[$i]->product_name . "</a>";
$cart_mdata = str_replace("{product_name}", $product_name, $cart_mdata);
$cart_mdata = $producthelper->getProductOnSaleComment($manufacturer_products[$i], $cart_mdata);
$cart_mdata = $producthelper->getProductNotForSaleComment($manufacturer_products[$i], $cart_mdata);
$cart_mdata = $producthelper->getSpecialProductComment($manufacturer_products[$i], $cart_mdata);
$product_id = $manufacturer_products[$i]->product_id;
$childproduct = $producthelper->getChildProduct($product_id);
if (count($childproduct) > 0) {
$isChilds = true;
$attributes = array();
} else {
$isChilds = false;
// Get attributes
$attributes_set = array();
if ($manufacturer_products[$i]->attribute_set_id > 0) {
$attributes_set = $producthelper->getProductAttribute(0, $manufacturer_products[$i]->attribute_set_id, 0, 1);
}
$attributes = $producthelper->getProductAttribute($product_id);
$attributes = array_merge($attributes, $attributes_set);
}
示例2:
$template_desc = str_replace("{publish_date}", "", $template_desc);
}
/*
* Conditional tag
* if product on discount : Yes
* {if product_on_sale} This product is on sale {product_on_sale end if} // OUTPUT : This product is on sale
* NO : // OUTPUT : Display blank
*/
$template_desc = $producthelper->getProductOnSaleComment($this->data, $template_desc);
/*
* Conditional tag
* if product on discount : Yes
* {if product_special} This is a special product {product_special end if} // OUTPUT : This is a special product
* NO : // OUTPUT : Display blank
*/
$template_desc = $producthelper->getSpecialProductComment($this->data, $template_desc);
$manuUrl = JRoute::_('index.php?option=com_redshop&view=manufacturers&layout=detail&mid=' . $this->data->manufacturer_id . '&Itemid=' . $this->itemId);
$manufacturerLink = "<a href='" . $manuUrl . "'>" . JText::_("COM_REDSHOP_VIEW_MANUFACTURER") . "</a>";
$manuUrl = JRoute::_('index.php?option=com_redshop&view=manufacturers&layout=products&mid=' . $this->data->manufacturer_id . '&Itemid=' . $this->itemId);
$manufacturerPLink = "<a href='" . $manuUrl . "'>" . JText::_("COM_REDSHOP_VIEW_ALL_MANUFACTURER_PRODUCTS") . " " . $this->data->manufacturer_name . "</a>";
$template_desc = str_replace("{manufacturer_link}", $manufacturerLink, $template_desc);
$template_desc = str_replace("{manufacturer_product_link}", $manufacturerPLink, $template_desc);
$template_desc = str_replace("{manufacturer_name}", $this->data->manufacturer_name, $template_desc);
$template_desc = str_replace("{supplier_name}", "", $template_desc);
if (strstr($template_desc, "{product_delivery_time}")) {
$product_delivery_time = $producthelper->getProductMinDeliveryTime($this->data->product_id);
if ($product_delivery_time != "") {
$template_desc = str_replace("{delivery_time_lbl}", JText::_('COM_REDSHOP_DELIVERY_TIME'), $template_desc);
$template_desc = str_replace("{product_delivery_time}", $product_delivery_time, $template_desc);
} else {
$template_desc = str_replace("{delivery_time_lbl}", "", $template_desc);