Esempio n. 1
0
 /**
  * Return params list to use for search
  *
  * @return \XLite\Core\CommonCell
  */
 protected function getSearchCondition()
 {
     $result = parent::getSearchCondition();
     $carrierParam = \XLite\Model\Repo\Shipping\Method::P_CARRIER;
     if (!empty($result->{$carrierParam}) && 'auctionInc' == $result->{$carrierParam} && \XLite\Module\XC\AuctionInc\Main::isSSAvailable()) {
         $result->{$carrierParam} = '';
     }
     if (!empty($result->{$carrierParam}) && 'auctionInc' == $result->{$carrierParam}) {
         $filter = array();
         $filter[] = 'FF%';
         $filter[] = 'NOCHG%';
         // UPS Next Day Air Early AM is a commercial only service.
         // Rather than ask you to implement differential code based
         // on the module Residential setting, lets just eliminate
         // this service method for the XS trial.
         $filter[] = 'UPS_UPSNDE';
         // The two “Saturday” services have special handling in AuctionInc.
         // It would be best just to eliminate these two service methods as well for the XS trial
         $filter[] = 'FEDEX_FDXPOS';
         $filter[] = 'UPS_UPSNDAS';
         foreach (array('DHL', 'FEDEX', 'UPS', 'USPS') as $carrier) {
             $entryPoint = \XLite\Core\Config::getInstance()->XC->AuctionInc->{'entryPoint' . $carrier};
             if (\XLite\Module\XC\AuctionInc\View\FormField\Select\AEntryPoint::STATE_DISABLED == $entryPoint) {
                 $filter[] = $carrier . '%';
             }
         }
         $result->{\XLite\Model\Repo\Shipping\Method::P_AUCTION_INC_FILTER} = $filter;
     }
     return $result;
 }
 /**
  * Search labels
  *
  * @return void
  */
 protected function doActionSearch()
 {
     $search = array();
     $searchParams = \XLite\View\ItemsList\Model\Shipping\Methods::getSearchParams();
     foreach ($searchParams as $modelParam => $requestParam) {
         if (isset(\XLite\Core\Request::getInstance()->{$requestParam})) {
             $search[$requestParam] = \XLite\Core\Request::getInstance()->{$requestParam};
         }
     }
     $name = \XLite\View\ItemsList\Model\Shipping\Methods::getSessionCellName();
     \XLite\Core\Session::getInstance()->{$name} = $search;
 }
Esempio n. 3
0
 /**
  * Mark list as sortable
  *
  * @return integer
  */
 protected function getSortableType()
 {
     $processor = $this->getProcessor();
     return $processor && 'auctionInc' === $processor->getProcessorId() ? static::SORT_TYPE_NONE : parent::getSortableType();
 }
Esempio n. 4
0
 /**
  * Add right actions
  *
  * @return array
  */
 protected function getRightActions()
 {
     return array_merge(parent::getRightActions(), array('modules/XC/FreeShipping/free_shipping_tooltip.tpl', 'modules/XC/FreeShipping/shipping_freight_tooltip.tpl'));
 }