On Tuesday, December 3, 2013 4:59:37 PM UTC+1, Marconius Cuthemustard wrote:
>
> have you tried creating a new Form class based on the existing one (adding 
> the required fields) and then overriding the checkout view to use the new 
> form instead? I don't know if this helps, but I remember doing this a long 
> time ago to add an extra email and telephone field for verification 
> purposes.
>

Exactly. I did subclassed the stock *CheckoutForm,* added missing fields of 
a model into the context. However I simply cann't call *super* to invoke 
original *get* method or form context gets sent without the added fields.
 

> As for the signals confusion ... i know it can be annoying. I had a 
> problem<https://bitbucket.org/chris1610/satchmo/issue/1197/capture-on-shipment-works-but-admin-save>with
>  an other listener that caused Order to be saved twice. I suggested 
> removing the listener all 
> together<https://bitbucket.org/chris1610/satchmo/pull-request/62/capture-authorization-button-vs-capture-on/diff>
> .
>
I can remove the listener however find it quite hacky with a risk to break 
other functionality if it would rely upon. Satchmo updates may also bite me 
a lot if divert too far in customization. Looking for a clean, standard way.

>
> On Tuesday, 3 December 2013 06:28:43 UTC-5, David Unric wrote:
>>
>> Hi,
>>
>> just curious how to simply add company fields to checkout template (1st 
>> step).
>>
>> By default Satchmo renders in form only basic contact info including 
>> billing & shipping addresses, no related objects like Organization is put 
>> into rendering context.
>>
>> concerned template: *shop/checkout/form.html*
>> concerned view:        *payment.views.contact.contact_info_view*
>>
>> I'm trying subclass *payment.views.contact.CheckoutForm* and replace url 
>> to its new instance however original *get* method invokes signal 
>> *signals_ahoy.signals.form_initialdata* inside it's body so it would be 
>> called twice - once from parent and once from subclassed with extended 
>> context instance :(
>>
>> I can copy & paste whole original *get* method and do my tweaks in 
>> subclass, however find it a bit hairy as it may not possibly match changes 
>> in Satchmo updates (not relying on *super* call).
>>
>> Is there some more straightforward and/or simpler way ?
>>
>>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/satchmo-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to