示例#1
0
文件: Frontend.php 项目: Aziz-JH/core
 /**
  * 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;
 }