Hi ,
I have one question.
Assume you've finished this feature.
So, when one order comes, containing multiple products, so, how to set the
final shipping value?
Filter all items and set to the most expensive one?
Thanks.
Wesley
Hey everyone,
>
> After browsing on the forum, I successfully setup a custom billship_hander
> depending on the country from the order_form
>
> SHOP_HANDLER_BILLING_SHIPPING = "myapp.checkout.custom_billship_handler"
>
> def custom_billship_handler(request, order_form):
>
> if order_form is not None:
> if not request.session.get("free_shipping"):
> settings.use_editable()
>
>
> if order_form.cleaned_data["shipping_detail_country"] ==
> "Canada":
> set_shipping(request, "CanadaPost Regular", 5.00)
>
>
> elif order_form.cleaned_data["shipping_detail_country"] ==
> "US":
> set_shipping(request, "CanadaPost US Regular", 7.90)
>
>
> else:
> set_shipping(request, _("Flat rate shipping"), settings.
> SHOP_DEFAULT_SHIPPING_VALUE)
>
>
>
> But now, is there a way to filter my shipping by location + category, or
> product type as defined in my child_categories ?
>
> I've been trying with the cart and order instance, but it doesn't work:
>
> #cart = Cart.objects.from_request(request)
> #cart_test = request.cart.has_items()
> #order = Order.objects.from_request(request)
>
> Any tips is appreciated! Thanks
>
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.