I've added a delivery date in checkout's step 5 "delivery method" with this module. If the user selects a weekend, I need to add a 20% surcharge on the order.
Any ideas?
Sorry, I wrote the post hastily. My OC is version 1.5.6
I've installed the Date Delivery Picker Shipping Option module, where the user selects the date when he wants his order delivered with the shipping cost $0. Here's what I'm trying to do at the moment: if the user selects a day that falls on a weekend a 20% surcharge should apply.
Once the user picks a date with the datepicker, I'm guessing I may need an ajax call with this date to a method of a controller which calculates if the date is on a weekend, and if so, to change the shipping cost (see screenshot below) from $0 to 20% of the order total (ex: if the order is worth $100, the shipping would be $20 but only for weekend orders).

Any tips or ideas on how I can accomplish something like this?
I've installed the Date Delivery Picker Shipping Option module, where the user selects the date when he wants his order delivered with the shipping cost $0. Here's what I'm trying to do at the moment: if the user selects a day that falls on a weekend a 20% surcharge should apply.
Once the user picks a date with the datepicker, I'm guessing I may need an ajax call with this date to a method of a controller which calculates if the date is on a weekend, and if so, to change the shipping cost (see screenshot below) from $0 to 20% of the order total (ex: if the order is worth $100, the shipping would be $20 but only for weekend orders).

Any tips or ideas on how I can accomplish something like this?
Okay, MTWTF zero, Saturday 20%, Sunday no dice. That could be a bit dicey on most TFs trying to beat timelines for Saturdays (2-day or 1-day, due Saturday) -- if on TF not getting it there on Saturday already owes to you rather than to carrier, you're stuck for the, um, booboo. You need to pass shipping date to checkout. Three practical ways out.
Don't allow week end deliveries. They mess up your own TF week days.
Let customer insert a date, run that straight through a php date/day converter, pass Saturday as $20, Sunday as M (some will inevitably pick Sunday), to the arithmetic stack, and be done with it.
Ditto but as a text entry in mandatory YYMMDD format.
Don't allow week end deliveries. They mess up your own TF week days.
Let customer insert a date, run that straight through a php date/day converter, pass Saturday as $20, Sunday as M (some will inevitably pick Sunday), to the arithmetic stack, and be done with it.
Ditto but as a text entry in mandatory YYMMDD format.
I needed this for a catering business. I've started from scratch and created my own vqmod module:
I've duplicated the Flat Rate shipping, called it "Delivery" and set the cost to $0. This is my only shipping option. Then I've added a mandatory date & time picker on the checkout page on the "Delivery Details" step. On the next step, if the date selected previously, falls on a weekend (saturday or sunday) the cost is 20% of the order total, if not it's $0 (or whatever the setting is in Admin > Extensions > Shipping > Delivery > Cost).
If anyone wants this module, let me know and I'll upload it.
I've duplicated the Flat Rate shipping, called it "Delivery" and set the cost to $0. This is my only shipping option. Then I've added a mandatory date & time picker on the checkout page on the "Delivery Details" step. On the next step, if the date selected previously, falls on a weekend (saturday or sunday) the cost is 20% of the order total, if not it's $0 (or whatever the setting is in Admin > Extensions > Shipping > Delivery > Cost).
If anyone wants this module, let me know and I'll upload it.
Kudos, to say the least. (Kudos, too, for having active patronage enough for you to need that.) A reason for editing above to add that as an attachment is that it will relate to your prior need resolved at http://forum.opencart.com/viewtopic.php?f=10&t=86973 , and there will be need for both distinctive variants of flat rate shipping.
Who is online
Users browsing this forum: No registered users and 2 guests