本文整理汇总了PHP中producthelper::makeAttributeQuotation方法的典型用法代码示例。如果您正苦于以下问题:PHP producthelper::makeAttributeQuotation方法的具体用法?PHP producthelper::makeAttributeQuotation怎么用?PHP producthelper::makeAttributeQuotation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类producthelper
的用法示例。
在下文中一共展示了producthelper::makeAttributeQuotation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendQuotationMail
public function sendQuotationMail($quotation_id, $status = 0)
{
$uri = JURI::getInstance();
$url = $uri->root();
$redconfig = new Redconfiguration();
$producthelper = new producthelper();
$extra_field = new extra_field();
$quotationHelper = new quotationHelper();
$config = JFactory::getConfig();
$mailinfo = $this->getMailtemplate(0, "quotation_mail");
$mailbcc = array();
if (count($mailinfo) > 0) {
$message = $mailinfo[0]->mail_body;
$subject = $mailinfo[0]->mail_subject;
if (trim($mailinfo[0]->mail_bcc) != "") {
$mailbcc = explode(",", $mailinfo[0]->mail_bcc);
}
} else {
return false;
}
$template_start = "";
$template_end = "";
$template_middle = "";
$cart = '';
$template_sdata = explode('{product_loop_start}', $message);
$extraField = new extraField();
$fieldArray = $extraField->getSectionFieldList(17, 0, 0);
if (count($template_sdata) > 0) {
$template_start = $template_sdata[0];
if (count($template_sdata) > 1) {
$template_edata = explode('{product_loop_end}', $template_sdata[1]);
if (count($template_edata) > 1) {
$template_end = $template_edata[1];
}
if (count($template_edata) > 0) {
$template_middle = $template_edata[0];
}
}
}
$row = $quotationHelper->getQuotationDetail($quotation_id);
if (count($row) <= 0) {
return false;
}
$rowitem = $quotationHelper->getQuotationProduct($quotation_id);
for ($i = 0; $i < count($rowitem); $i++) {
$product_id = $rowitem[$i]->product_id;
$product = $producthelper->getProductById($product_id);
$product_name = "<div class='product_name'>" . $rowitem[$i]->product_name . "</div>";
$product_total_price = "<div class='product_price'>" . $producthelper->getProductFormattedPrice($rowitem[$i]->product_price * $rowitem[$i]->product_quantity) . "</div>";
$product_price = "<div class='product_price'>" . $producthelper->getProductFormattedPrice($rowitem[$i]->product_price) . "</div>";
$product_price_excl_vat = "<div class='product_price'>" . $producthelper->getProductFormattedPrice($rowitem[$i]->product_excl_price) . "</div>";
$product_quantity = '<div class="update_cart">' . $rowitem[$i]->product_quantity . '</div>';
$product_total_price_excl_vat = "<div class='product_price'>" . $producthelper->getProductFormattedPrice($rowitem[$i]->product_excl_price * $rowitem[$i]->product_quantity) . "</div>";
$cart_mdata = $template_middle;
$wrapper_name = "";
if ($rowitem[$i]->product_wrapperid) {
$wrapper = $producthelper->getWrapper($product_id, $rowitem[$i]->product_wrapperid);
if (count($wrapper) > 0) {
$wrapper_name = $wrapper[0]->wrapper_name;
}
$wrapper_name = JText::_('COM_REDSHOP_WRAPPER') . ": " . $wrapper_name;
}
$product_image_path = '';
if ($product->product_full_image) {
if (is_file(REDSHOP_FRONT_IMAGES_RELPATH . "product/" . $product->product_full_image)) {
$product_image_path = $product->product_full_image;
} else {
if (is_file(REDSHOP_FRONT_IMAGES_RELPATH . "product/" . PRODUCT_DEFAULT_IMAGE)) {
$product_image_path = PRODUCT_DEFAULT_IMAGE;
}
}
} else {
if (is_file(REDSHOP_FRONT_IMAGES_RELPATH . "product/" . PRODUCT_DEFAULT_IMAGE)) {
$product_image_path = PRODUCT_DEFAULT_IMAGE;
}
}
if ($product_image_path) {
$thumbUrl = RedShopHelperImages::getImagePath($product_image_path, '', 'thumb', 'product', CART_THUMB_WIDTH, CART_THUMB_HEIGHT, USE_IMAGE_SIZE_SWAPPING);
$product_image = "<div class='product_image'><img src='" . $thumbUrl . "'></div>";
} else {
$product_image = "<div class='product_image'></div>";
}
$cart_mdata = str_replace("{product_name}", $product_name, $cart_mdata);
$cart_mdata = str_replace("{product_s_desc}", $product->product_s_desc, $cart_mdata);
$cart_mdata = str_replace("{product_thumb_image}", $product_image, $cart_mdata);
$product_note = "<div class='product_note'>" . $wrapper_name . "</div>";
$cart_mdata = str_replace("{product_wrapper}", $product_note, $cart_mdata);
$product_userfields = $quotationHelper->displayQuotationUserfield($rowitem[$i]->quotation_item_id, 12);
$cart_mdata = str_replace("{product_userfields}", $product_userfields, $cart_mdata);
$cart_mdata = str_replace("{product_number_lbl}", JText::_('COM_REDSHOP_PRODUCT_NUMBER'), $cart_mdata);
$cart_mdata = str_replace("{product_number}", $product->product_number, $cart_mdata);
$cart_mdata = str_replace("{product_attribute}", $producthelper->makeAttributeQuotation($rowitem[$i]->quotation_item_id, 0, $rowitem[$i]->product_id, $row->quotation_status), $cart_mdata);
$cart_mdata = str_replace("{product_accessory}", $producthelper->makeAccessoryQuotation($rowitem[$i]->quotation_item_id, $row->quotation_status), $cart_mdata);
// ProductFinderDatepicker Extra Field Start
$cart_mdata = $producthelper->getProductFinderDatepickerValue($cart_mdata, $product_id, $fieldArray);
// ProductFinderDatepicker Extra Field End
if ($row->quotation_status == 1 && !SHOW_QUOTATION_PRICE) {
$cart_mdata = str_replace("{product_price_excl_vat}", "", $cart_mdata);
$cart_mdata = str_replace("{product_price}", " ", $cart_mdata);
$cart_mdata = str_replace("{product_total_price}", " ", $cart_mdata);
//.........这里部分代码省略.........
示例2:
$actual_price = $giftcardData->giftcard_price;
$product_number = "";
$section = 13;
} else {
$product = $producthelper->getProductById($quo->product_id);
$actual_price = $product->product_price;
$product_number = "<br/>" . JText::_('COM_REDSHOP_PRODUCT_NUMBER') . ": ( " . $product->product_number . " ) ";
$section = 12;
$vat = 0;
if ($quo->product_excl_price > 0) {
$vat = $producthelper->getProductTax($quo->product_id, $quo->product_excl_price, $quotation->user_id);
}
$quo->product_price = $quo->product_excl_price + $vat;
}
$product_userfield = $quotationHelper->displayQuotationUserfield($quo->quotation_item_id, $section);
$product_attribute = "<br/>" . $producthelper->makeAttributeQuotation($quo->quotation_item_id, 0, $quo->product_id);
$product_accessory = "<br/>" . $producthelper->makeAccessoryQuotation($quo->quotation_item_id);
$wrapper_name = "";
if ($quo->product_wrapperid) {
$wrapper = $producthelper->getWrapper($quo->product_id, $quo->product_wrapperid);
if (count($wrapper) > 0) {
$wrapper_name = $wrapper[0]->wrapper_name . " (" . $producthelper->getProductFormattedPrice($quo->wrapper_price) . ")";
}
}
$product_title = $quo->product_name . $product_number . $product_attribute . $product_accessory . $product_userfield;
$product_total = $quo->product_price * $quo->product_quantity;
$product_tax = ($quo->product_price - $quo->product_excl_price) * $quo->product_quantity;
$delete_itemlink = JRoute::_('index.php?option=' . $option . '&view=quotation_detail&task=deleteitem&cid[]=' . $quotation->quotation_id . '&qitemid=' . $quo->quotation_item_id);
?>
<tr id="trPrd<?php
echo $unq;