Categories instead of Products? (trying to add multiple products to category)
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
- alexkereszturi
- Posts: 8
- Joined: 24 Dec 2024, 11:16
Categories instead of Products? (trying to add multiple products to category)
Hi forum!
Trying to add products to a category (using Typo3). When searching for a product it lists categories: (see png)
Bug? Can I "debug" that on our side somehow? Maybe anyone changed a file he shouldn't.
Thx for any hint.
Trying to add products to a category (using Typo3). When searching for a product it lists categories: (see png)
Bug? Can I "debug" that on our side somehow? Maybe anyone changed a file he shouldn't.
Thx for any hint.
- Attachments
-
- 4045f8a56bd8205738f641266c2c8d5c4c86bc4e3b89b580e9cd6c1313eebf7d.png (84.56 KiB) Viewed 13135 times
Re: Categories instead of Products? (trying to add multiple products to category)
Which Aimeos version do you use?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
- alexkereszturi
- Posts: 8
- Joined: 24 Dec 2024, 11:16
Re: Categories instead of Products? (trying to add multiple products to category)
Aimeos: 23.10.8
Additional Info: the "same same" happens when trying to add products to suppliers => suppliers are listed instead of products
Additional Info: the "same same" happens when trying to add products to suppliers => suppliers are listed instead of products
Re: Categories instead of Products? (trying to add multiple products to category)
What's the network request when the "product" selector opens to list the suggestions? Please have a look into the network console of your browser.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Categories instead of Products? (trying to add multiple products to category)
The URL looks OK and should return categories. Is that the case in the response?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
- alexkereszturi
- Posts: 8
- Joined: 24 Dec 2024, 11:16
Re: Categories instead of Products? (trying to add multiple products to category)
Yes, the response delivers categories. But it shold deliver products.
So the query is ok ... but it's the wrong query for the task: I want to add a product to a category!
So the query is ok ... but it's the wrong query for the task: I want to add a product to a category!
Re: Categories instead of Products? (trying to add multiple products to category)
The Javascript that fetches the items is here:
https://github.com/aimeos/ai-admin-jqad ... #L370-L402
The "domain" seems to be used wrongly and nobody noticed that up to now. Can you replace it with the code below and check if it works?
https://github.com/aimeos/ai-admin-jqad ... #L370-L402
The "domain" seems to be used wrongly and nobody noticed that up to now. Can you replace it with the code below and check if it works?
Code: Select all
suggest(input, loadfcn) {
const self = this;
const args = {
'filter': {'||': [
{'==': {}},
{'=~': {}},
{'=~': {}}
]},
'fields': {},
'page': {'offset': 0, 'limit': 25},
'sort': 'product.label'
};
args['filter']['||'][0]['==']['product.id'] = input;
args['filter']['||'][1]['=~']['product.code'] = input;
args['filter']['||'][2]['=~']['product.label'] = input;
args['fields']['product'] = ['product.id', 'product.code', 'product.label'];
try {
loadfcn ? loadfcn(true) : null;
this.get('product', args, function(data) {
self.options = [];
(data.items || []).forEach(function(entry) {
self.options.push({
'id': entry['product.id'],
'label': entry['product.id'] + ' - ' + entry['product.label'] + ' (' + entry['product.code'] + ')'
});
});
});
} finally {
loadfcn ? loadfcn(false) : null;
}
},
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
- alexkereszturi
- Posts: 8
- Joined: 24 Dec 2024, 11:16
Re: Categories instead of Products? (trying to add multiple products to category)
the code change works! thanks!
Will it be in the next release/update?
Will it be in the next release/update?
Re: Categories instead of Products? (trying to add multiple products to category)
It has been fixed now. Please update the aimeos/ai-admin-jqadm package to "2023.10.x-dev"
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star