本文整理汇总了PHP中producthelper::replaceVatinfo方法的典型用法代码示例。如果您正苦于以下问题:PHP producthelper::replaceVatinfo方法的具体用法?PHP producthelper::replaceVatinfo怎么用?PHP producthelper::replaceVatinfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类producthelper
的用法示例。
在下文中一共展示了producthelper::replaceVatinfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
}
$prddata_add = str_replace("{product_id_lbl}", JText::_('COM_REDSHOP_PRODUCT_ID_LBL'), $prddata_add);
$prddata_add = str_replace("{product_id}", $product->product_id, $prddata_add);
$prddata_add = str_replace("{product_number_lbl}", JText::_('COM_REDSHOP_PRODUCT_NUMBER_LBL'), $prddata_add);
$product_number_output = '<span id="product_number_variable' . $product->product_id . '">' . $product->product_number . '</span>';
$prddata_add = str_replace("{product_number}", $product_number_output, $prddata_add);
$product_volume_unit = '<span class="product_unit_variable">' . DEFAULT_VOLUME_UNIT . "3" . '</span>';
$strToInsert = $producthelper->redunitDecimal($product->product_volume) . " " . $product_volume_unit;
$prddata_add = str_replace("{product_size}", $strToInsert, $prddata_add);
$product_unit = '<span class="product_unit_variable">' . DEFAULT_VOLUME_UNIT . '</span>';
$strToInsert = $producthelper->redunitDecimal($product->product_length) . " " . $product_unit;
$prddata_add = str_replace("{product_length}", $strToInsert, $prddata_add);
$prddata_add = str_replace("{product_width}", $producthelper->redunitDecimal($product->product_width) . " " . $product_unit, $prddata_add);
$strToInsert = $producthelper->redunitDecimal($product->product_height) . " " . $product_unit;
$prddata_add = str_replace("{product_height}", $strToInsert, $prddata_add);
$prddata_add = $producthelper->replaceVatinfo($prddata_add);
$this->catid = $row->category_id;
$link = JRoute::_('index.php?option=com_redshop&view=product&pid=' . $product->product_id . '&cid=' . $this->catid . '&Itemid=' . $pItemid);
if (strstr($prddata_add, '{product_name}')) {
$pname = $config->maxchar($product->product_name, CATEGORY_PRODUCT_TITLE_MAX_CHARS, CATEGORY_PRODUCT_TITLE_END_SUFFIX);
$pname = "<a href='" . $link . "' title='" . $product->product_name . "'>" . $pname . "</a>";
$prddata_add = str_replace("{product_name}", $pname, $prddata_add);
}
if (strstr($prddata_add, '{read_more}')) {
$rmore = "<a href='" . $link . "' title='" . $product->product_name . "'>" . JText::_('COM_REDSHOP_READ_MORE') . "</a>";
$prddata_add = str_replace("{read_more}", $rmore, $prddata_add);
}
if (strstr($prddata_add, '{read_more_link}')) {
$prddata_add = str_replace("{read_more_link}", $link, $prddata_add);
}
if (strstr($prddata_add, '{product_s_desc}')) {
示例2: onRSProductSearch
//.........这里部分代码省略.........
// Attribute ajax chage
$data_add = str_replace("{product_rating_summary}", $final_avgreview_data, $data_add);
$data_add = $producthelper->getJcommentEditor($this->search[$i], $data_add);
$data_add = $producthelper->getExtraSectionTag($extraFieldName, $this->search[$i]->product_id, "1", $data_add, 1);
$data_add = str_replace("{product_s_desc}", $pro_s_desc, $data_add);
$data_add = str_replace("{product_desc}", $pro_desc, $data_add);
$data_add = str_replace("{product_id_lbl}", JText::_('COM_REDSHOP_PRODUCT_ID_LBL'), $data_add);
$data_add = str_replace("{product_id}", $this->search[$i]->product_id, $data_add);
$data_add = str_replace("{product_number_lbl}", JText::_('COM_REDSHOP_PRODUCT_NUMBER_LBL'), $data_add);
$data_add = str_replace("{product_number}", $product_number, $data_add);
/**
* related Product List in Lightbox
* Tag Format = {related_product_lightbox:<related_product_name>[:width][:height]}
*/
if (strstr($data_add, '{related_product_lightbox:')) {
$related_product = $producthelper->getRelatedProduct($this->search[$i]->product_id);
$rtlnone = explode("{related_product_lightbox:", $data_add);
$rtlntwo = explode("}", $rtlnone[1]);
$rtlnthree = explode(":", $rtlntwo[0]);
$rtln = $rtlnthree[0];
$rtlnfwidth = isset($rtlnthree[1]) ? $rtlnthree[1] : "900";
$rtlnwidthtag = isset($rtlnthree[1]) ? ":" . $rtlnthree[1] : "";
$rtlnfheight = isset($rtlnthree[2]) ? $rtlnthree[2] : "600";
$rtlnheighttag = isset($rtlnthree[2]) ? ":" . $rtlnthree[2] : "";
$rtlntag = "{related_product_lightbox:{$rtln}{$rtlnwidthtag}{$rtlnheighttag}}";
if (count($related_product) > 0) {
$linktortln = JUri::root() . "index.php?option=com_redshop&view=product&pid=" . $this->search[$i]->product_id . "&tmpl=component&template=" . $rtln . "&for=rtln";
$rtlna = '<a class="modal" href="' . $linktortln . '" rel="{handler:\'iframe\',size:{x:' . $rtlnfwidth . ',y:' . $rtlnfheight . '}}" >' . JText::_('COM_REDSHOP_RELATED_PRODUCT_LIST_IN_LIGHTBOX') . '</a>';
} else {
$rtlna = "";
}
$data_add = str_replace($rtlntag, $rtlna, $data_add);
}
$data_add = $producthelper->replaceVatinfo($data_add);
/************************************
* 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
************************************/
$data_add = $producthelper->getProductOnSaleComment($this->search[$i], $data_add);
$data_add = $stockroomhelper->replaceStockroomAmountDetail($data_add, $this->search[$i]->product_id);
if (strstr($data_add, "{product_thumb_image_3}")) {
$cimg_tag = '{product_thumb_image_3}';
$ch_thumb = CATEGORY_PRODUCT_THUMB_HEIGHT_3;
$cw_thumb = CATEGORY_PRODUCT_THUMB_WIDTH_3;
} elseif (strstr($data_add, "{product_thumb_image_2}")) {
$cimg_tag = '{product_thumb_image_2}';
$ch_thumb = CATEGORY_PRODUCT_THUMB_HEIGHT_2;
$cw_thumb = CATEGORY_PRODUCT_THUMB_WIDTH_2;
} elseif (strstr($data_add, "{product_thumb_image_1}")) {
$cimg_tag = '{product_thumb_image_1}';
$ch_thumb = CATEGORY_PRODUCT_THUMB_HEIGHT;
$cw_thumb = CATEGORY_PRODUCT_THUMB_WIDTH;
} else {
$cimg_tag = '{product_thumb_image}';
$ch_thumb = CATEGORY_PRODUCT_THUMB_HEIGHT;
$cw_thumb = CATEGORY_PRODUCT_THUMB_WIDTH;
}
$hidden_thumb_image = "<input type='hidden' name='prd_main_imgwidth' id='prd_main_imgwidth' value='" . $cw_thumb . "'><input type='hidden' name='prd_main_imgheight' id='prd_main_imgheight' value='" . $ch_thumb . "'>";
$thum_image = $producthelper->getProductImage($this->search[$i]->product_id, $link, $cw_thumb, $ch_thumb);
$data_add = str_replace($cimg_tag, $thum_image . $hidden_thumb_image, $data_add);
// More documents
if (strstr($data_add, "{more_documents}")) {
$media_documents = $producthelper->getAdditionMediaImage($this->search[$i]->product_id, "product", "document");
$more_doc = '';