當前位置: 首頁>>代碼示例>>PHP>>正文


PHP producthelper::getAjaxDetailboxTemplate方法代碼示例

本文整理匯總了PHP中producthelper::getAjaxDetailboxTemplate方法的典型用法代碼示例。如果您正苦於以下問題:PHP producthelper::getAjaxDetailboxTemplate方法的具體用法?PHP producthelper::getAjaxDetailboxTemplate怎麽用?PHP producthelper::getAjaxDetailboxTemplate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在producthelper的用法示例。


在下文中一共展示了producthelper::getAjaxDetailboxTemplate方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: elseif

             $count_no_user_field++;
         }
         $prddata_add = str_replace('{' . $userfieldArr[$ui] . '_lbl}', $product_userfileds[0], $prddata_add);
         $prddata_add = str_replace('{' . $userfieldArr[$ui] . '}', $product_userfileds[1], $prddata_add);
     }
     $product_userfileds_form = "<form method='post' action='' id='user_fields_form_" . $product->product_id . "' name='user_fields_form_" . $product->product_id . "'>";
     if ($ufield != "") {
         $prddata_add = str_replace("{if product_userfield}", $product_userfileds_form, $prddata_add);
         $prddata_add = str_replace("{product_userfield end if}", "</form>", $prddata_add);
     } else {
         $prddata_add = str_replace("{if product_userfield}", "", $prddata_add);
         $prddata_add = str_replace("{product_userfield end if}", "", $prddata_add);
     }
 } elseif (AJAX_CART_BOX) {
     $ajax_detail_template_desc = "";
     $ajax_detail_template = $producthelper->getAjaxDetailboxTemplate($product);
     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, $product->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);
開發者ID:,項目名稱:,代碼行數:31,代碼來源:

示例2: onRSProductSearch


//.........這裏部分代碼省略.........
                         $more_doc .= "</a></div>";
                     }
                 }
                 $data_add = str_replace("{more_documents}", "<span id='additional_docs" . $this->search[$i]->product_id . "'>" . $more_doc . "</span>", $data_add);
             }
             // More documents end
             /************************************************ user fields*******************************************************/
             $hidden_userfield = "";
             $returnArr = $producthelper->getProductUserfieldFromTemplate($data_add);
             $template_userfield = $returnArr[0];
             $userfieldArr = $returnArr[1];
             $count_no_user_field = 0;
             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++;
                     }
                     $data_add = str_replace('{' . $userfieldArr[$ui] . '_lbl}', $product_userfileds[0], $data_add);
                     $data_add = str_replace('{' . $userfieldArr[$ui] . '}', $product_userfileds[1], $data_add);
                 }
                 $product_userfileds_form = "<form method='post' action='' id='user_fields_form_" . $this->search[$i]->product_id . "' name='user_fields_form_" . $this->search[$i]->product_id . "'>";
                 if ($ufield != "") {
                     $data_add = str_replace("{if product_userfield}", $product_userfileds_form, $data_add);
                     $data_add = str_replace("{product_userfield end if}", "</form>", $data_add);
                 } 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;
開發者ID:,項目名稱:,代碼行數:67,代碼來源:

示例3: producthelper

 * @subpackage  Template
 *
 * @copyright   Copyright (C) 2005 - 2013 redCOMPONENT.com. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */
defined('_JEXEC') or die;
JHtml::_('behavior.tooltip');
JHtmlBehavior::modal();
require_once JPATH_COMPONENT . '/helpers/product.php';
$producthelper = new producthelper();
require_once JPATH_COMPONENT . '/helpers/extra_field.php';
$extraField = new extraField();
$url = JURI::base();
$layout = $this->input->getString('layout', '');
$relatedprd_id = $this->input->getInt('relatedprd_id', 0);
$ajaxdetal_template = $producthelper->getAjaxDetailboxTemplate($this->data);
?>
	<script type="text/javascript" language="javascript">//var J=jQuery.noConflict();</script>
	<div style="clear:both"></div>
<?php 
if (count($ajaxdetal_template) > 0) {
    $ajaxdetal_templatedata = $ajaxdetal_template->template_desc;
    $data_add = $ajaxdetal_templatedata;
    $data_add = str_replace('{product_name}', $this->data->product_name, $data_add);
    if ($this->data->product_price != 0) {
        $data_add = str_replace('{product_price}', $this->data->product_price, $data_add);
    } else {
        $data_add = str_replace('{product_price}', " ", $data_add);
    }
    if (strstr($data_add, "{product_image}")) {
        if ($this->data->product_full_image && file_exists(REDSHOP_FRONT_IMAGES_RELPATH . "product/" . $this->data->product_full_image)) {
開發者ID:,項目名稱:,代碼行數:31,代碼來源:


注:本文中的producthelper::getAjaxDetailboxTemplate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。