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


PHP Mage_Sales_Model_Abstract::getOrder方法代码示例

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


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

示例1: insertTotals

 /**
  * Insert totals to pdf page
  *
  * @param  Zend_Pdf_Page $page
  * @param  Mage_Sales_Model_Abstract $source
  * @return Zend_Pdf_Page
  */
 protected function insertTotals($page, $source)
 {
     $order = $source->getOrder();
     $totals = $this->_getTotalsList($source);
     $lineBlock = array('lines' => array(), 'height' => 15);
     foreach ($totals as $total) {
         $total->setOrder($order)->setSource($source);
         if ($total->canDisplay()) {
             $total->setFontSize(10);
             foreach ($total->getTotalsForDisplay() as $totalData) {
                 $lineBlock['lines'][] = array(array('text' => $totalData['label'], 'feed' => 475, 'align' => 'right', 'font_size' => $totalData['font_size'], 'font' => 'bold'), array('text' => $totalData['amount'], 'feed' => 565, 'align' => 'right', 'font_size' => $totalData['font_size'], 'font' => 'bold'));
             }
         }
     }
     $this->y -= 20;
     $page = $this->drawLineBlocks($page, array($lineBlock));
     return $page;
 }
开发者ID:blazeriaz,项目名称:youguess,代码行数:25,代码来源:Abstract.php

示例2: insertTotals

 /**
  * Insert totals to pdf page
  *
  * @param  Zend_Pdf_Page $page
  * @param  Mage_Sales_Model_Abstract $source
  * @return Zend_Pdf_Page
  */
 protected function insertTotals($page, $source)
 {
     // remvoeme
     $this->y += 40;
     if ($this->y - 150 < 15) {
         $page = $this->newPage($pageSettings);
     }
     $order = $source->getOrder();
     $totals = $this->_getTotalsList($source);
     $lineBlock = array('lines' => array(), 'height' => 20);
     $this->y -= 30;
     $page->setFillColor(new Zend_Pdf_Color_Html("#58a300"));
     $page->setLineColor(new Zend_Pdf_Color_GrayScale(1));
     $page->setLineWidth(0.5);
     $page->drawRectangle(275, $this->y, 570, $this->y - 30);
     $this->_setFontBold($page, 12);
     $page->setFillColor(new Zend_Pdf_Color_GrayScale(1));
     $page->drawText(Mage::helper('sales')->__('Betrag'), 285, $this->y - 20, 'UTF-8');
     $this->sy = $this->y;
     $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));
     $this->y -= 30;
     foreach ($totals as $total) {
         $total->setOrder($order)->setSource($source);
         if ($total->canDisplay()) {
             $total->setFontSize(10);
             foreach ($total->getTotalsForDisplay() as $totalData) {
                 $fontSize = 7;
                 if ("Gesamt (inkl. Steuern):" === $totalData["label"]) {
                     $fontSize = 10;
                 }
                 if (false !== strpos($totalData["label"], "Produkte zu 19")) {
                     continue;
                 }
                 if ("Steuer:" === $totalData["label"]) {
                     $totalData["label"] = "19% MwSt.";
                 }
                 $totalData["label"] = str_replace("Steuern", "MwSt.", $totalData["label"]);
                 $lineBlock['lines'][] = array(array('text' => $totalData['label'], 'feed' => 475, 'align' => 'right', "font_size" => 7, 'font' => 'bold'), array('text' => $totalData['amount'], 'feed' => 525, 'align' => 'right', "font_size" => $fontSize, 'font' => 'bold'));
             }
         }
     }
     $this->y -= 20;
     $page = $this->drawLineBlocks($page, array($lineBlock));
     return $page;
 }
开发者ID:vberzsin,项目名称:shop,代码行数:52,代码来源:Abstract.php

示例3: salesOrderEntitySaveBefore

 /**
  * Check whether order entity may be saved
  *
  * Invoice, shipment, creditmemo (address & item?)
  *
  * @param Mage_Sales_Model_Abstract $model
  */
 public function salesOrderEntitySaveBefore($model)
 {
     $this->_salesEntitySaveBefore(Mage::app()->getStore($model->getOrder()->getStoreId())->getWebsiteId());
 }
开发者ID:beejhuff,项目名称:magento-1.13.0.2,代码行数:11,代码来源:Models.php

示例4: insertTotals

 /**
  * Insert totals to pdf page
  *
  * @param  Zend_Pdf_Page $page
  * @param  Mage_Sales_Model_Abstract $source
  * @return Zend_Pdf_Page
  */
 protected function insertTotals($page, $source)
 {
     $order = $source->getOrder();
     $totals = $this->_getTotalsList($source);
     $lineBlock = array('lines' => array(), 'height' => 15);
     foreach ($totals as $total) {
         $total->setOrder($order)->setSource($source);
         if ($total->canDisplay()) {
             $total->setFontSize(10);
             foreach ($total->getTotalsForDisplay() as $totalData) {
                 if (isset($totalData['title']) && strpos($totalData['title'], '%') !== false) {
                     $origLabel = $totalData['label'];
                     $totalData['label'] = trim(preg_replace('/\\s*\\([^)]*\\)/', '', $origLabel));
                     #echo "<pre/>";print_r($totalData);die;
                 }
                 Mage::log(print_r($totalData, true), NULL, 'developerTotalAfter.log');
                 $lineBlock['lines'][] = array(array('text' => $totalData['label'], 'feed' => 475, 'align' => 'right', 'font_size' => $totalData['font_size'], 'font' => 'bold'), array('text' => $totalData['amount'], 'feed' => 565, 'align' => 'right', 'font_size' => $totalData['font_size'], 'font' => 'bold'));
             }
         }
     }
     $this->y -= 20;
     $page = $this->drawLineBlocks($page, array($lineBlock));
     return $page;
 }
开发者ID:VIVEKLUCKY1848,项目名称:generalutils,代码行数:31,代码来源:(Local)Abstract.php


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