-
-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
The selector field type only accepts a string (e.g. 'Product', 'Category').
AdminThemeManagerController::getCollectionAction() then creates a raw PrestaShopCollection:
$psCollection = new PrestaShopCollection($collection, $id_lang);No extra filter is applied, so inactive / offline products appear in the dropdown.
On production sites this often leads to blocks displaying unavailable products.
Current behaviour
'product' => [
'type' => 'selector',
'collection' => 'Product',
'selector' => '{id} - {name}',
],Typing any query shows both active and inactive products.
Expected / requested behaviour
- Either: built-in filter so only active products are returned (
active = 1). - Or: accept custom conditions, e.g.
'options' => [
'where' => 'active = 1 AND visibility IN ("both","catalog")'
]Thanks for considering!
Metadata
Metadata
Assignees
Labels
No labels