Jump to content

uvtya

Members
  • Posts

    4
  • Joined

  • Last visited

uvtya's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Задача решена. Теперь у меня рассчитывается доставка посылок с наложенным платежом для Почты России и EMS!!!
  2. Thank you for your reply. The problem has been resolved. (I needed it to calculate shipping Russian Post)
  3. Presta 1.4 The file classes / Carrier.php is a function of: public function getDeliveryPriceByWeight ($ totalWeight, $ id_zone) { $ Cache_key = $ this-> id .'_'.$ totalWeight .'_'.$ id_zone; if (! isset (self:: $ priceByWeight [$ cache_key])) { $ Result = Db:: getInstance (_PS_USE_SQL_SLAVE_) -> getRow (' SELECT d. `price` FROM `'. _DB_PREFIX_.' Delivery` d LEFT JOIN `'. _DB_PREFIX_.' Range_weight` w ON (d. `id_range_weight` = w. `id_range_weight`) WHERE d. `id_zone` = '. (Int) ($ id_zone).' AND '. (Float) ($ totalWeight).' > = W. `delimiter1` AND '. (Float) ($ totalWeight).' <W. `delimiter2` AND d. `id_carrier` = '. (Int) ($ this-> id).' ORDER BY w. `delimiter1` ASC '); if (! isset ($ result ['price'])) self:: $ priceByWeight [$ cache_key] = $ this-> getMaxDeliveryPriceByWeight ($ id_zone); else self:: $ priceByWeight [$ cache_key] = $ result ['price']; } return self:: $ priceByWeight [$ cache_key]; } I need this function to include the amount of goods from the basket (excluding shipping amount). Tell me how? or where to get this variable.
  4. Presta 1.4 В файле classes/Carrier.php есть функция: public function getDeliveryPriceByWeight($totalWeight, $id_zone) { $cache_key = $this->id.'_'.$totalWeight.'_'.$id_zone; if (!isset(self::$priceByWeight[$cache_key])) { $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' SELECT d.`price` FROM `'._DB_PREFIX_.'delivery` d LEFT JOIN `'._DB_PREFIX_.'range_weight` w ON (d.`id_range_weight` = w.`id_range_weight`) WHERE d.`id_zone` = '.(int)($id_zone).' AND '.(float)($totalWeight).' >= w.`delimiter1` AND '.(float)($totalWeight).' < w.`delimiter2` AND d.`id_carrier` = '.(int)($this->id).' ORDER BY w.`delimiter1` ASC'); if (!isset($result['price'])) self::$priceByWeight[$cache_key] = $this->getMaxDeliveryPriceByWeight($id_zone); else self::$priceByWeight[$cache_key] = $result['price']; } return self::$priceByWeight[$cache_key]; } Мне нужно в эту функцию включить сумму товаров из корзины (без учета суммы доставки). Профи, подскажите как? или откуда взять эту переменную.
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More