I'd like to add $4.00 to each order as handling, or just an adder to the shipping charge. And, actually, we have some free local delivery products so it really needs to be added to the shipping charge when there is one. Any way to do this?

  • 1
    btw this is for live UPS rates. – Chad Crowell Dec 13 '12 at 18:46

I would first setup a new shipping method with the Default Shipping Gateway and give it a name of Free Shipping or similar and then setup a rule/s for your local area so that way someone outside of what you consider local isn't able to select it as an option. This will allow your users to select between local free delivery and then your UPS gateway.

Now to add the price to the UPS plugin you will want to open up the shipping plugin system/expressionengine/third_party/store/libraries/store_shipping/store_shipping_ups.php (I am not at my computer with the files so I can't give you exact line numbers) scroll down towards the bottom you should see something along the lines of

return (float)$xml->ShipmentRate->TotalCharges->MonetaryValue;

you will want to change that to

return (float)$xml->ShipmentRate->TotalCharges->MonetaryValue +4;

That should then add $4 to the calculated price of your shipping.

  • 2
    Thanks Justin. Since I was hacking, I set up a Global Variable for this amount that the client can edit through Low Variables, and then pulled that in and added it instead of a hard coded value. – Chad Crowell Dec 14 '12 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.