better-payment / bp-plugin-shopware6-api2

Shopware 6 Plugin for Better Payment API2
Other
0 stars 0 forks source link

Do not collect gender birthday on company #56

Closed hasanzade-hasan closed 1 year ago

hasanzade-hasan commented 1 year ago

Implemented as discussed in related issue. So,

  1. During plugin install gender custom field is added to be used when needed. This actually has nothing to do with Storefront view, they are totally independed from each other. This custom field is actually for administraion purposes as in:
    • When admin wants to add new customer, this will be used
    • When admin wants to view existing customer who registered themselves, their chosen option will be seen to admin in a proper way and admin will be able to edit it.
      Basically, custom field is for only admin. Only requirement is that, their keys should be same. It is better_payment_customer_gender in our case.
  2. When plugin config changes any of collect birthday flags, birthday field is activated (and added to register page) from system config but not set as required.
  3. When plugin config changes any of collect gender flags, gender select box is added to register page by plugin extending register view. When added gender is always required.
  4. When customer selects Private as account type, depending on whether plugin config enabled birthday and/or gender collection, JS on extended register page makes these fields required in the form.
  5. When customer selects Commercial as account type, depending on whether plugin config enabled birthday and/or gender collection, JS on extended register page totally removes these fields from the form.