Hey Mat, could you go into more detail about what you mean by "location +
category".  I'm not sure what you are trying to do so it's hard to make a
recommendation =)

On Wed, Oct 1, 2014 at 12:11 PM, Mat Caissy <matsi...@gmail.com> wrote:

> 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 mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to