You might consider the alternative approach of overriding the checkout views, making the shipping fields HiddenInput fields, and setting their default value to zero. The benefits of doing it this way are you wouldn't have to modify the templates and you wouldn't have to override the form validation.
I don't think anyone's going to be able to give you a more specific answer unless you include a traceback for your KeyError. On Fri, Jul 8, 2016 at 4:10 PM, Andrew Fulton <[email protected]> wrote: > How would i go about completely removing shipping from cartridge? I have > everything to do with shipping removed from the templates, I popped all the > fields in my CustomOrderForm, but yet on the last step of the checkout > (confirmation page) when i click next, i get a keyError on > 'shipping_detail_first_name' which i assume means that that field is > null/was never filed out. How do i get around that? Is there some other > method/class i need to override? > > My CustomOrderForm class: > > class CustomOrderForm(BraintreeOrderForm): > > > def __init__(self, *args, **kwargs): > super(CustomOrderForm, self).__init__(*args, **kwargs) > self.fields.pop('additional_instructions') > self.fields.pop('same_billing_shipping') > self.fields.pop('remember') > for field in BraintreeOrderForm._meta.fields: > if(field.startswith('shipping')): > self.fields.pop(field) > > -- > 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. > -- 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.
