Shipping by date

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
Hi all

I hope this is the correct forum, first post! :-). I have been a developer for a fair few years now. So firstly want to mention what a great code base this is... really clear and easy to work with.

Now I am looking for a bit of advice really. I am setting up nop for use in a sandwich shop. so people can order their lunch on-line and either pick it up in store or get it delivered at the office.

I want to be able to have a cut off time for orders that want to be delivered. so I can say they have to order before 11 if  they want it delivered for lunch on the same day.

I have started developing a new shipping plugin. It stores a time for cut off, and the shipping rate response will calculate if the order is before the cut off time, if true it will allow the users to select [today/tomorrow/2 days time] as a 'rate'. if not it will only allow the user to select tomorrow and the day after.

I now have this working OK but in the future I want my future stores to be able to select different cut off times. (busier stores may need them in earlier)

so I guess my question is two fold...

is this shipping plugin the best approach?

and

can a shipping plugin have per store settings. or is this planned for future versions

Many thanks in advance for any help. and for Nop
9 years ago
Yes, similar to the demo "Shipping Methods" (Ground, Next Day Air, etc.), you can instead set up methods "Pick up today", "Delivery today", "Pick up tomorrow", "Delivery tomorrow", and in your plugin have ability to configure cut-off times for each method.  (See Fixed Rate plugin as example).  

Yes, shipping plugins can have per store settings ("Multi-store configuration").  You can see an example of how to implement by looking at an existing Payment plugin  (e.g. Cash on Delivery).


(Shameless plug...
If you don't want to create your own plugin, Shipping Director can calculate conditional fixed rates.  In your case, for example, the config could look like this to offer multiple time slots:
10    Integer  CutoffMinutes  30
20    Reference  CutOffTime  (DateTime.Now.TimeOfDay + TimeSpan.FromMinutes([CutoffMinutes]))
30    Boolean  OK 11-12  [@CutOffTime] < TimeSpan(12, 0, 0)
40    Boolean  OK 12-1  [@CutOffTime] < TimeSpan(13, 0, 0)
50    Boolean  OK 1-2  [@CutOffTime] < TimeSpan(14, 0, 0)
100    Option  Pickup 11-12  [OK 11-12]  0.00
110    Option  Pickup 12-1  [OK 12-1]  0.00
115    Option  Pickup 1-2   [OK 1-2]  0.00
(etc. for tomorrow pickup slots - just put 'true' in Expression)
120    Option  Delivery 11-12  [OK 11-12]  9.95
130    Option  Delivery 12-1  [OK 12-1]  9.95
140    Option  Delivery 1-2  [OK 1-2]  10.95
(etc. for tomorrow delivery slots)

E.g. if it's 11:40am, the customer would see options
Pickup 12-1   $0.00
Pickup 1-2     $0.00
Delivery 12-1 $9.95
Delivery 1-2  $10.95

Shipping Director can also test Store with built-in variables:
[$CurrentStoreId]
[$CurrentStoreName]
9 years ago
duplicate post sorry
9 years ago
Hi Thanks for the speedy reply

at least i know i am on the right track....

i have tried following the route of the payment plugin but (by checking the store context and saving the setting with that passed in)

but on the shipping rate computation method page I don't see a drop down to pick the store context like you get for payment plugins.

Is there a way to do this?


The only other way i can see is like the byweight shipping plugin. but that means dealing with adding new entities. not the end of the world. just wanted to avoid the extra work :-)

Many thanks
9 years ago
Yes, you have to choose between a "settings" based approach (all settings stored in one record), vs. a "table" (entity) approach.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.