Best way to handle "delivery"

29 views
Skip to first unread message

Kyle McKenna

unread,
Oct 30, 2015, 2:41:50 PM10/30/15
to Satchmo users
Hi,

I built a website where 3rd party shipping doesn't make sense, but local deliveries do (it's a flower shop). Right now people can order online, but there is no shipping/delivery information. Currently the business just calls them for the delivery details, but I'd like to implement it as part of the checkout process.

I tried adding more fields to satchmo/apps/satchmo_store/shop/models.py (and the corresponding values in admin.py) but it's giving me a "field not in database" error, I see some migrations for it so I'm wondering if I could just write my own migration script to add these fields? Not sure how I would apply it though. 

I'm not sure this is even the right way to go about it though. Would it make more sense to have a custom shipping module for delivery? Or would it make more sense to have delivery as it's own app?

Thanks!
Kyle

LZAntal

unread,
Oct 30, 2015, 3:05:47 PM10/30/15
to satchm...@googlegroups.com
Hi,

It depends. If all you need is a way for them to choose how fast they want it and provide some custom message then you could overwrite the checkout template and it’s view to handle it before pass the rest of the data back to satchmo to handle it.
Satchmo has all kinds of signals you can listening to as well for post/pre processing.
But if it is more involved I would create a custom shipping module.


Hope it helps.

Laszlo



--
You received this message because you are subscribed to the Google Groups "Satchmo users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to satchmo-user...@googlegroups.com.
To post to this group, send email to satchm...@googlegroups.com.
Visit this group at http://groups.google.com/group/satchmo-users.
For more options, visit https://groups.google.com/d/optout.

Kyle McKenna

unread,
Oct 30, 2015, 3:36:52 PM10/30/15
to Satchmo users
Thank you for your reply!

All I'm really going to need is 

2 checkboxes (one for Delivery/pickup, and one for if the delivery is a surprise),
delivery address, recipient name, recipient phone number, delivery datetime, and custom message.

I overwrote the checkout form.html and contact/_contact_info_form_shipping.html.

In _contact_info_form_shipping.html I added my own "delivery" items, (the things I listed above), but then pressing submit button wasn't working (probably because the form isn't filled out properly?) so I figured these items also had to be a part of satchmo_store/shop/models.py so I added them there but now I'm getting the database error :/

Kyle McKenna

unread,
Nov 3, 2015, 2:05:49 PM11/3/15
to Satchmo users
So I ended up just manually adding the columns to the database, and updating satchmo_store/shop/models.py to match, but the data for some reason isn't making it in to the database. Any ideas?

LZAntal

unread,
Nov 3, 2015, 3:56:21 PM11/3/15
to satchm...@googlegroups.com
Hi,

On Nov 3, 2015, at 11:05 AM, Kyle McKenna <rlfu...@gmail.com> wrote:

So I ended up just manually adding the columns to the database, and updating satchmo_store/shop/models.py to match, but the data for some reason isn't making it in to the database. Any ideas?

Not around a satchmo project atm, so can you check the view that handles the submission? It might uses a form that does not includes your fields.
Reply all
Reply to author
Forward
0 new messages