Easy settings for including shipping / tax / quantity?

37 views
Skip to first unread message

Geoffrey Eisenbarth

unread,
Apr 22, 2016, 8:46:37 AM4/22/16
to Mezzanine Users

(stephenmcd: thanks for redirecting me here)

I'm using cartridge on a site that doesn't utilize shipping, tax, or quantity (electronic subscriptions), and I'm going to implement three boolean options into the settings for these situations today. Is there any interest in this? Or a way to do this already factored into the code? I know you can add custom shipping and tax calculation functions, but I don't see how those correspond with the presence of the fields in the various forms.

As I see it, this could be easily implemented by just adding a few if statements into a few templates. Thoughts / suggestions / disagreements?

Geoffrey Eisenbarth

unread,
Apr 22, 2016, 9:17:03 AM4/22/16
to Mezzanine Users
Well, this is embarrassing. 

After digging in a little more, it seems like the default behavior is to not show the shipping and tax forms in the cart / checkout if the amount is zero (I have SHOP_DEFAULT_SHIPPING_VALUE = 0 in settings.py), since the tax/shipping information is shown based on template tags defined in shop_tags.py as shipping_type, shipping_total, and tax_total. This seems to work correctly in Internet Explorer (11.0.9600.18282) and Firefox (45.02), but the "Flat Rate Shipping" and "Tax" entries are still showing up in my cart and in the order_totals.html template in Chrome (50.0.2661.87 m). 

Still looking for the culprit.
Message has been deleted

Joseph Mohan

unread,
Apr 25, 2016, 8:10:56 AM4/25/16
to Mezzanine Users
i'm in the middle of putting something together myself (no tax/shipping)

you can set these in settings.py:

SHOP_HANDLER_BILLING_SHIPPING = None 
SHOP_HANDLER_TAX = None

And that will remove them from the checkout (and payment)

But I still had the problem of removing the billing/shipping form. It feels a bit hacky but I overrid the checkout url to point to a custom view of my own that forced a redirect to the payment stage:

    url("^shop/checkout/$", myviews.checkout_steps, name="shop_cart"),

Joseph Mohan

unread,
Apr 25, 2016, 8:13:35 AM4/25/16
to Mezzanine Users

Geoffrey Eisenbarth

unread,
Apr 25, 2016, 8:15:28 AM4/25/16
to mezzani...@googlegroups.com
Joseph,

Thanks for the heads up! Working on implementing these now, very grateful. I'll chime in later when I have these tested with my setup. 

--
You received this message because you are subscribed to a topic in the Google Groups "Mezzanine Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mezzanine-users/UxaMRuCUu90/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mezzanine-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages