Category Decorator and Product Variants
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!
Category Decorator and Product Variants
hi there.
did the behavior of the category decorator change in Version 2022.x?
before, when limiting delivery services to a category all variants of a selection products where included if the parent product was allocated to a category.
Now it doesn't work anymore.
What could be a working alternative?
cheers, V
did the behavior of the category decorator change in Version 2022.x?
before, when limiting delivery services to a category all variants of a selection products where included if the parent product was allocated to a category.
Now it doesn't work anymore.
What could be a working alternative?
cheers, V
Re: Category Decorator and Product Variants
If it doesn't work any more, this was not intentional. The code still uses the ID of the selection product for the check:
https://github.com/aimeos/aimeos-core/b ... y.php#L177
Can you check what happens there in your case?
https://github.com/aimeos/aimeos-core/b ... y.php#L177
Can you check what happens there in your case?
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: Category Decorator and Product Variants
up to this point everything seems to work as expected
$parentid contains the correct Selection Product ID
and the array $productIds contains [0] the ID of the Variant and [1] the ID of the Selection Product
$parentid contains the correct Selection Product ID
and the array $productIds contains [0] the ID of the Variant and [1] the ID of the Selection Product
Re: Category Decorator and Product Variants
after further tests I've to admit
the heading is misleading.
the category service decorator is not working at all.
even if I add the category directly to the variant product,
the required delivery service with the category.include argument doesn't show up.
the behavior seems to be as follows:
category.include > the required services are not displayed
category.exclude > services are displayed even if products in the basket are referenced to the excluded category
for further testing:
how do I print the serviceId inside the isAvailable function?
Aimeos Version: 22.10
the heading is misleading.
the category service decorator is not working at all.
even if I add the category directly to the variant product,
the required delivery service with the category.include argument doesn't show up.
the behavior seems to be as follows:
category.include > the required services are not displayed
category.exclude > services are displayed even if products in the basket are referenced to the excluded category
for further testing:
how do I print the serviceId inside the isAvailable function?
Aimeos Version: 22.10
Re: Category Decorator and Product Variants
Can you please check what happens here:
https://github.com/aimeos/aimeos-core/b ... #L106-L127
To get the service item with ID, you can call "$this->getServiceItem()":
https://github.com/aimeos/aimeos-core/b ... #L119-L122
This should call the method of the nested provider object and return the item.
https://github.com/aimeos/aimeos-core/b ... #L106-L127
To get the service item with ID, you can call "$this->getServiceItem()":
https://github.com/aimeos/aimeos-core/b ... #L119-L122
This should call the method of the nested provider object and return the item.
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: Category Decorator and Product Variants
as far as I can see,
the function either returns 'null' or 'false'.
even if the category matches it returns 'false'
the function either returns 'null' or 'false'.
even if the category matches it returns 'false'
Re: Category Decorator and Product Variants
Can you please find out why NULL or FALSE are returned?
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: Category Decorator and Product Variants
in our case the function getCatalogIds always returns an empty array.
https://github.com/aimeos/aimeos-core/b ... y.php#L132
$filter seems to contain the right dataset, but
$manager->search( $filter )->keys()->all()
can't find the existing category entry.
https://github.com/aimeos/aimeos-core/b ... y.php#L132
$filter seems to contain the right dataset, but
$manager->search( $filter )->keys()->all()
can't find the existing category entry.
Re: Category Decorator and Product Variants
Can you add a debug output in the getCatalogIds() method with:
Code: Select all
print_r( $filter->__toArray() );
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: Category Decorator and Product Variants
this is what I get
Array ( [&&] => Array ( [0] => Array ( [&&] => Array ( [0] => Array ( [==] => Array ( [catalog.code] => Array ( [0] => Spedition ) ) ) ) ) [1] => Array ( [&&] => Array ( [0] => Array ( [>=] => Array ( [catalog.status] => 1 ) ) ) ) ) )
Array ( [&&] => Array ( [0] => Array ( [&&] => Array ( [0] => Array ( [==] => Array ( [catalog.code] => Array ( [0] => Spedition ) ) ) ) ) [1] => Array ( [&&] => Array ( [0] => Array ( [>=] => Array ( [catalog.status] => 1 ) ) ) ) ) )