Jump to content

Additional Shipping Cost Per Item.... +2, +3, +4 items etc


Recommended Posts

Hello everyone,

 

I get how the weight settings work i.e. for an order below X kg's the price is Y but the problem I am having is when a customer buys 2 bulky items the total weight stays below the threshold of 30kg (My couriers limit per parcel) but when the size of the parcel goes above the volumetric cm3 size per parcel I have to send 2 parcels.

 

This is a question on cm3 volume not weight kg. Can I set an additional cost per order should an order go beyond a certain size (volume cm3 wise) I can see that prestaShop allows you to enter the package size of each item. Is there a setting for additional volume?

 

I have tried setting up the carriers maximum parcel sizses but it has no affect whatsoever its almost like the carrier dimensions and weight are there for show.

 

I am sure the PrestaShop developers have thought about this topic and I have seen other similar posts that have been left unresolved am I just missing something in the back office?

 

To me and my BASIC programming skills the PrestaShop developers could implement this with a simple if, if else statement in the prestaShop programming i.e.

 

in the back office there would be a box similar to -

 

"Additional shipping cost (per quantity):"

 

but it would be called something like -

 

Additional shipping cost (per additional item): +2,+3, +4 etc

 

users would enter the additionalItemShippingCost in the back office "perAdditionalItem" box; and within the PrestaShop code an ifStatement like this would be implemented

 

//Adding additional items by volume setting up a +2 cost
int x = itemQuantity;
double y = additionalItemShippingCost;

//if the item count is equal to 2
if (x == 2){
// then increment default cost for y/additionalItemShippingCost
y+1;
}

//nested if statment
if (x == 3){
// then increment default cost for y/additionalItemShippingCost
y+2;
}
//+3, +4, +4 etc
//else if
else if (x <2){
//do nothing
}

 

or using boolean's i.e. itemQuatity = 2 (True) AdditionalItemCost+;

 

There are more efficient ways to program this (ArrayList for example) but the above is as far as my programming skills go

 

Best regards and thanks for any the help on this topic

 

Marty

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...