Thursday 12 September 2013

Using Deface to prepopulate Billing Address

Using Deface to prepopulate Billing Address

I am trying to populate my billing address with prepopulated values. I
have written a deface as :
Deface::Override.new(:virtual_path => 'spree/address/_form',
:name => 'prepopulate_billing_address',
:set_attributes =>
'p#order_bill_address_attributes_phone',
:attributes => {:value => "122344"}
)
and the content belongs to app/overrides/autofill_billing_address.rb
I am trying to replace this view Spree form view
with the above deface but the deface logs say
Deface: 'prepopulate_billing_address' matched 0 times with
'p#order_bill_address_attributes_phone'
The id from the spree instance running is
order_bill_address_attributes_phone and is wrapped in <p>. Any idea?
Thanks for the help!

No comments:

Post a Comment