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


PHP Varien_Object::getStatus方法代码示例

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


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

示例1: render

 /**
  * Renders action link only if shipment has the valid status
  *
  * @param  Varien_Object    $row
  * @return string
  */
 public function render(Varien_Object $row)
 {
     $actions = $this->getColumn()->getActions();
     if ($row->getStatus() == Dhl_Intraship_Model_Shipment::STATUS_PROCESSED || $row->getStatus() == Dhl_Intraship_Model_Shipment::STATUS_CLOSED) {
         return parent::render($row);
     }
 }
开发者ID:igorvasiliev4,项目名称:magento_code,代码行数:13,代码来源:Action.php

示例2: render

 public function render(Varien_Object $row)
 {
     if ($row->getStatus() == 'certain') {
         $value = '<a href="' . $this->getUrl('*/*/change/status/unbound/url/index/id/' . $row->getId()) . '">' . Mage::helper('bankintegration')->__('Decouple') . '</a>';
     } elseif ($row->getStatus() == 'guess') {
         $value = '<a href="' . $this->getUrl('*/*/change/status/certain/url/index/id/' . $row->getId()) . '">' . Mage::helper('bankintegration')->__('Confirm') . '</a><br>' . Mage::helper('bankintegration')->__('or') . '<br><a href="' . $this->getUrl('*/*/change/status/unbound/url/index/id/' . $row->getId()) . '">' . Mage::helper('bankintegration')->__('Decouple') . '</a>';
     } else {
         $value = '<a href="' . $this->getUrl('*/*/change/status/neglected/url/index/id/' . $row->getId()) . '">' . Mage::helper('bankintegration')->__('Ignore') . '</a>';
     }
     return $value;
 }
开发者ID:tonkberlin,项目名称:bank-integration,代码行数:11,代码来源:Status.php

示例3: render

 public function render(Varien_Object $row)
 {
     $value = '';
     // Add additional information regarding the state of the payment
     if ($row->getStatus() == 'certain') {
         // Get the orderdata
         $orderdata = Mage::getResourceModel('sales/order_collection');
         $orders = $orderdata->addFieldToFilter('increment_id', $row->getBindorder())->getItems();
         $order = reset($orders);
         // Compute the total payment so far
         $totalamount = 0;
         $sameorderpayments = Mage::getModel('bankintegration/bankintegration')->getCollection()->addFieldToFilter('bindorder', $order->getIncrementId())->getItems();
         foreach ($sameorderpayments as $bankpayment) {
             $totalamount = $totalamount + $bankpayment->getAmount();
         }
         // Compute the paid fraction
         $percentage = sprintf('%.0f', 100 * $totalamount / ($order->getGrandTotal() * 1.0));
         if ($percentage < 100) {
             $color = 'red';
         } elseif ($percentage == 100) {
             $color = 'green';
         } else {
             $color = 'orange';
         }
         $value .= '<p style="color:' . $color . '">' . $percentage . '%</color>';
     }
     return $value;
 }
开发者ID:tonkberlin,项目名称:bank-integration,代码行数:28,代码来源:Paidfraction.php

示例4: render

 public function render(Varien_Object $row)
 {
     $statuses = Mage::helper('magenotification')->getFeedbackStatusList();
     switch ((int) $row->getStatus()) {
         case 1:
             $prefix = 'notice';
             break;
         case 2:
             $prefix = 'critical';
             break;
         case 3:
         default:
             $prefix = 'major';
     }
     return '<span class="grid-severity-' . $prefix . '"><span>' . $statuses[(int) $row->getStatus()] . '</span></span>';
 }
开发者ID:ausger,项目名称:onestepcheckout-v340,代码行数:16,代码来源:Status.php

示例5: render

 public function render(Varien_Object $row)
 {
     $url = $this->getUrl('*/*/verified', array('id' => $row->getId()));
     $url1 = $this->getUrl('*/*/invalid', array('id' => $row->getId()));
     if ($row->getStatus() == 0) {
         $html = '<select id="' . $row->getId() . '" style="display:none;" onchange="varienGridAction.execute(this);" class="action-select"><option value=""></option><option value="{&quot;class&quot;:&quot;verified&quot;,&quot;title&quot;:&quot;Unverified&quot;,&quot;href&quot;:&quot;' . $url . '&quot;}">Verified</option><option value="{&quot;class&quot;:&quot;invalid&quot;,&quot;title&quot;:&quot;Invalid&quot;,&quot;href&quot;:&quot;' . $url1 . '&quot;}">Invalid</option></select><a class="verified" onclick="$(&quot;' . $row->getId() . '&quot;).show();$(this).hide();" title="Unverified">Verified</a>';
         return $html;
     } elseif ($row->getStatus() == 1) {
         $this->getColumn()->setActions(array(array('url' => $this->getUrl("*/*/unverified", array("id" => $row->getId())), 'caption' => Mage::helper('docupload')->__('Unverified'), 'class' => 'unverified', 'title' => 'Verified')));
     } elseif ($row->getStatus() == 3) {
         $this->getColumn()->setActions(array(array('caption' => Mage::helper('docupload')->__('Invalid Doc'), 'class' => 'invalid', 'title' => 'Invalid Doc')));
     } else {
         $this->getColumn()->setActions(array(array('caption' => Mage::helper('docupload')->__('Not Applicable'), 'class' => 'not_applicable', 'title' => 'Not Applicable')));
     }
     return parent::render($row);
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:16,代码来源:Action.php

示例6: render

 public function render(Varien_Object $row)
 {
     $places = Mage::getModel('pointofsale/pointofsale')->getPlaces();
     $inventory = Mage::helper('advancedinventory')->__('Not Assigned');
     $options[] = "<option value='0'>" . $inventory . "</option>";
     foreach ($places as $p) {
         $inventoryName = $p->getName() . ' (' . $p->getStoreCode() . ')';
         if ($row->getAssignation() == $p->getPlaceId()) {
             $inventory = $inventoryName;
             $selected = 'selected';
         } else {
             $selected = null;
         }
         $options[] = "<option " . $selected . " value='" . $p->getPlaceId() . "'>" . $inventoryName . "</option>";
     }
     if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/change_assignation') && !in_array($row->getStatus(), array('canceled', 'closed', 'complete', 'fraud', 'holded'))) {
         $html = "<select  onchange='InventoryManager.changeAssignation(" . $row->getId() . ",this.value,\"" . $this->getUrl('advancedinventory/adminhtml_stocks/reassign') . "\")'>\n            <optgroup label='" . Mage::helper('advancedinventory')->__('Change to ...') . "'>";
         foreach ($options as $option) {
             $html .= $option;
         }
         $html .= "</optgroup>\n            </select>";
     } else {
         return $inventory;
     }
     return $html;
 }
开发者ID:rcclaudrey,项目名称:dev,代码行数:26,代码来源:Assignation.php

示例7: render

 /**
  * Renders column
  *
  * @param Varien_Object $row
  * @return string
  */
 public function render(Varien_Object $row)
 {
     if ($row->getStatus() != OnePica_AvaTax_Model_Records_Queue::QUEUE_STATUS_FAILED) {
         return '';
     }
     return parent::render($row);
 }
开发者ID:onepica,项目名称:avatax,代码行数:13,代码来源:QueueAction.php

示例8: render

 public function render(Varien_Object $row)
 {
     if (in_array($row->getStatus(), array('0', '3'))) {
         return sprintf('<a href="#" onclick="am_feed_object.request(%d);">%s</a>', $row->getFeedId(), Mage::helper('amfeed')->__('Generate'));
     } else {
         return '';
     }
 }
开发者ID:CE-Webmaster,项目名称:CE-Hub,代码行数:8,代码来源:Generate.php

示例9: _getValue

 protected function _getValue(Varien_Object $row)
 {
     $str = '<a href="' . $this->getUrl('*/*/disapprove', array('id' => $row->getEntityId())) . '">Disapprove</a>';
     if ($row->getStatus() == 2 && $row->getVisibility() == 1) {
         $str = '<a href="' . $this->getUrl('*/*/approve', array('id' => $row->getEntityId())) . '">Approve</a>';
     }
     return $str;
 }
开发者ID:programmerrahul,项目名称:vastecom,代码行数:8,代码来源:Approve.php

示例10: render

 /**
  * Renders column
  *
  * Shows link in one row instead of select element in parent class
  *
  * @param Varien_Object $row
  * @return string
  */
 public function render(Varien_Object $row)
 {
     $actions = $this->getColumn()->getActions();
     if (empty($actions) || !is_array($actions)) {
         return '&nbsp;';
     }
     $out = '<input type="hidden" id="h' . $row->getId() . '" name="h' . $row->getId() . '" value="' . $row->getId() . '" class="rowId" />';
     $out .= '<input type="hidden" name="items[' . $row->getId() . '][order_item_id]" value="' . $row->getOrderItemId() . '" />';
     $separator = '';
     foreach ($actions as $action) {
         if (!(isset($action['status_depended']) && ($row->getStatus() === Enterprise_Rma_Model_Rma_Source_Status::STATE_APPROVED || $row->getStatus() === Enterprise_Rma_Model_Rma_Source_Status::STATE_DENIED || $row->getStatus() === Enterprise_Rma_Model_Rma_Source_Status::STATE_REJECTED))) {
             $out .= $separator . $this->_toLinkHtml($action, $row);
             $separator = '<span class="separator">|</span>';
         }
     }
     return $out;
 }
开发者ID:hazaeluz,项目名称:magento_connect,代码行数:25,代码来源:Action.php

示例11: render

 public function render(Varien_Object $row)
 {
     if ($row->getStatus() == 'unbound') {
         $form = '<form action="' . $this->getUrl('*/*/manualBindCheck/id/' . $row->getId() . '') . '" method="post"><input type="text" name="bind" size="16"><input name="form_key" type="hidden" value="' . Mage::getSingleton('core/session')->getFormKey() . '"/></input><input type="submit" value="OK"></form>';
     } else {
         $form = '';
     }
     return $form;
 }
开发者ID:tonkberlin,项目名称:bank-integration,代码行数:9,代码来源:Bindmanual.php

示例12: render

 public function render(Varien_Object $row)
 {
     if ($row->getStatus() == 'unbound') {
         $form = '<form action="' . $this->getUrl('*/*/manualBind/id/' . $row->getId() . '') . '" method="post"><select name="bind" onchange="javascript:this.form.submit()">' . $this->getOptions() . '</select><input name="form_key" type="hidden" value="' . Mage::getSingleton('core/session')->getFormKey() . '"/></input></form>';
     } else {
         $form = $row->getBindname();
     }
     return $form;
 }
开发者ID:tonkberlin,项目名称:bank-integration,代码行数:9,代码来源:Bind.php

示例13: render

 /**
  * Column renderer method
  *
  * @param Varien_Object $row
  * @return string
  */
 public function render(Varien_Object $row)
 {
     /** @var Mage_Index_Model_Process $row */
     if ($row->getStatus() === Mage_Index_Model_Process::STATUS_RUNNING) {
         return $this->_renderProgress($row);
     } else {
         return $this->_renderAvgRuntime($row);
     }
 }
开发者ID:toanloau,项目名称:Hackathon_IndexerStats,代码行数:15,代码来源:Status.php

示例14: render

 /**
  * Render approval link in each vendor row
  * @param Varien_Object $row
  * @return String
  */
 public function render(Varien_Object $row)
 {
     $html = '';
     if ($row->getEntityId() != '' && $row->getStatus() != Ced_CsMarketplace_Model_Vendor::VENDOR_APPROVED_STATUS) {
         $order = Mage::getModel('sales/order')->loadByIncrementId($row->getOrderId());
         $url = $this->getUrl('*/*/massStatus', array('vendor_id' => $row->getEntityId(), 'status' => Ced_CsMarketplace_Model_Vendor::VENDOR_APPROVED_STATUS, 'inline' => 1));
         $html .= '<a href="javascript:void(0);" onclick="deleteConfirm(\'' . $this->__('Are you sure you want to Approve?') . '\', \'' . $url . '\');" >' . Mage::helper('csmarketplace')->__('Approve') . '</a>';
     }
     if ($row->getEntityId() != '' && $row->getStatus() != Ced_CsMarketplace_Model_Vendor::VENDOR_DISAPPROVED_STATUS) {
         if (strlen($html) > 0) {
             $html .= ' | ';
         }
         $order = Mage::getModel('sales/order')->loadByIncrementId($row->getOrderId());
         $url = $this->getUrl('*/*/massStatus', array('vendor_id' => $row->getEntityId(), 'status' => Ced_CsMarketplace_Model_Vendor::VENDOR_DISAPPROVED_STATUS, 'inline' => 1));
         $html .= '<a href="javascript:void(0);" onclick="deleteConfirm(\'' . $this->__('Are you sure you want to Disapprove?') . '\', \'' . $url . '\');" >' . Mage::helper('csmarketplace')->__('Disapprove') . "</a>";
     }
     return $html;
 }
开发者ID:sixg,项目名称:mkAnagh,代码行数:23,代码来源:Approve.php

示例15: checkDealStatus

 public function checkDealStatus(Varien_Object $_deal, $_productStatus, $_inStock, $_productTypeId)
 {
     $origDealStatus = $_deal->getStatus();
     // get store datetime
     $helper = Mage::helper('multipledeals');
     $currentDateTime = $helper->getCurrentDateTime(0);
     $dealStatus = self::STATUS_ENDED;
     //check if disabled
     if ($_productStatus != 2 && $_inStock && $_deal->getStatus() != self::STATUS_DISABLED) {
         //check if running && if deal is still in stock
         if ($currentDateTime >= $_deal->getDatetimeFrom() && $currentDateTime <= $_deal->getDatetimeTo()) {
             $dealQtyValidationTypes = array('simple', 'virtual', 'downloadable');
             if (in_array($_productTypeId, $dealQtyValidationTypes) && $_deal->getDealQty() > 0) {
                 $dealStatus = self::STATUS_RUNNING;
             } else {
                 if (!in_array($_productTypeId, $dealQtyValidationTypes)) {
                     $dealStatus = self::STATUS_RUNNING;
                 } else {
                     $dealStatus = self::STATUS_ENDED;
                 }
             }
             //check if queued
         } elseif ($currentDateTime <= $_deal->getDatetimeFrom()) {
             $dealStatus = self::STATUS_QUEUED;
             //check if ended
         } elseif ($currentDateTime >= $_deal->getDatetimeTo()) {
             $dealStatus = self::STATUS_ENDED;
         }
     } else {
         $dealStatus = self::STATUS_DISABLED;
     }
     //verify if product needs to be disabled
     $disableProduct = false;
     if (($currentDateTime >= $_deal->getDatetimeTo() || $_deal->getStatus() == self::STATUS_DISABLED) && $_deal->getDisable() == 2 && $_productStatus == 1) {
         $disableProduct = true;
         $dealStatus = self::STATUS_DISABLED;
     }
     if ($origDealStatus == $dealStatus && !$disableProduct) {
         return false;
     } else {
         return array('status' => $dealStatus, 'disable_product' => $disableProduct);
     }
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:43,代码来源:Multipledeals.php


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