当前位置: 首页>>代码示例>>PHP>>正文


PHP producthelper::getWrapper方法代码示例

本文整理汇总了PHP中producthelper::getWrapper方法的典型用法代码示例。如果您正苦于以下问题:PHP producthelper::getWrapper方法的具体用法?PHP producthelper::getWrapper怎么用?PHP producthelper::getWrapper使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在producthelper的用法示例。


在下文中一共展示了producthelper::getWrapper方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: replaceWrapperData

 public function replaceWrapperData($product_id = 0, $user_id, $uniqueid = "")
 {
     $producthelper = new producthelper();
     $wrapperlist = "";
     $wrapper = $producthelper->getWrapper($product_id, 0, 1);
     if (count($wrapper) > 0) {
         $warray = array();
         $warray[0] = new stdClass();
         $warray[0]->wrapper_id = 0;
         $warray[0]->wrapper_name = JText::_('COM_REDSHOP_SELECT');
         $commonid = $product_id . $uniqueid;
         for ($i = 0; $i < count($wrapper); $i++) {
             $wrapper_vat = 0;
             if ($wrapper[$i]->wrapper_price > 0) {
                 $wrapper_vat = $producthelper->getProducttax($product_id, $wrapper[$i]->wrapper_price, $user_id);
             }
             $wrapper[$i]->wrapper_price += $wrapper_vat;
             $wrapper[$i]->wrapper_name = $wrapper[$i]->wrapper_name . " (" . $producthelper->getProductFormattedPrice($wrapper[$i]->wrapper_price) . ")";
             $wrapperlist .= "<input type='hidden' id='wprice_" . $commonid . "_" . $wrapper[$i]->wrapper_id . "' value='" . $wrapper[$i]->wrapper_price . "' />";
             $wrapperlist .= "<input type='hidden' id='wprice_tax_" . $commonid . "_" . $wrapper[$i]->wrapper_id . "' value='" . $wrapper_vat . "' />";
         }
         $wrapper = array_merge($warray, $wrapper);
         $lists['wrapper_id'] = JHTML::_('select.genericlist', $wrapper, 'wrapper_id_' . $commonid . '[]', 'id="wrapper_id_' . $commonid . '" class="inputbox" onchange="calculateOfflineTotalPrice(\'' . $uniqueid . '\');" ', 'wrapper_id', 'wrapper_name', 0);
         $wrapperlist .= "<tr><td>" . JText::_('COM_REDSHOP_WRAPPER') . " : " . $lists['wrapper_id'] . "</td></tr>";
     }
     return $wrapperlist;
 }
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:27,代码来源:product.php

示例2: store

 public function store($data)
 {
     $extra_field = new extra_field();
     $quotationHelper = new quotationHelper();
     $producthelper = new producthelper();
     $rsCarthelper = new rsCarthelper();
     $stockroomhelper = new rsstockroomhelper();
     $extra_field->extra_field_save($data, 16, $data['user_info_id'], $data['user_email']);
     $row = $this->getTable('quotation_detail');
     if ($data['quotation_discount'] > 0) {
         $data['order_total'] = $data['order_total'] - $data['quotation_discount'] - $data['order_total'] * $data['quotation_special_discount'] / 100;
     }
     $data['quotation_number'] = $quotationHelper->generateQuotationNumber();
     $data['quotation_encrkey'] = $quotationHelper->randomQuotationEncrkey();
     $data['quotation_cdate'] = time();
     $data['quotation_mdate'] = time();
     $data['quotation_total'] = $data['order_total'];
     $data['quotation_subtotal'] = $data['order_subtotal'];
     $data['quotation_tax'] = $data['order_tax'];
     $data['quotation_ipaddress'] = !empty($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : 'unknown';
     if (!$row->bind($data)) {
         $this->setError($this->_db->getErrorMsg());
         return false;
     }
     $row->quotation_status = 2;
     if (!$row->store()) {
         $this->setError($this->_db->getErrorMsg());
         return false;
     }
     $quotation_item = array();
     $user_id = $row->user_id;
     $item = $data['order_item'];
     for ($i = 0; $i < count($item); $i++) {
         $product_id = $item[$i]->product_id;
         $quantity = $item[$i]->quantity;
         $product_excl_price = $item[$i]->prdexclprice;
         $product_price = $item[$i]->productprice;
         // Attribute price added
         $generateAttributeCart = $rsCarthelper->generateAttributeArray((array) $item[$i], $user_id);
         $retAttArr = $producthelper->makeAttributeCart($generateAttributeCart, $product_id, $user_id, 0, $quantity);
         $product_attribute = $retAttArr[0];
         // Accessory price
         $generateAccessoryCart = $rsCarthelper->generateAccessoryArray((array) $item[$i], $user_id);
         $retAccArr = $producthelper->makeAccessoryCart($generateAccessoryCart, $product_id, $user_id);
         $product_accessory = $retAccArr[0];
         $wrapper_price = 0;
         $wrapper_vat = 0;
         $wrapper = $producthelper->getWrapper($product_id, $item[$i]->wrapper_data);
         if (count($wrapper) > 0) {
             if ($wrapper[0]->wrapper_price > 0) {
                 $wrapper_vat = $producthelper->getProducttax($product_id, $wrapper[0]->wrapper_price, $user_id);
             }
             $wrapper_price = $wrapper[0]->wrapper_price + $wrapper_vat;
         }
         $rowitem =& $this->getTable('quotation_item_detail');
         $product = $producthelper->getProductById($product_id);
         $quotation_item[$i]->quotation_id = $row->quotation_id;
         $quotation_item[$i]->product_id = $product_id;
         $quotation_item[$i]->is_giftcard = 0;
         $quotation_item[$i]->product_name = $product->product_name;
         $quotation_item[$i]->actualitem_price = $product_price;
         $quotation_item[$i]->product_price = $product_price;
         $quotation_item[$i]->product_excl_price = $product_excl_price;
         $quotation_item[$i]->product_final_price = $product_price * $quantity;
         $quotation_item[$i]->product_attribute = $product_attribute;
         $quotation_item[$i]->product_accessory = $product_accessory;
         $quotation_item[$i]->product_wrapperid = $item[$i]->wrapper_data;
         $quotation_item[$i]->wrapper_price = $wrapper_price;
         $quotation_item[$i]->product_quantity = $quantity;
         if (!$rowitem->bind($quotation_item[$i])) {
             $this->setError($this->_db->getErrorMsg());
             return false;
         }
         if (!$rowitem->store()) {
             $this->setError($this->_db->getErrorMsg());
             return false;
         }
         // Store userfields
         $userfields = JRequest::getVar('extrafields' . $product_id);
         $userfields_id = JRequest::getVar('extrafields_id_' . $product_id);
         for ($ui = 0; $ui < count($userfields); $ui++) {
             $quotationHelper->insertQuotationUserfield($userfields_id[$ui], $rowitem->quotation_item_id, 12, $userfields[$ui]);
         }
         /** my accessory save in table start */
         if (count($generateAccessoryCart) > 0) {
             $attArr = $generateAccessoryCart;
             for ($a = 0; $a < count($attArr); $a++) {
                 $accessory_vat_price = 0;
                 $accessory_attribute = "";
                 $accessory_id = $attArr[$a]['accessory_id'];
                 $accessory_name = $attArr[$a]['accessory_name'];
                 $accessory_price = $attArr[$a]['accessory_price'];
                 $accessory_org_price = $accessory_price;
                 if ($accessory_price > 0) {
                     $accessory_vat_price = $producthelper->getProductTax($rowitem->product_id, $accessory_price, $user_id);
                 }
                 $attchildArr = $attArr[$a]['accessory_childs'];
                 for ($j = 0; $j < count($attchildArr); $j++) {
                     $attribute_id = $attchildArr[$j]['attribute_id'];
                     $accessory_attribute .= urldecode($attchildArr[$j]['attribute_name']) . ":<br/>";
//.........这里部分代码省略.........
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:101,代码来源:addquotation_detail.php

示例3: array

						      name="itemForm<?php 
    echo $order_item_id;
    ?>
">
							<table border="0" cellspacing="0" cellpadding="0" class="adminlist" width="100%">
								<tr>
									<td width="20%">
										<?php 
    echo $Product_name;
    ?>
									</td>
									<td width="15%">
										<?php 
    echo $products[$i]->product_attribute . "<br />" . $products[$i]->product_accessory . "<br/>" . $products[$i]->discount_calc_data;
    if ($wrapper_id) {
        $wrapper = $producthelper->getWrapper($product_id, $wrapper_id);
        echo "<br>" . JText::_('COM_REDSHOP_WRAPPER') . ": " . $wrapper[0]->wrapper_name . "(" . $products[$i]->wrapper_price . ")";
    }
    if ($subscribe_detail) {
        $subscription_detail = $model->getProductSubscriptionDetail($product_id, $subscribe_detail->subscription_id);
        $selected_subscription = $subscription_detail->subscription_period . " " . $subscription_detail->period_type;
        echo JText::_('COM_REDSHOP_SUBSCRIPTION') . ': ' . $selected_subscription;
    }
    ?>
										<br/><br/>
										<?php 
    JPluginHelper::importPlugin('redshop_product');
    $dispatcher = JDispatcher::getInstance();
    $dispatcher->trigger('onDisplayOrderItemNote', array($products[$i]));
    ?>
									</td>
开发者ID:,项目名称:,代码行数:31,代码来源:

示例4: store

 public function store($postdata)
 {
     $redshopMail = new redshopMail();
     $order_functions = new order_functions();
     $helper = new redhelper();
     $producthelper = new producthelper();
     $rsCarthelper = new rsCarthelper();
     $shippinghelper = new shipping();
     $adminproducthelper = new adminproducthelper();
     $stockroomhelper = new rsstockroomhelper();
     // For barcode generation
     $barcode_code = $order_functions->barcode_randon_number(12, 0);
     $postdata['barcode'] = $barcode_code;
     $row = $this->getTable('order_detail');
     if (!$row->bind($postdata)) {
         $this->setError($this->_db->getErrorMsg());
         return false;
     }
     if (!$row->store()) {
         $this->setError($this->_db->getErrorMsg());
         return false;
     }
     $iscrm = $helper->isredCRM();
     if ($iscrm) {
         $postdata['order_id'] = $row->order_id;
         $postdata['debitor_id'] = $postdata['user_info_id'];
         JTable::addIncludePath(REDCRM_ADMIN . '/tables');
         $crmorder =& $this->getTable('crm_order');
         if (!$crmorder->bind($postdata)) {
             $this->setError($this->_db->getErrorMsg());
             return false;
         }
         if (!$crmorder->store()) {
             $this->setError($this->_db->getErrorMsg());
             return false;
         }
         // Update rma table entry
         if (ENABLE_RMA && isset($postdata['rmanotes'])) {
             $rmaInfo = $this->getTable('rma_orders');
             $rmaInfo->rma_number = $postdata['rma_number'];
             $rmaInfo->original_order_id = $postdata['main_order_id'];
             $rmaInfo->credit_note_order_id = $row->order_id;
             $rmaInfo->rma_note = $postdata['rmanotes'];
             $rmaInfo->store();
         }
         JTable::addIncludePath(REDSHOP_ADMIN . '/tables');
     }
     $order_shipping = explode("|", $shippinghelper->decryptShipping(str_replace(" ", "+", $row->ship_method_id)));
     $rowOrderStatus =& $this->getTable('order_status_log');
     $rowOrderStatus->order_id = $row->order_id;
     $rowOrderStatus->order_status = $row->order_status;
     $rowOrderStatus->date_changed = time();
     $rowOrderStatus->customer_note = $row->customer_note;
     $rowOrderStatus->store();
     $billingaddresses = $order_functions->getBillingAddress($row->user_id);
     if (isset($postdata['billisship']) && $postdata['billisship'] == 1) {
         $shippingaddresses = $billingaddresses;
     } else {
         $key = 0;
         $shippingaddresses = $order_functions->getShippingAddress($row->user_id);
         $shipp_users_info_id = isset($postdata['shipp_users_info_id']) && $postdata['shipp_users_info_id'] != 0 ? $postdata['shipp_users_info_id'] : 0;
         if ($shipp_users_info_id != 0) {
             for ($o = 0; $o < count($shippingaddresses); $o++) {
                 if ($shippingaddresses[$o]->users_info_id == $shipp_users_info_id) {
                     $key = $o;
                     break;
                 }
             }
         }
         $shippingaddresses = $shippingaddresses[$key];
     }
     // ORDER DELIVERY TIME IS REMAINING
     $user_id = $row->user_id;
     $item = $postdata['order_item'];
     for ($i = 0; $i < count($item); $i++) {
         $product_id = $item[$i]->product_id;
         $quantity = $item[$i]->quantity;
         $product_excl_price = $item[$i]->prdexclprice;
         $product_price = $item[$i]->productprice;
         // Attribute price added
         $generateAttributeCart = $rsCarthelper->generateAttributeArray((array) $item[$i], $user_id);
         $retAttArr = $producthelper->makeAttributeCart($generateAttributeCart, $product_id, $user_id, 0, $quantity);
         $product_attribute = $retAttArr[0];
         // Accessory price
         $generateAccessoryCart = $rsCarthelper->generateAccessoryArray((array) $item[$i], $user_id);
         $retAccArr = $producthelper->makeAccessoryCart($generateAccessoryCart, $product_id, $user_id);
         $product_accessory = $retAccArr[0];
         $accessory_total_price = $retAccArr[1];
         $accessory_vat_price = $retAccArr[2];
         $wrapper_price = 0;
         $wrapper_vat = 0;
         if ($item[$i]->wrapper_data != 0 && $item[$i]->wrapper_data != '') {
             $wrapper = $producthelper->getWrapper($product_id, $item[$i]->wrapper_data);
             if (count($wrapper) > 0) {
                 if ($wrapper[0]->wrapper_price > 0) {
                     $wrapper_vat = $producthelper->getProducttax($product_id, $wrapper[0]->wrapper_price, $user_id);
                 }
                 $wrapper_price = $wrapper[0]->wrapper_price + $wrapper_vat;
             }
         }
//.........这里部分代码省略.........
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:101,代码来源:addorder_detail.php

示例5: explode

    $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];
            $template_middle = $template_edata[0];
        }
    }
}
$cart_mdata = '';
$subtotal_excl_vat = 0;
for ($i = 0; $i < count($quotationProducts); $i++) {
    $cart_mdata .= $template_middle;
    $wrapper_name = "";
    if ($quotationProducts[$i]->product_wrapperid) {
        $wrapper = $producthelper->getWrapper($quotationProducts[$i]->product_id, $quotationProducts[$i]->product_wrapperid);
        if (count($wrapper) > 0) {
            $wrapper_name = JText::_('COM_REDSHOP_WRAPPER') . ":<br/>" . $wrapper[0]->wrapper_name . "(" . $producthelper->getProductFormattedPrice($quotationProducts[$i]->wrapper_price) . ")";
        }
    }
    if ($quotationProducts[$i]->is_giftcard == 1) {
        $product_userfields = $quotationHelper->displayQuotationUserfield($quotationProducts[$i]->quotation_item_id, 13);
        $giftcardData = $producthelper->getGiftcardData($quotationProducts[$i]->product_id);
        $product_number = "";
    } else {
        $product_userfields = $quotationHelper->displayQuotationUserfield($quotationProducts[$i]->quotation_item_id, 12);
        $product = $producthelper->getProductById($quotationProducts[$i]->product_id);
        $product_number = $product->product_number;
        $product_image_path = "";
        if ($product->product_full_image) {
            if (is_file(REDSHOP_FRONT_IMAGES_RELPATH . "product/" . $product->product_full_image)) {
开发者ID:,项目名称:,代码行数:31,代码来源:

示例6: neworderitem

 public function neworderitem($data, $quantity, $order_item_id)
 {
     $adminproducthelper = new adminproducthelper();
     $producthelper = new producthelper();
     $rsCarthelper = new rsCarthelper();
     $stockroomhelper = new rsstockroomhelper();
     // Get Order Info
     $orderdata = $this->getTable('order_detail');
     $orderdata->load($this->_id);
     $item = $data['order_item'];
     // Get product Info
     // Set Order Item Info
     $orderitemdata = $this->getTable('order_item_detail');
     $orderitemdata->load($order_item_id);
     $user_id = $orderdata->user_id;
     for ($i = 0; $i < count($item); $i++) {
         $product_id = $item[$i]->product_id;
         $product_excl_price = $item[$i]->prdexclprice;
         $product_price = $item[$i]->productprice;
         // Attribute price added
         $generateAttributeCart = $rsCarthelper->generateAttributeArray((array) $item[$i], $user_id);
         $retAttArr = $producthelper->makeAttributeCart($generateAttributeCart, $product_id, $user_id, 0, $quantity);
         $product_attribute = $retAttArr[0];
         // Accessory price
         $generateAccessoryCart = $rsCarthelper->generateAccessoryArray((array) $item[$i], $user_id);
         $retAccArr = $producthelper->makeAccessoryCart($generateAccessoryCart, $product_id, $user_id);
         $product_accessory = $retAccArr[0];
         $wrapper_price = 0;
         $wrapper_vat = 0;
         if ($item[$i]->wrapper_data != 0 && $item[$i]->wrapper_data != '') {
             $wrapper = $producthelper->getWrapper($product_id, $item[$i]->wrapper_data);
             if (count($wrapper) > 0) {
                 if ($wrapper[0]->wrapper_price > 0) {
                     $wrapper_vat = $producthelper->getProducttax($product_id, $wrapper[0]->wrapper_price, $user_id);
                 }
                 $wrapper_price = $wrapper[0]->wrapper_price + $wrapper_vat;
             }
         }
         $product = $producthelper->getProductById($product_id);
         $updatestock = $stockroomhelper->updateStockroomQuantity($product_id, $quantity);
         $stockroom_id_list = $updatestock['stockroom_list'];
         $stockroom_quantity_list = $updatestock['stockroom_quantity_list'];
         $orderitemdata->stockroom_id = $stockroom_id_list;
         $orderitemdata->stockroom_quantity = $stockroom_quantity_list;
         $orderitemdata->order_item_id = 0;
         $orderitemdata->order_id = $this->_id;
         $orderitemdata->user_info_id = $orderdata->user_info_id;
         $orderitemdata->supplier_id = $product->manufacturer_id;
         $orderitemdata->product_id = $product_id;
         $orderitemdata->order_item_sku = $product->product_number;
         $orderitemdata->order_item_name = $product->product_name;
         $orderitemdata->product_quantity = $quantity;
         $orderitemdata->product_item_price = $product_price;
         $orderitemdata->product_item_price_excl_vat = $product_excl_price;
         $orderitemdata->product_final_price = $product_price * $quantity;
         $orderitemdata->order_item_currency = REDCURRENCY_SYMBOL;
         $orderitemdata->order_status = "P";
         $orderitemdata->cdate = time();
         $orderitemdata->mdate = time();
         $orderitemdata->product_attribute = $product_attribute;
         $orderitemdata->product_accessory = $product_accessory;
         $orderitemdata->wrapper_id = $item[$i]->wrapper_data;
         $orderitemdata->wrapper_price = $wrapper_price;
         if ($producthelper->checkProductDownload($product_id)) {
             $medianame = $producthelper->getProductMediaName($product_id);
             for ($j = 0; $j < count($medianame); $j++) {
                 $sql = "INSERT INTO " . $this->_table_prefix . "product_download " . "(product_id, user_id, order_id, end_date, download_max, download_id, file_name) " . "VALUES('" . $product_id . "', '" . $user_id . "', '" . $this->_id . "', " . "'" . (time() + PRODUCT_DOWNLOAD_DAYS * 23 * 59 * 59) . "', '" . PRODUCT_DOWNLOAD_LIMIT . "', " . "'" . md5(uniqid(mt_rand(), true)) . "', '" . $medianame[$j]->media_name . "')";
                 $this->_db->setQuery($sql);
                 $this->_db->query();
             }
         }
         if (!$orderitemdata->store()) {
             $this->setError($this->_db->getErrorMsg());
             return false;
         }
         /** my accessory save in table start */
         if (count($generateAccessoryCart) > 0) {
             $attArr = $generateAccessoryCart;
             for ($a = 0; $a < count($attArr); $a++) {
                 $accessory_vat_price = 0;
                 $accessory_attribute = "";
                 $accessory_id = $attArr[$a]['accessory_id'];
                 $accessory_name = $attArr[$a]['accessory_name'];
                 $accessory_price = $attArr[$a]['accessory_price'];
                 $accessory_org_price = $accessory_price;
                 if ($accessory_price > 0) {
                     $accessory_vat_price = $producthelper->getProductTax($product_id, $accessory_price, $user_id);
                 }
                 $attchildArr = $attArr[$a]['accessory_childs'];
                 for ($j = 0; $j < count($attchildArr); $j++) {
                     $attribute_id = $attchildArr[$j]['attribute_id'];
                     $accessory_attribute .= urldecode($attchildArr[$j]['attribute_name']) . ":<br/>";
                     $rowattitem =& $this->getTable('order_attribute_item');
                     $rowattitem->order_att_item_id = 0;
                     $rowattitem->order_item_id = $orderitemdata->order_item_id;
                     $rowattitem->section_id = $attribute_id;
                     $rowattitem->section = "attribute";
                     $rowattitem->parent_section_id = $accessory_id;
                     $rowattitem->section_name = $attchildArr[$j]['attribute_name'];
                     $rowattitem->is_accessory_att = 1;
//.........这里部分代码省略.........
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:101,代码来源:order_detail.php

示例7: 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);
//.........这里部分代码省略.........
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:101,代码来源:mail.php

示例8:

        $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;
    ?>
">
					<td align="center">
						<a href="<?php 
开发者ID:,项目名称:,代码行数:31,代码来源:

示例9: store

 public function store($data)
 {
     $row =& $this->getTable();
     if (!$row->bind($data)) {
         $this->setError($this->_db->getErrorMsg());
         return false;
     }
     $wrapperfile = JRequest::getVar('wrapper_image', '', 'files', 'array');
     $wrapperimg = "";
     if ($wrapperfile['name'] != "") {
         $wrapperimg = JPath::clean(time() . '_' . $wrapperfile['name']);
         $src = $wrapperfile['tmp_name'];
         $dest = REDSHOP_FRONT_IMAGES_RELPATH . '/wrapper/' . $wrapperimg;
         if ($data['wrapper_name'] == "") {
             $data['wrapper_name'] = $wrapperimg;
         }
         $row->wrapper_image = $wrapperimg;
         JFile::upload($src, $dest);
     }
     if ($row->wrapper_id) {
         $productobj = new producthelper();
         $wrapper = $productobj->getWrapper($row->product_id, $row->wrapper_id);
         if (count($wrapper) > 0 && $wrapperimg != "") {
             $unlink_path = REDSHOP_FRONT_IMAGES_RELPATH . 'wrapper/thumb/' . $wrapper[0]->wrapper_image;
             if (is_file($unlink_path)) {
                 unlink($unlink_path);
             }
             $unlink_path = REDSHOP_FRONT_IMAGES_RELPATH . 'wrapper/' . $wrapper[0]->wrapper_image;
             if (is_file($unlink_path)) {
                 unlink($unlink_path);
             }
         }
     }
     $categoryid = 0;
     if (count(JRequest::getvar('categoryid')) > 0) {
         $categoryid = implode(",", $_POST['categoryid']);
     }
     $row->category_id = $categoryid;
     $productid = $data['product_id'];
     if (count($productid) > 0) {
         $productid = implode(",", $productid);
     }
     $row->product_id = $productid;
     if (!$row->store()) {
         $this->setError($this->_db->getErrorMsg());
         return false;
     }
     return true;
 }
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:49,代码来源:wrapper_detail.php

示例10: count

    echo $row->product_name;
    ?>
&amp;tmpl=component"
			   rel="{handler: 'iframe', size: {x: 1050, y: 450}}" title=""><img
					src="<?php 
    echo REDSHOP_ADMIN_IMAGES_ABSPATH;
    ?>
media16.png" align="absmiddle"
					alt="media">(<?php 
    echo count($mediadetail);
    ?>
)</a>
		</td>
		<td align="center">
			<?php 
    $wrapper = $producthelper->getWrapper($row->product_id, 0, 1);
    ?>
			<a class="modal"
			   href="index.php?option=<?php 
    echo $option;
    ?>
&showall=1&view=wrapper&product_id=<?php 
    echo $row->product_id;
    ?>
&amp;tmpl=component"
			   rel="{handler: 'iframe', size: {x: 700, y: 450}}">
				<img src="<?php 
    echo REDSHOP_ADMIN_IMAGES_ABSPATH;
    ?>
wrapper16.png" align="absmiddle"
				     alt="<?php 
开发者ID:,项目名称:,代码行数:31,代码来源:

示例11: newQuotationItem

 public function newQuotationItem($data)
 {
     $quotationHelper = new quotationHelper();
     $rsCarthelper = new rsCarthelper();
     $producthelper = new producthelper();
     $stockroomhelper = new rsstockroomhelper();
     $item = $data['quotation_item'];
     // Get Order Info
     $quotationdata = $this->getTable('quotation_detail');
     $quotationdata->load($this->_id);
     $user_id = $quotationdata->user_id;
     // Set Order Item Info
     $qitemdata = $this->getTable('quotation_item_detail');
     for ($i = 0; $i < count($item); $i++) {
         $product_id = $item[$i]->product_id;
         $quantity = $item[$i]->quantity;
         $product_excl_price = $item[$i]->prdexclprice;
         $product_price = $item[$i]->productprice;
         $product = $producthelper->getProductById($product_id);
         $generateAttributeCart = $rsCarthelper->generateAttributeArray((array) $item[$i], $user_id);
         $retAttArr = $producthelper->makeAttributeCart($generateAttributeCart, $product_id, $user_id, 0, $quantity);
         $product_attribute = $retAttArr[0];
         $generateAccessoryCart = $rsCarthelper->generateAccessoryArray((array) $item[$i], $user_id);
         $retAccArr = $producthelper->makeAccessoryCart($generateAccessoryCart, $product_id, $user_id);
         $product_accessory = $retAccArr[0];
         $wrapper_price = 0;
         $wrapper_vat = 0;
         $wrapper = $producthelper->getWrapper($product_id, $item[$i]->wrapper_data);
         if (count($wrapper) > 0) {
             if ($wrapper[0]->wrapper_price > 0) {
                 $wrapper_vat = $producthelper->getProducttax($product_id, $wrapper[0]->wrapper_price, $user_id);
             }
             $wrapper_price = $wrapper[0]->wrapper_price + $wrapper_vat;
         }
         $qitemdata =& $this->getTable('quotation_item_detail');
         $qitemdata->quotation_item_id = 0;
         $qitemdata->quotation_id = $this->_id;
         $qitemdata->product_id = $product_id;
         $qitemdata->is_giftcard = 0;
         $qitemdata->product_name = $product->product_name;
         $qitemdata->actualitem_price = $product_price;
         $qitemdata->product_price = $product_price;
         $qitemdata->product_excl_price = $product_excl_price;
         $qitemdata->product_final_price = $product_price * $quantity;
         $qitemdata->product_attribute = $product_attribute;
         $qitemdata->product_accessory = $product_accessory;
         $qitemdata->product_wrapperid = $item[$i]->wrapper_data;
         $qitemdata->wrapper_price = $wrapper_price;
         $qitemdata->product_quantity = $quantity;
         if (!$qitemdata->store()) {
             $this->setError($this->_db->getErrorMsg());
             return false;
         }
         /** my accessory save in table start */
         if (count($generateAccessoryCart) > 0) {
             $attArr = $generateAccessoryCart;
             for ($a = 0; $a < count($attArr); $a++) {
                 $accessory_vat_price = 0;
                 $accessory_attribute = "";
                 $accessory_id = $attArr[$a]['accessory_id'];
                 $accessory_name = $attArr[$a]['accessory_name'];
                 $accessory_price = $attArr[$a]['accessory_price'];
                 $accessory_org_price = $accessory_price;
                 if ($accessory_price > 0) {
                     $accessory_vat_price = $producthelper->getProductTax($qitemdata->product_id, $accessory_price, $user_id);
                 }
                 $attchildArr = $attArr[$a]['accessory_childs'];
                 for ($j = 0; $j < count($attchildArr); $j++) {
                     $attribute_id = $attchildArr[$j]['attribute_id'];
                     $accessory_attribute .= urldecode($attchildArr[$j]['attribute_name']) . ":<br/>";
                     $rowattitem =& $this->getTable('quotation_attribute_item');
                     $rowattitem->quotation_att_item_id = 0;
                     $rowattitem->quotation_item_id = $qitemdata->quotation_item_id;
                     $rowattitem->section_id = $attribute_id;
                     $rowattitem->section = "attribute";
                     $rowattitem->parent_section_id = $accessory_id;
                     $rowattitem->section_name = $attchildArr[$j]['attribute_name'];
                     $rowattitem->is_accessory_att = 1;
                     if ($attribute_id > 0) {
                         if (!$rowattitem->store()) {
                             $this->setError($this->_db->getErrorMsg());
                             return false;
                         }
                     }
                     $propArr = $attchildArr[$j]['attribute_childs'];
                     for ($k = 0; $k < count($propArr); $k++) {
                         $section_vat = 0;
                         if ($propArr[$k]['property_price'] > 0) {
                             $section_vat = $producthelper->getProducttax($qitemdata->product_id, $propArr[$k]['property_price'], $user_id);
                         }
                         $property_id = $propArr[$k]['property_id'];
                         $accessory_attribute .= urldecode($propArr[$k]['property_name']) . " (" . $propArr[$k]['property_oprand'] . $producthelper->getProductFormattedPrice($propArr[$k]['property_price'] + $section_vat) . ")<br/>";
                         $subpropArr = $propArr[$k]['property_childs'];
                         $rowattitem =& $this->getTable('quotation_attribute_item');
                         $rowattitem->quotation_att_item_id = 0;
                         $rowattitem->quotation_item_id = $qitemdata->quotation_item_id;
                         $rowattitem->section_id = $property_id;
                         $rowattitem->section = "property";
                         $rowattitem->parent_section_id = $attribute_id;
                         $rowattitem->section_name = $propArr[$k]['property_name'];
//.........这里部分代码省略.........
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:101,代码来源:quotation_detail.php

示例12: elseif

    $mpw_thumb = PRODUCT_ADDITIONAL_IMAGE_3;
} elseif (strstr($template_desc, "{more_images_2}")) {
    $mpimg_tag = '{more_images_2}';
    $mph_thumb = PRODUCT_ADDITIONAL_IMAGE_HEIGHT_2;
    $mpw_thumb = PRODUCT_ADDITIONAL_IMAGE_2;
} elseif (strstr($template_desc, "{more_images_1}")) {
    $mpimg_tag = '{more_images_1}';
    $mph_thumb = PRODUCT_ADDITIONAL_IMAGE_HEIGHT;
    $mpw_thumb = PRODUCT_ADDITIONAL_IMAGE;
} else {
    $mpimg_tag = '{more_images}';
    $mph_thumb = PRODUCT_ADDITIONAL_IMAGE_HEIGHT;
    $mpw_thumb = PRODUCT_ADDITIONAL_IMAGE;
}
// PRODUCT WRAPPER START
$wrapper = $producthelper->getWrapper($this->data->product_id, 0, 1);
$wrappertemplate = $this->redTemplate->getTemplate("wrapper_template");
if (strstr($template_desc, "{wrapper_template:")) {
    for ($w = 0; $w < count($wrappertemplate); $w++) {
        if (strstr($template_desc, "{wrapper_template:" . $wrappertemplate[$w]->template_name . "}")) {
            $wrappertemplate_data = $wrappertemplate[$w]->template_desc;
            $wrapper_start = explode("{product_wrapper_start}", $wrappertemplate_data);
            if (isset($wrapper_start[1])) {
                $wrapper_start = explode("{product_wrapper_end}", $wrapper_start[1]);
                $wrappertemplate_data = $wrapper_start[0];
            }
            $wrappertemplate_data .= "<input type='hidden' name='wrapper_price' id='wrapper_price' value='0' />";
            $wrappertemplate_data .= "<input type='hidden' name='wrapper_price_withoutvat' id='wrapper_price_withoutvat' value='0' />";
            $warray = array();
            $warray[0]->wrapper_id = 0;
            $warray[0]->wrapper_name = JText::_('COM_REDSHOP_SELECT_WRAPPER');
开发者ID:,项目名称:,代码行数:31,代码来源:


注:本文中的producthelper::getWrapper方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。