Esempio n. 1
0
 public function getGiftWrappingPrice($with_taxes = true, $id_address = null)
 {
     $wrappingPrice = parent::getGiftWrappingPrice($with_taxes, $id_address);
     if (!Module::isInstalled('agilemultipleseller')) {
         return $wrappingPrice;
     }
     include_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/agilemultipleseller.php";
     $sellers = AgileMultipleSeller::getSellersByCart($this->id);
     return count($sellers) * $wrappingPrice;
 }
Esempio n. 2
0
 public function getGiftWrappingPrice($with_taxes = true, $id_address = null)
 {
     static $address = array();
     /*
      * EU-Legal
      * alternative method for tax calculation (LEGAL_SHIPTAXMETH)
      */
     if (!Configuration::get('LEGAL_SHIPTAXMETH')) {
         parent::getGiftWrappingPrice($with_taxes, $id_address);
     }
     $wrapping_fees = (double) Configuration::get('PS_GIFT_WRAPPING_PRICE');
     if ($with_taxes && $wrapping_fees > 0) {
         $tax_rate = Cart::getTaxesAverageUsed((int) $this->id);
         -($wrapping_fees = $wrapping_fees * (1 + $tax_rate / 100));
     }
     return $wrapping_fees;
 }