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


PHP Mage_Sales_Model_Order_Shipment::getId方法代码示例

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


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

示例1: getShipmentTracks

 /**
  * Getter for order tracking numbers collection per shipment
  *
  * @param Mage_Sales_Model_Order_Shipment $shipment
  * @return array
  */
 public function getShipmentTracks($shipment)
 {
     $tracks = array();
     if (!empty($this->_tracks[$shipment->getId()])) {
         $tracks = $this->_tracks[$shipment->getId()];
     }
     return $tracks;
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:14,代码来源:Shipment.php

示例2: getShipmentTracks

 /**
  * Getter for order tracking numbers collection per shipment
  *
  * @param Mage_Sales_Model_Order_Shipment $shipment
  * @return array
  */
 public function getShipmentTracks($shipment)
 {
     return isset($this->_tracks[$shipment->getId()]) ? $this->_tracks[$shipment->getId()] : null;
 }
开发者ID:votanlean,项目名称:Magento-Pruebas,代码行数:10,代码来源:Shipment.php

示例3: getShipmentTracks

 /**
  * Getter for order tracking numbers collection per shipment
  *
  * @param Mage_Sales_Model_Order_Shipment $shipment
  * @return array
  */
 public function getShipmentTracks($shipment)
 {
     return $this->_tracks[$shipment->getId()];
 }
开发者ID:jpbender,项目名称:mage_virtual,代码行数:10,代码来源:Shipment.php

示例4: sendVendorComment

 /**
  * Send vendor comment to store owner
  *
  * @param Mage_Sales_Model_Order_Shipment $shipment
  * @param string $comment
  */
 public function sendVendorComment($shipment, $comment)
 {
     $order = $shipment->getOrder();
     $store = $order->getStore();
     $to = $store->getConfig('udropship/admin/vendor_comments_receiver');
     $subject = $store->getConfig('udropship/admin/vendor_comments_subject');
     $template = $store->getConfig('udropship/admin/vendor_comments_template');
     $vendor = $this->getVendor($shipment->getUdropshipVendor());
     $ahlp = Mage::getModel('adminhtml/url');
     if ($subject && $template && $vendor->getId()) {
         $toEmail = $store->getConfig('trans_email/ident_' . $to . '/email');
         $toName = $store->getConfig('trans_email/ident_' . $to . '/name');
         $data = array('vendor_name' => $vendor->getVendorName(), 'order_id' => $order->getIncrementId(), 'shipment_id' => $shipment->getIncrementId(), 'vendor_url' => $ahlp->getUrl('udropship/adminhtml_vendor/edit', array('id' => $vendor->getId())), 'order_url' => $ahlp->getUrl('adminhtml/sales_order/view', array('order_id' => $order->getId())), 'shipment_url' => $ahlp->getUrl('adminhtml/sales_order_shipment/view', array('shipment_id' => $shipment->getId(), 'order_id' => $order->getId())), 'comment' => $comment);
         if ($this->isUdpoActive() && ($po = Mage::helper('udpo')->getShipmentPo($shipment))) {
             $data['po_id'] = $po->getIncrementId();
             $data['po_url'] = $ahlp->getUrl('udpoadmin/order_po/view', array('udpo_id' => $po->getId(), 'order_id' => $order->getId()));
             $template = preg_replace('/{{isPoAvailable}}(.*?){{\\/isPoAvailable}}/s', '\\1', $template);
         } else {
             $template = preg_replace('/{{isPoAvailable}}.*?{{\\/isPoAvailable}}/s', '', $template);
         }
         foreach ($data as $k => $v) {
             $subject = str_replace('{{' . $k . '}}', $v, $subject);
             $template = str_replace('{{' . $k . '}}', $v, $template);
         }
         $mail = Mage::getModel('core/email')->setFromEmail($vendor->getEmail())->setFromName($vendor->getVendorName())->setToEmail($toEmail)->setToName($toName)->setSubject($subject)->setBody($template)->send();
         //mail('"'.$toName.'" <'.$toEmail.'>', $subject, $template, 'From: "'.$vendor->getVendorName().'" <'.$vendor->getEmail().'>');
     }
     Mage::helper('udropship')->addShipmentComment($shipment, $this->__($vendor->getVendorName() . ': ' . $comment));
     $shipment->getCommentsCollection()->save();
     return $this;
 }
开发者ID:evinw,项目名称:project_bloom_magento,代码行数:37,代码来源:Data.php

示例5: isMagentoShipmentCreatedByOrder

 public function isMagentoShipmentCreatedByOrder(Mage_Sales_Model_Order_Shipment $magentoShipment)
 {
     $additionalData = $this->getAdditionalData();
     if (empty($additionalData['created_shipments_ids']) || !is_array($additionalData['created_shipments_ids'])) {
         return false;
     }
     return in_array($magentoShipment->getId(), $additionalData['created_shipments_ids']);
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:8,代码来源:Order.php


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