Exemple #1
0
 /**
  * Return true if shipping method is 'Freight fixed fee'
  *
  * @param \XLite\Model\Shipping\Method $method Shipping method
  *
  * @return boolean
  */
 protected function isFixedFeeMethod($method)
 {
     return \XLite\Model\Shipping\Method::METHOD_TYPE_FIXED_FEE == $method->getCode() && 'offline' == $method->getProcessor();
 }
 /**
  * {@inheritDoc}
  */
 public function getProcessor()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getProcessor', array());
     return parent::getProcessor();
 }
 /**
  * Check - is shipping method is support "Delivery to Post Office" feature
  *
  * @param \XLite\Model\Shipping\Method $method Shipping method object
  *
  * @return boolean
  */
 protected function isMethodSupportDeliveryToPO(\XLite\Model\Shipping\Method $method)
 {
     return 'capost' == $method->getProcessor() && in_array($method->getCode(), \XLite\Module\XC\CanadaPost\Core\API::getAllowedForDelivetyToPOMethodCodes());
 }
Exemple #4
0
 /**
  * Check if method is offline
  *
  * @param \XLite\Model\Shipping\Method $entity Shipping method
  *
  * @return boolean
  */
 protected function isOffline($entity)
 {
     return 'offline' === $entity->getProcessor();
 }