On 17/02/2014 8:07 PM, Jacob wrote:
Hello

If I wanted to modify a field in Cartridge.model.Order then how would I
accomplish that?

The setting SHOP_CHECKOUT_FORM_CLASS allows you to specify the class used for the order form. If you create a form class deriving from cartridge.shop.forms.OrderForm you can override the widgets used for various form elements.


Specifically, I would like to modify the country and state fields to be
choice fields instead.


I've made the country field use a Select widget in my cartridge_braintree app, see here:
https://github.com/molokov/cartridge_braintree

Specifically, look at the BraintreeOrderForm class here:
https://github.com/molokov/cartridge_braintree/blob/master/cartridge_braintree/forms.py#L36

That should hopefully give you the idea on how to implement this.

Seeya. Danny.


I read something about monkey patching but I'm not sure how to go about
this.

OR

Is there a way to modify the checkout form to make country and state
fields selectable?

some guidance is much appreciated
Thank you!

--
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/groups/opt_out.



--
Email: [email protected]

--
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/groups/opt_out.

Reply via email to