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


PHP shipping::getDefaultShipping_xmlexport方法代码示例

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


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

示例1: writeXMLExportFile


//.........这里部分代码省略.........
                         $val = html_entity_decode($val);
                         $xml_stockdocument .= "<{$prop}><![CDATA[{$val}]]></{$prop}>";
                     }
                     $xml_stockdocument .= "</{$xmlexportdata->stock_element_name}>";
                 }
                 $xml_stockdocument .= "</" . $xmlexportdata->stock_element_name . "s>";
             }
         }
         if (count($xmlprdextrafield) > 0) {
             $prdextrafieldlist = $this->getExtraFieldList($xmlprdextrafield, $product_id, 1);
             if (count($prdextrafieldlist) > 0) {
                 $xml_prdextradocument .= "<" . $xmlexportdata->prdextrafield_element_name . "s>";
                 for ($j = 0; $j < count($prdextrafieldlist); $j++) {
                     $xml_prdextradocument .= "<{$xmlexportdata->prdextrafield_element_name}>";
                     while (list($prop, $val) = each($prdextrafieldlist[$j])) {
                         $val = html_entity_decode($val);
                         $xml_prdextradocument .= "<{$prop}><![CDATA[{$val}]]></{$prop}>";
                     }
                     $xml_prdextradocument .= "</{$xmlexportdata->prdextrafield_element_name}>";
                 }
                 $xml_prdextradocument .= "</" . $xmlexportdata->prdextrafield_element_name . "s>";
             }
         }
         if ($section == "order" && $xml_itemdocument == "") {
         } else {
             $xml_document .= "<{$xmlexportdata->element_name}>";
             while (list($prop, $val) = each($datalist[$i])) {
                 $val = html_entity_decode($val);
                 if ($prop == $prdfullimage && $val != "") {
                     $val = REDSHOP_FRONT_IMAGES_ABSPATH . "product/" . $val;
                 }
                 if ($prop == $prdthmbimage && $val != "") {
                     $val = REDSHOP_FRONT_IMAGES_ABSPATH . "product/thumb/" . $val;
                 }
                 if (isset($xmlarray['cdate']) && $prop == $xmlarray['cdate'] || isset($xmlarray['mdate']) && $prop == $xmlarray['mdate']) {
                     $val = $config->convertDateFormat($val);
                 }
                 if ($prop != "order_id" && $prop != "product_id") {
                     // Start Code for display product url,delivertime,pickup,charges,freight
                     if ($prop == "manufacturer") {
                         $val = "noname";
                     }
                     if ($prop == "link") {
                         $val = JURI::root() . 'index.php?option=com_redshop&view=product&pid=' . $product_id;
                     } elseif ($prop == "pickup") {
                         $val = "";
                     } elseif ($prop == "charge") {
                         $d['product_id'] = $product_id;
                         $srate = $shipping->getDefaultShipping_xmlexport($d);
                         $val1 = $srate['shipping_rate'];
                         $val = round($val1);
                     } elseif ($prop == "freight") {
                         $d['product_id'] = $product_id;
                         $srate = $shipping->getDefaultShipping_xmlexport($d);
                         $val1 = $srate['shipping_rate'];
                         $val = round($val1);
                     } elseif ($prop == "delivertime") {
                         $query = "SELECT * FROM " . $this->_table_prefix . "stockroom AS s " . "LEFT JOIN " . $this->_table_prefix . "product_stockroom_xref AS sx ON s.stockroom_id=sx.stockroom_id " . "WHERE product_id=" . (int) $product_id . " " . "ORDER BY s.stockroom_id ASC ";
                         $this->_db->setQuery($query);
                         $list = $this->_db->loadObject();
                         for ($k = 0; $k < count($list); $k++) {
                             if ($list->max_del_time == 1 && $list->max_del_time < 2) {
                                 $val = "1";
                             } elseif ($list->max_del_time == 2 && $list->max_del_time <= 3) {
                                 $val = "2";
                             } elseif ($list->max_del_time == 4) {
                                 $val = "4";
                             } elseif ($list->max_del_time == 5) {
                                 $val = "5";
                             } elseif ($list->max_del_time >= 6 && $list->max_del_time <= 10) {
                                 $val = "6,7,8,9,10";
                             } elseif ($list->max_del_time == "") {
                                 $val = "";
                             }
                         }
                     }
                     if ($prop == "link") {
                         $xml_document .= "<{$prop}><![CDATA[{$val}]]></{$prop}>";
                     } else {
                         $xml_document .= "<{$prop}>{$val}</{$prop}>";
                     }
                 }
             }
             $xml_document .= $xml_billingdocument;
             $xml_document .= $xml_shippingdocument;
             $xml_document .= $xml_itemdocument;
             $xml_document .= $xml_stockdocument;
             $xml_document .= $xml_prdextradocument;
             $xml_document .= "</" . $xmlexportdata->element_name . ">";
         }
     }
     $xml_document .= "</" . $xmlexportdata->parent_name . ">";
     /* Data in Variables ready to be written to an XML file */
     $fp = fopen($destpath . $filename, 'w');
     $write = fwrite($fp, $xml_document);
     $this->insertXMLExportlog($xmlexport_id, $filename);
     // Update new generated exported file in database record
     $this->updateXMLExportFilename($xmlexport_id, $filename);
     return $filename;
 }
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:101,代码来源:xmlhelper.php


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