iceburnmarko Posted November 3, 2010 Share Posted November 3, 2010 I put all the rules in and just realise it is either order value or total order weight it use to work out what will be the shipping charge be. I am wondering what would I need to change if possible to make the shipping calculation to look at both the total weight and total order value to work out which postal options to display. Reason being for example royal mail 1st class is only insured for upto £41 (cost price) so would like it if order go over say £100, it will disable royalmail option and offer just courier or special delivery instead. Whilst if the order goes over 10KG it will disable special delivery due to the fact it does not carry over 10KG in weight, and offer just the courier options with necessary insurance included.This also lead to other related question but I think it is more of a feature request for future prestashop cart aka 1.4 / 1.5.Alot of carriers in UK now not only look at the weight of the item but also the dimensions of the item aka volumatic weight. Would it be possible to also have that included in the shopping cart, so put on each item its dimensions, and it than add it up to a set min and max and hence display the correct postage service. Link to comment Share on other sites More sharing options...
Pixel Posted February 8, 2011 Share Posted February 8, 2011 It is possible to combine both weight and price for Royal Mail calculations, but it's a fair few edits and a lot of testing.If you want to have a go, find the two main functions that calculate by (a) weight, and ( price in classes/carrier.php (eg. getDeliveryPriceByWeight(), getDeliveryPriceByPrice(), and combine them into one function that does both. Then insert the call to the new (combined) function wherever (a) or ( occur in the code, and test. There's also several lines of code that will become redundant and will need commenting out, and three other (related) functions that will need converting and the calls to them replacing similarly - you'll see those just below the main two functions. The other main files you'll need to edit are classes/cart.php, and /order.php.You'll also, of course, need to set your shipping rates up carefully so they enable/disable themselves correctly.So yes, it is possible, but you'd need to have a bit of a grasp of PHP and some confidence in editing. 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