dawb Posted November 7, 2011 Share Posted November 7, 2011 Hi, Does anybody know if it is possible to set the shipping to be calculated by the weight of each product rather than the weight of the cart total? For example if you had one product that was 1kg and $4 shipping and another that was 3kg and $8 shipping the shipping total would be $12. Is this possible and how would you go about modifying the cart to do this? Any help would be greatly appreciated. Thanks Link to comment Share on other sites More sharing options...
jacky75 Posted November 7, 2011 Share Posted November 7, 2011 Hi, it's not possible to make what you need using the field "Additional shipping cost:" for each product? you can specify additional cost on each product. Then you could work on the shipping cost, if you want you can make them set to zero. For sure it could be necessary to insert the shipping cost on each product... but if you don't have a rule to apply shipping cost by total weigh... Regards, Jacky 1 Link to comment Share on other sites More sharing options...
dawb Posted November 7, 2011 Author Share Posted November 7, 2011 Hi, Thanks for your reply. Unfortunately we can not use the Additional shipping cost field for each product, as we are currently using the weights to have teirs for shipping rates and need this to be applied to each product rather than to the weight of the overall order. If you can suggest any modules that already do this it would be greatly appreciated as I have looked but could not find any. Thanks for you help 1 Link to comment Share on other sites More sharing options...
dawb Posted November 7, 2011 Author Share Posted November 7, 2011 I have found a solution to this using the "mycarrier" module. Information on doing this is available at http://www.prestashop.com/forums/topic/22848-contribution-shipping-costs-per-item-for-prestashop-11/page__st__20, thanks to cigp Link to comment Share on other sites More sharing options...
zakarra Posted November 9, 2011 Share Posted November 9, 2011 may be this can help you. i have added at the end of Proccess() in ProductController.php $id_carrier = Configuration::get('PS_CARRIER_DEFAULT'); $carrier = new Carrier((int)($id_carrier), Configuration::get('PS_LANG_DEFAULT')); $carrierTax = Tax::getCarrierTaxRate((int)$carrier->id, (int)$this->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); $defaultCountry = new Country(Configuration::get('PS_COUNTRY_DEFAULT'), Configuration::get('PS_LANG_DEFAULT')); $id_zone = (int)$defaultCountry->id_zone; $portes = $carrier->getDeliveryPriceByWeight($this->product->weight, $id_zone)*1; $portes = $portes *(1+ $carrierTax/100); self::$smarty->assign(array( 'portes' => $portes )); add in tpl {$portes} where you want to show shipping_cost If you want to calculate shipping by unit change function getDeliveryPriceByWeight() in Cart Class sure you can find what you need. 2 Link to comment Share on other sites More sharing options...
krzys_86 Posted April 4, 2013 Share Posted April 4, 2013 (edited) I want to show shipping cost in product-list.tpl , any idea?? Prestashop 1.4.4 Edited April 4, 2013 by krzys_86 (see edit history) 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