aimeos / ai-admin-jqadm

Aimeos e-commerce Vue.js+Bootstrap based admin interface
https://aimeos.org
GNU Lesser General Public License v3.0
184 stars 43 forks source link

[Feature request] As a product editor, I only want to use the attribute types that are active. #171

Closed guelzow closed 3 years ago

guelzow commented 3 years ago

Hi everyone.

Is your feature request related to a problem? When editing products, the dropdown from options/configurable and options/type supplies the complete list of attribute types. Even the disabled ones are shown.

Describe the solution you'd like Apply a filter here: https://github.com/aimeos/ai-admin-jqadm/blob/2020.10.14/admin/jqadm/themes/product.js#L268

var criteria = {'>': {'attribute.type.status': 0}};
Aimeos.getOptions(request, response, element, 'attribute/type', 'attribute.type.code', 'attribute.type.code', criteria);

That will display only the active types.

Describe alternatives you've considered An alternative would be to declare a new mixin method, because the change above might be considered a breaking change. This new method then must be used here https://github.com/aimeos/ai-admin-jqadm/blob/2020.10.14/admin/jqadm/templates/product/item-option-config-standard.php#L69 and here https://github.com/aimeos/ai-admin-jqadm/blob/2020.10.14/admin/jqadm/templates/product/item-option-custom-standard.php#L67

Additional context Screenshot of a filtered list grafik

Tobi

aimeos commented 3 years ago

Adding an additional criteria is OK and we don't consider this as breaking change (no interfaces or signatures changed). Can you create a PR for the required change?

guelzow commented 3 years ago

Can you create a PR for the required change?

Done.

aimeos commented 3 years ago

PR is merged. Thanks again!