Пример #1
0
 /**
  * Get shipping and payment surcharges for given collection
  * @param IsotopeProductCollection
  * @return array
  */
 public function findShippingAndPaymentSurcharges(IsotopeProductCollection $objCollection)
 {
     $arrSurcharges = array();
     if (($objSurcharge = $objCollection->getShippingSurcharge()) !== null) {
         $arrSurcharges[] = $objSurcharge;
     }
     if (($objSurcharge = $objCollection->getPaymentSurcharge()) !== null) {
         $arrSurcharges[] = $objSurcharge;
     }
     return $arrSurcharges;
 }
Пример #2
0
 /**
  * Get shipping and payment surcharges for given collection
  *
  * @param IsotopeProductCollection|Order $objCollection
  *
  * @return ProductCollectionSurcharge[]
  */
 public function findShippingAndPaymentSurcharges(IsotopeProductCollection $objCollection)
 {
     // Do not add shipping and payment surcharge to cart,
     // they should only appear in the order review
     if ($objCollection instanceof Cart) {
         return array();
     }
     $arrSurcharges = array();
     if (($objSurcharge = $objCollection->getShippingSurcharge()) !== null) {
         $arrSurcharges[] = $objSurcharge;
     }
     if (($objSurcharge = $objCollection->getPaymentSurcharge()) !== null) {
         $arrSurcharges[] = $objSurcharge;
     }
     return $arrSurcharges;
 }