I’m using cart.metadata to set certain properties to conditionally show fields in the billing form.
When I’m overriding
<billing section="bottom"> I can easily access the metadata with
Unfortunately if I override
<address-fields> it doesn’t work.
Is there a way to access this data without too much hassle?
The only way I’ve found up until now that works dynamically is overriding the WHOLE
<billing> template, then add an attribute to
<address-fields>, like this one:
<address-fields type="billing" :cartmetadata="cart.metadata"></address-fields>
This way, inside
<address-fields> I can do something like this:
<fieldset class="snipcart-form__set" v-if="_self.$attrs.cartmetadata.isBusinessUser">
I don’t really think this is a clean nor the correct way to do this.
Thank you very much for your help.