PrestaSafe / prettyblocks

Page builder open for source for PrestaShop
Academic Free License v3.0
77 stars 37 forks source link

Field type selector default value causes a bug #264

Open ukoo-jordan opened 1 month ago

ukoo-jordan commented 1 month ago

Hi, I encountered several issues with selector field.

  1. When you put default value for field type selector (i.e : 'default' => 'Choose'), it causes a bug and settings are not visible anymore. (It's written in documentation by the way)
  2. If you remove the default value, it automatically takes the field label instead of a generic or blank default value. (Not a problem if first point is corrected in my opinion)
  3. Then, if you select a category for example, it's impossible to remove it

Thank you!

PrestaSafe commented 1 month ago

I see, it could be great to have a 'delete' option or something else.

For the matching, i'll make some test. Do you have an exemple to give me for testing please ?

ukoo-jordan commented 1 month ago

The example that I personally had was a promotions block which allows you to retrieve native PrestaShop promotions, which I added the possibility through a selector type field to choose a category. This allows me to display promotions for a specific category. The parameters and display are identical, only the query changes.

We could even go further and provide a second selector and highlight the promotions of a brand rather than a category, but for the moment, I have not encountered this double case.