SpyrosT Posted May 21, 2010 Share Posted May 21, 2010 Hi ppl,I know that this may sound a bit complicated, but Im sure many here will want it.I need to set the shipping costs calculated by price in my counrty, which is set as the default, and thatsbecause I have a free delivery for orders more than €150 and a flat charge of €10 for orders below €150.Now what about the international shipping?I need to set the shipping costs calculated by weight.Is there any way to get this working?Thanks Link to comment Share on other sites More sharing options...
SpyrosT Posted May 26, 2010 Author Share Posted May 26, 2010 Any idea please?? Link to comment Share on other sites More sharing options...
rocky Posted May 27, 2010 Share Posted May 27, 2010 It is not possible to do that in PrestaShop, and I think it would be difficult to modify PrestaShop to do this. You could try looking for the code that calls the checkDeliveryByWeight and getDeliveryByWeight functions and write an if statement to check the country and call checkDeliveryByPrice and getDeliveryByPrice functions instead if it is your country. Link to comment Share on other sites More sharing options...
SpyrosT Posted May 27, 2010 Author Share Posted May 27, 2010 Rocky, according to this topic, I think a may havea solution. I will set the billing according to weight and I will use one carrier for all international sales and zones.Then I will create a new zone for my country only and I will set a new carrier.I will then set weight range for international carrier and price range for the local carrier.As for the code I will always have to set the right carrier id for the local one.So, what do you think? Link to comment Share on other sites More sharing options...
rocky Posted May 27, 2010 Share Posted May 27, 2010 I don't understand how that would work, since all carriers would still be "by weight" and you said you wanted one carrier "by weight" and one "by price", but if you can get it to do what you want, then you should do it. Link to comment Share on other sites More sharing options...
SpyrosT Posted May 27, 2010 Author Share Posted May 27, 2010 if (isset($configuration['PS_SHIPPING_FREE_PRICE']) AND $id_carrier==1 AND $orderTotal >= floatval($configuration['PS_SHIPPING_FREE_PRICE']) AND floatval($configuration['PS_SHIPPING_FREE_PRICE']) > 150) return $shipping_cost; What if a zone, which is my country, is incuded here as "if".Will that work? Link to comment Share on other sites More sharing options...
rocky Posted May 28, 2010 Share Posted May 28, 2010 I've had a think about it and I see now that it will work for you. That code lets you apply the "Free shipping after" value to one carrier only. You can use weight-based shipping for both carriers. Just set the weight range to 0kg-1000000kg for your country's carrier and enter the shipping cost for that weight range to €10. That should give you the flat rate you want below €150 and free shipping above €150. You can then configure the weight ranges for the international carrier as usual. Link to comment Share on other sites More sharing options...
SpyrosT Posted June 9, 2010 Author Share Posted June 9, 2010 Rocky,I have just found a solution for this.The default free shipping code looks like this: // Free fees if (isset($configuration['PS_SHIPPING_FREE_PRICE']) AND $orderTotal >= floatval($configuration['PS_SHIPPING_FREE_PRICE']) AND floatval($configuration['PS_SHIPPING_FREE_PRICE']) > 0) return $shipping_cost; if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND $this->getTotalWeight() >= floatval($configuration['PS_SHIPPING_FREE_WEIGHT']) AND floatval($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0) return $shipping_cost; So, I have added an extra if statement just under the original one, which is: if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND $id_zone==9 AND $id_carrier==22 AND $orderTotal >= 150) return $shipping_cost; zone 9 is my country carrier 22 is the local shipping carrier.The shipping settings are:Free shipping starts at: 0 euroFree shipping starts at: 900000 kgBilling according to total weightAnd as you said above, I have set a weight range from 0kg to 1000000kg with €10 shipping cost. 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