本文整理汇总了PHP中producthelper::getProductFinderDatepickerValue方法的典型用法代码示例。如果您正苦于以下问题:PHP producthelper::getProductFinderDatepickerValue方法的具体用法?PHP producthelper::getProductFinderDatepickerValue怎么用?PHP producthelper::getProductFinderDatepickerValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类producthelper
的用法示例。
在下文中一共展示了producthelper::getProductFinderDatepickerValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onRSProductSearch
//.........这里部分代码省略.........
} else {
$data_add = str_replace("{if product_userfield}", "", $data_add);
$data_add = str_replace("{product_userfield end if}", "", $data_add);
}
} elseif (AJAX_CART_BOX) {
$ajax_detail_template_desc = "";
$ajax_detail_template = $producthelper->getAjaxDetailboxTemplate($this->search[$i]);
if (count($ajax_detail_template) > 0) {
$ajax_detail_template_desc = $ajax_detail_template->template_desc;
}
$returnArr = $producthelper->getProductUserfieldFromTemplate($ajax_detail_template_desc);
$template_userfield = $returnArr[0];
$userfieldArr = $returnArr[1];
if ($template_userfield != "") {
$ufield = "";
for ($ui = 0; $ui < count($userfieldArr); $ui++) {
$product_userfileds = $extraField->list_all_user_fields($userfieldArr[$ui], 12, '', '', 0, $this->search[$i]->product_id);
$ufield .= $product_userfileds[1];
if ($product_userfileds[1] != "") {
$count_no_user_field++;
}
$template_userfield = str_replace('{' . $userfieldArr[$ui] . '_lbl}', $product_userfileds[0], $template_userfield);
$template_userfield = str_replace('{' . $userfieldArr[$ui] . '}', $product_userfileds[1], $template_userfield);
}
if ($ufield != "") {
$hidden_userfield = "<div style='display:none;'><form method='post' action='' id='user_fields_form_" . $this->search[$i]->product_id . "' name='user_fields_form_" . $this->search[$i]->product_id . "'>" . $template_userfield . "</form></div>";
}
}
}
$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;
示例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:
$product_price = "<div class='product_price'>" . $producthelper->getProductFormattedPrice($quotationProducts[$i]->product_price) . "</div>";
$product_excl_price = "<div class='product_excl_price'>" . $producthelper->getProductFormattedPrice($quotationProducts[$i]->product_excl_price) . "</div>";
$product_quantity = '<div class="product_quantity">' . $quotationProducts[$i]->product_quantity . '</div>';
$product_total_price = $quotationProducts[$i]->product_quantity * $quotationProducts[$i]->product_price;
$product_total_excl_price = $quotationProducts[$i]->product_quantity * $quotationProducts[$i]->product_excl_price;
$cart_mdata = str_replace("{product_thumb_image}", $product_image, $cart_mdata);
$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_attribute}", $quotationProducts[$i]->product_attribute, $cart_mdata);
$cart_mdata = str_replace("{product_accessory}", $quotationProducts[$i]->product_accessory, $cart_mdata);
$cart_mdata = str_replace("{product_number}", $product_number, $cart_mdata);
$cart_mdata = str_replace("{product_number_lbl}", JText::_('COM_REDSHOP_PRODUCT_NUMBER_LBL'), $cart_mdata);
$cart_mdata = str_replace("{product_userfields}", $product_userfields, $cart_mdata);
$cart_mdata = str_replace("{product_wrapper}", $product_note, $cart_mdata);
// ProductFinderDatepicker Extra Field Start
$cart_mdata = $producthelper->getProductFinderDatepickerValue($cart_mdata, $quotationProducts[$i]->product_id, $fieldArray);
// ProductFinderDatepicker Extra Field End
if ($quotationDetail->quotation_status == 1) {
$cart_mdata = str_replace("{product_price}", "", $cart_mdata);
$cart_mdata = str_replace("{product_total_price}", "", $cart_mdata);
$cart_mdata = str_replace("{product_price_excl_vat}", "", $cart_mdata);
$cart_mdata = str_replace("{product_total_price_excl_vat}", "", $cart_mdata);
} else {
$cart_mdata = str_replace("{product_price}", $product_price, $cart_mdata);
$cart_mdata = str_replace("{product_total_price}", $producthelper->getProductFormattedPrice($product_total_price), $cart_mdata);
$cart_mdata = str_replace("{product_price_excl_vat}", $product_excl_price, $cart_mdata);
$cart_mdata = str_replace("{product_total_price_excl_vat}", $producthelper->getProductFormattedPrice($product_total_excl_price), $cart_mdata);
}
$cart_mdata = str_replace("{product_quantity}", $product_quantity, $cart_mdata);
}
$quotation_template = $template_start . $cart_mdata . $template_end;
示例4: 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);
//.........这里部分代码省略.........
示例5: count
// ToDo: This is wrong way to generate tmpl file. And model function to load $this->product is wrong way also. Fix it.
// ToDo: Echo a message when no records is returned by selection of empty category or wrong manufacturer in menu item params.
$product = null;
if (!empty($this->product)) {
$product = $this->product[$i];
}
if (!is_object($product)) {
break;
}
$count_no_user_field = 0;
// Counting accessory
$accessorylist = $producthelper->getProductAccessory(0, $product->product_id);
$totacc = count($accessorylist);
$data_add = $template_product;
// ProductFinderDatepicker Extra Field Start
$data_add = $producthelper->getProductFinderDatepickerValue($template_product, $product->product_id, $fieldArray);
// ProductFinderDatepicker Extra Field End
/*
* Process the prepare Product plugins
*/
$params = array();
$results = $this->dispatcher->trigger('onPrepareProduct', array(&$data_add, &$params, $product));
if (strstr($data_add, "{product_delivery_time}")) {
$product_delivery_time = $producthelper->getProductMinDeliveryTime($product->product_id);
if ($product_delivery_time != "") {
$data_add = str_replace("{delivery_time_lbl}", JText::_('COM_REDSHOP_DELIVERY_TIME'), $data_add);
$data_add = str_replace("{product_delivery_time}", $product_delivery_time, $data_add);
} else {
$data_add = str_replace("{delivery_time_lbl}", "", $data_add);
$data_add = str_replace("{product_delivery_time}", "", $data_add);
}