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


PHP producthelper::replaceWishlistButton方法代码示例

本文整理汇总了PHP中producthelper::replaceWishlistButton方法的典型用法代码示例。如果您正苦于以下问题:PHP producthelper::replaceWishlistButton方法的具体用法?PHP producthelper::replaceWishlistButton怎么用?PHP producthelper::replaceWishlistButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在producthelper的用法示例。


在下文中一共展示了producthelper::replaceWishlistButton方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onRSProductSearch


//.........这里部分代码省略.........
                     }
                 }
             }
             $data_add = $data_add . $hidden_userfield;
             /*************** end user fields ***************/
             // ProductFinderDatepicker Extra Field Start
             $fieldArray = $extraField->getSectionFieldList(17, 0, 0);
             $data_add = $producthelper->getProductFinderDatepickerValue($data_add, $this->search[$i]->product_id, $fieldArray);
             // ProductFinderDatepicker Extra Field End
             /*
              * manufacturer data
              */
             $manufacturer_id = $this->search[$i]->manufacturer_id;
             if ($manufacturer_id != 0) {
                 $manufacturer_data = $producthelper->getSection("manufacturer", $manufacturer_id);
                 $manufacturer_link_href = JRoute::_('index.php?option=com_redshop&view=manufacturers&layout=detail&mid=' . $manufacturer_id . '&Itemid=' . $Itemid);
                 $manufacturer_name = "";
                 if (count($manufacturer_data) > 0) {
                     $manufacturer_name = $manufacturer_data->manufacturer_name;
                 }
                 $manufacturer_link = '<a href="' . $manufacturer_link_href . '" title="' . $manufacturer_name . '">' . $manufacturer_name . '</a>';
                 if (strstr($data_add, "{manufacturer_link}")) {
                     $data_add = str_replace("{manufacturer_name}", "", $data_add);
                 } else {
                     $data_add = str_replace("{manufacturer_name}", $manufacturer_name, $data_add);
                 }
                 $data_add = str_replace("{manufacturer_link}", $manufacturer_link, $data_add);
             } else {
                 $data_add = str_replace("{manufacturer_link}", "", $data_add);
                 $data_add = str_replace("{manufacturer_name}", "", $data_add);
             }
             // End
             // Replace wishlistbutton
             $data_add = $producthelper->replaceWishlistButton($this->search[$i]->product_id, $data_add);
             // Replace compare product button
             $data_add = $producthelper->replaceCompareProductsButton($this->search[$i]->product_id, 0, $data_add);
             // Checking for child products
             $childproduct = $producthelper->getChildProduct($this->search[$i]->product_id);
             if (count($childproduct) > 0) {
                 $isChilds = true;
                 $attributes = array();
             } else {
                 $isChilds = false;
                 // Get attributes
                 $attributes_set = array();
                 if ($this->search[$i]->attribute_set_id > 0) {
                     $attributes_set = $producthelper->getProductAttribute(0, $this->search[$i]->attribute_set_id, 0, 1);
                 }
                 $attributes = $producthelper->getProductAttribute($this->search[$i]->product_id);
                 $attributes = array_merge($attributes, $attributes_set);
             }
             // Product attribute  Start
             $totalatt = count($attributes);
             // Check product for not for sale
             $data_add = $producthelper->getProductNotForSaleComment($this->search[$i], $data_add, $attributes);
             $data_add = $producthelper->replaceProductInStock($this->search[$i]->product_id, $data_add, $attributes, $attribute_template);
             $data_add = $producthelper->replaceAttributeData($this->search[$i]->product_id, 0, 0, $attributes, $data_add, $attribute_template, $isChilds);
             // Cart Template
             $data_add = $producthelper->replaceCartTemplate($this->search[$i]->product_id, 0, 0, 0, $data_add, $isChilds, $userfieldArr, $totalatt, 0, $count_no_user_field, "");
             $data .= $data_add;
         }
         $app = JFactory::getApplication();
         $router = $app->getRouter();
         $getorderby = JRequest::getVar('order_by', DEFAULT_PRODUCT_ORDERING_METHOD);
         $vars = array('option' => 'com_redshop', 'view' => 'search', 'layout' => $layout, 'keyword' => $keyword, 'manufacture_id' => $manufacture_id, 'order_by' => $getorderby, 'category_id' => $cid, 'Itemid' => $Itemid, 'limit' => $limit);
         $router->setVars($vars);
开发者ID:,项目名称:,代码行数:67,代码来源:

示例2: elseif

 $attribute_template = $producthelper->getAttributeTemplate($cart_mdata);
 $cart_mdata = $producthelper->replaceProductInStock($product_id, $cart_mdata, $attributes, $attribute_template);
 $cart_mdata = $producthelper->replaceAttributeData($product_id, 0, 0, $attributes, $cart_mdata, $attribute_template, $isChilds, 0, $totalatt);
 // Get cart tempalte
 $cart_mdata = $producthelper->replaceCartTemplate($product_id, 0, 0, 0, $cart_mdata, $isChilds);
 $cart_mdata = str_replace("{product_id_lbl}", JText::_('COM_REDSHOP_PRODUCT_ID_LBL'), $cart_mdata);
 $cart_mdata = str_replace("{product_id}", $manufacturer_products[$i]->product_id, $cart_mdata);
 $cart_mdata = str_replace("{product_number_lbl}", JText::_('COM_REDSHOP_PRODUCT_NUMBER_LBL'), $cart_mdata);
 $cart_mdata = str_replace("{product_number}", $manufacturer_products[$i]->product_number, $cart_mdata);
 $cart_mdata = str_replace("{product_s_desc}", $manufacturer_products[$i]->product_s_desc, $cart_mdata);
 $cart_mdata = str_replace("{category_name}", $manufacturer_products[$i]->category_name, $cart_mdata);
 if (strstr($cart_mdata, '{product_desc}')) {
     $p_desc = $Redconfiguration->maxchar($manufacturer_products[$i]->product_desc, CATEGORY_PRODUCT_DESC_MAX_CHARS, CATEGORY_PRODUCT_DESC_END_SUFFIX);
     $cart_mdata = str_replace("{product_desc}", $p_desc, $cart_mdata);
 }
 $cart_mdata = $producthelper->replaceWishlistButton($product_id, $cart_mdata);
 if (strstr($cart_mdata, '{product_thumb_image_2}')) {
     $tag = '{product_thumb_image_2}';
     $h_thumb = MANUFACTURER_PRODUCT_THUMB_HEIGHT_2;
     $w_thumb = MANUFACTURER_PRODUCT_THUMB_WIDTH_2;
 } elseif (strstr($cart_mdata, '{product_thumb_image_3}')) {
     $tag = '{product_thumb_image_3}';
     $h_thumb = MANUFACTURER_PRODUCT_THUMB_HEIGHT_3;
     $w_thumb = MANUFACTURER_PRODUCT_THUMB_WIDTH_3;
 } elseif (strstr($cart_mdata, '{product_thumb_image_1}')) {
     $tag = '{product_thumb_image_1}';
     $h_thumb = MANUFACTURER_PRODUCT_THUMB_HEIGHT;
     $w_thumb = MANUFACTURER_PRODUCT_THUMB_WIDTH;
 } else {
     $tag = '{product_thumb_image}';
     $h_thumb = MANUFACTURER_PRODUCT_THUMB_HEIGHT;
开发者ID:,项目名称:,代码行数:31,代码来源:

示例3: array

  * lat arg set to "1" for indetify parsing data for product tag loop in category
  * last arg will parse {producttag:NAMEOFPRODUCTTAG} nameing tags.
  * "1" is for section as product.
  */
 if (count($loadCategorytemplate) > 0) {
     $prddata_add = $producthelper->getExtraSectionTag($extraFieldName, $product->product_id, "1", $prddata_add, 1);
 }
 /************************************
  *  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
  ************************************/
 $prddata_add = $producthelper->getProductOnSaleComment($product, $prddata_add);
 // Replace wishlistbutton.
 $prddata_add = $producthelper->replaceWishlistButton($product->product_id, $prddata_add);
 // Replace compare product button.
 $prddata_add = $producthelper->replaceCompareProductsButton($product->product_id, $this->catid, $prddata_add);
 if (strstr($prddata_add, "{stockroom_detail}")) {
     $prddata_add = $stockroomhelper->replaceStockroomAmountDetail($prddata_add, $product->product_id);
 }
 // Checking for child products.
 $childproduct = $producthelper->getChildProduct($product->product_id);
 if (count($childproduct) > 0) {
     $isChilds = true;
     $attributes = array();
 } else {
     $isChilds = false;
     // Get attributes.
     $attributes_set = array();
     if ($product->attribute_set_id > 0) {
开发者ID:,项目名称:,代码行数:31,代码来源:

示例4:

// Front-back image tag end
// Product preview image.
if (strstr($template_desc, "{product_preview_img}")) {
    if (is_file(REDSHOP_FRONT_IMAGES_RELPATH . 'product/' . $this->data->product_preview_image)) {
        $previewsrcPath = RedShopHelperImages::getImagePath($this->data->product_preview_image, '', 'thumb', 'product', PRODUCT_PREVIEW_IMAGE_WIDTH, PRODUCT_PREVIEW_IMAGE_HEIGHT, USE_IMAGE_SIZE_SWAPPING);
        $previewImg = "<img src='" . $previewsrcPath . "' class='rs_previewImg' />";
        $template_desc = str_replace("{product_preview_img}", $previewImg, $template_desc);
    } else {
        $template_desc = str_replace("{product_preview_img}", "", $template_desc);
    }
}
// Cart
$template_desc = $producthelper->replaceCartTemplate($this->data->product_id, $this->data->category_id, 0, 0, $template_desc, $isChilds, $userfieldArr, $totalatt, $totalAccessory, $count_no_user_field);
$template_desc = str_replace("{ajaxwishlist_icon}", '', $template_desc);
// Replace wishlistbutton
$template_desc = $producthelper->replaceWishlistButton($this->data->product_id, $template_desc);
// Replace compare product button
$template_desc = $producthelper->replaceCompareProductsButton($this->data->product_id, $this->data->category_id, $template_desc);
// Ajax detail box template
$ajaxdetail_templatedata = $producthelper->getAjaxDetailboxTemplate($this->data);
if (count($ajaxdetail_templatedata) > 0) {
    $template_desc = str_replace("{ajaxdetail_template:" . $ajaxdetail_templatedata->template_name . "}", "", $template_desc);
}
// Checking if user logged in then only enabling review button
$reviewform = "";
if ($user->id) {
    // Write Review link with the products
    if (strstr($template_desc, "{form_rating_without_lightbox}")) {
        $reviewlink = JURI::root() . 'index.php?option=com_redshop&view=product_rating&rate=1&product_id=' . $this->data->product_id . '&category_id=' . $this->data->category_id . '&Itemid=' . $this->itemId;
        $reviewform = '<a href="' . $reviewlink . '">' . JText::_('WRITE_REVIEW') . '</a>';
        $template_desc = str_replace("{form_rating_without_lightbox}", $reviewform, $template_desc);
开发者ID:,项目名称:,代码行数:31,代码来源:


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