本文整理汇总了PHP中producthelper::replaceCompareProductsButton方法的典型用法代码示例。如果您正苦于以下问题:PHP producthelper::replaceCompareProductsButton方法的具体用法?PHP producthelper::replaceCompareProductsButton怎么用?PHP producthelper::replaceCompareProductsButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类producthelper
的用法示例。
在下文中一共展示了producthelper::replaceCompareProductsButton方法的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);
unset($vars);
if (strstr($template_org, "{pagination}")) {
$pagination = new redPagination($total_product, $start, $endlimit);
$slidertag = $pagination->getPagesLinks();
if (strstr($template_org, "{product_display_limit}")) {
$slidertag = "<form action='' method='post'><input type='hidden' name='keyword' value='{$keyword}'>\n\t\t\t<input type='hidden' name='category_id' value='{$cid}'>\n\t\t\t<input type='hidden' name='manufacture_id' value='{$manufacture_id}'>\n\t\t\t<input type='hidden' name='templateid' value='{$templateid}'> " . $pagination->getListFooter() . "</form>";
$template_org = str_replace("{product_display_limit}", $slidertag, $template_org);
$template_org = str_replace("{pagination}", '', $template_org);
}
$template_org = str_replace("{pagination}", $slidertag, $template_org);
}
$template_org = str_replace("{product_display_limit}", "", $template_org);
if (strstr($template_org, "perpagelimit:")) {
$perpage = explode('{perpagelimit:', $template_org);
$perpage = explode('}', $perpage[1]);
$template_org = str_replace("{perpagelimit:" . intval($perpage[0]) . "}", "", $template_org);
}
$template_org = str_replace("{order_by}", $orderby_form, $template_org);
$template_org = str_replace("{order_by_lbl}", JText::_('COM_REDSHOP_SELECT_ORDER_BY'), $template_org);
$template_org = str_replace("{filter_by_lbl}", JText::_('COM_REDSHOP_SELECT_FILTER_BY'), $template_org);
$template_org = str_replace("{attribute_price_with_vat}", "", $template_org);
$template_org = str_replace("{attribute_price_without_vat}", "", $template_org);
$template_org = str_replace("{product_loop_start}", "", $template_org);
$template_org = str_replace("{product_loop_end}", "", $template_org);
$template_org = str_replace($template_tmp_desc, $data, $template_org);
$template_org = str_replace("{with_vat}", "", $template_org);
$template_org = str_replace("{without_vat}", "", $template_org);
$template_org = $redTemplate->parseredSHOPplugin($template_org);
$template_org = $texts->replace_texts($template_org);
eval("?>" . $template_org . "<?php ");
} else {
echo "<br><h3>" . JText::_('COM_REDSHOP_MSG_SORRY_NO_RESULT_FOUND') . "</h3>";
}
}
示例2: eval
$related_template_data = str_replace("{relproduct_price_saving_lbl}", '', $related_template_data);
$related_template_data = str_replace("{relproduct_price_saving}", '', $related_template_data);
$related_template_data = str_replace("{relproduct_price}", '', $related_template_data);
}
// End Show Price
$relmorelinkhref = JRoute::_('index.php?option=com_redshop&view=product&pid=' . $related_product[$r]->product_id . '&cid=' . $related_product[$r]->cat_in_sefurl . '&Itemid=' . $this->itemId);
$relmorelink = 'javascript:window.parent.SqueezeBox.close();window.parent.location.href="' . $relmorelinkhref . '"';
$rmore = "<a href='" . $relmorelink . "' title='" . $related_product[$r]->product_name . "'>" . JText::_('COM_REDSHOP_READ_MORE') . "</a>";
$related_template_data = str_replace("{read_more}", $rmore, $related_template_data);
$related_template_data = str_replace("{read_more_link}", $relmorelink, $related_template_data);
/*
* related product Required Attribute start
* this will parse only Required Attributes
*/
$relid = $related_product[$r]->product_id;
$attributes_set = array();
if ($related_product[$r]->attribute_set_id > 0) {
$attributes_set = $producthelper->getProductAttribute(0, $related_product[$r]->attribute_set_id);
}
$attributes = $producthelper->getProductAttribute($relid);
$attributes = array_merge($attributes, $attributes_set);
$related_template_data = $producthelper->replaceAttributeData($related_product[$r]->mainproduct_id, 0, $related_product[$r]->product_id, $attributes, $related_template_data, $attribute_template);
$related_template_data = $producthelper->replaceCartTemplate($related_product[$r]->mainproduct_id, $this->data->category_id, 0, $related_product[$r]->product_id, $related_template_data, false, 0, count($attributes), 0, 0);
$related_template_data = $producthelper->replaceCompareProductsButton($related_product[$r]->product_id, $this->data->category_id, $related_template_data, 1);
$related_template_data = $producthelper->replaceProductInStock($related_product[$r]->product_id, $related_template_data);
$related_template_data = $producthelper->replaceAttributePriceList($related_product[$r]->product_id, $related_template_data);
$related_template_data = $producthelper->getProductFinderDatepickerValue($related_template_data, $related_product[$r]->product_id, $fieldArray);
}
$reltemplate = $tempdata_div_start . $related_template_data . $tempdata_div_end;
}
echo eval("?>" . $reltemplate . "<?php ");
示例3: array
* "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) {
$attributes_set = $producthelper->getProductAttribute(0, $product->attribute_set_id, 0, 1);
}
示例4:
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);
}
if (strstr($template_desc, "{form_rating}")) {