PaoloGDMtech Posted December 15, 2014 Share Posted December 15, 2014 Hi, i need some help: i'm coding a custom carrier module. In my getOrderShippingCost method i'm gonna calculate shipping costs using both cart total weight and price. I'm fine with determine part of the cost based on the total cart price, but in order to determine the value of the weight shipping cost, i'd like to obtain the value computed by another "standard" prestashop carrier, that is set to operate only with weight ranges. Now, i know this other carrier's ID, but have no idea about which method (and how!) to use to get the shipping value with a given (ID) carrier. Any hints? Thank you in advance Link to comment Share on other sites More sharing options...
tuk66 Posted December 15, 2014 Share Posted December 15, 2014 There are two calculation methods in Carrier class (1.6): getDeliveryPriceByWeight($total_weight, $id_zone) getDeliveryPriceByPrice($order_total, $id_zone, $id_currency = null) Link to comment Share on other sites More sharing options...
PaoloGDMtech Posted December 16, 2014 Author Share Posted December 16, 2014 Hello, thank you for your answer. I finally found that cart->getPackageShippingCost was the method i needed. hi! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now