当前位置: 首页>>代码示例>>PHP>>正文


PHP producthelper::getSpecialProductComment方法代码示例

本文整理汇总了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);
 }
开发者ID:,项目名称:,代码行数:31,代码来源:

示例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);
开发者ID:,项目名称:,代码行数:31,代码来源:


注:本文中的producthelper::getSpecialProductComment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。