concretecms-community-store / community_store

An open, free and community developed eCommerce system for Concrete CMS
https://concretecms-community-store.github.io/community_store/
MIT License
106 stars 66 forks source link

Optional fields during checkout #755

Closed f6cm closed 1 year ago

f6cm commented 1 year ago

Hi,

Is there a way to make some fields optional during checkout ? I have one store that doesn't need shipping, and I would like to make the address field optional (or make it completely disappear if it's easier).

Thank you for this amazing plug in !

Mesuva commented 1 year ago

If none of the products in a cart have shipping required for them (i.e. 'Product is Shippable' is set to Tes), it shouldn't offer the shipping fields at all.

f6cm commented 1 year ago

Thank you for your quick answer!

Selecting the option « product not shippable » indeed skip the shipping part of the form, but still requires the address for billing information (sorry I wasn't clear before).

I managed to (crudely) remove the required address by deleting the « ‘required’ => ‘required’, » from the form, and removing the validation methods of the controller.

I don’t know if my need is just a strange use case or if it could be useful to have an option to make the billing address (or other fields) optional. I thought one moment that the "required in checkout" option in the attributes settings could do it. Maybe a good way to set up the functionality if it turns out useful ?

Thank you again for your help !

Screenshot 2023-03-31 at 16 31 12