How to add a group to the customers' account during the customer has an active subscribtion?
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!
How to add a group to the customers' account during the customer has an active subscribtion?
Hi,
I want to sell a product with a subscription. While the subscription is active, the customer should be a member of a customer group 'subscribers' with the ID=4.
I created a customer group with the key 'subscribers' and the label 'Subscribers'.
Then, I created the catalog attribute 'customer/group' with the key '4' and the label 'Subscribers'.
I added the type 'customer/group' with the attribute (hidden) 'Subscribers' to the product under features.
I added the following code to the TS-Config field of the scheduler task "Subscription Process Start":
controller.common.subscription.process.processors { 0 = cgroup }
controller.common.subscription.process.processor.cgroup.groupids { 0 = 4 }
When customers buy this item, they are not assigned to the customer group 'subscribers' as expected. What is going wrong? Do additional entries need to be made in Typoscript?
Used versions: Typo3 12, Aimeos 2023 and PHP 8.1.
Many thanks
I want to sell a product with a subscription. While the subscription is active, the customer should be a member of a customer group 'subscribers' with the ID=4.
I created a customer group with the key 'subscribers' and the label 'Subscribers'.
Then, I created the catalog attribute 'customer/group' with the key '4' and the label 'Subscribers'.
I added the type 'customer/group' with the attribute (hidden) 'Subscribers' to the product under features.
I added the following code to the TS-Config field of the scheduler task "Subscription Process Start":
controller.common.subscription.process.processors { 0 = cgroup }
controller.common.subscription.process.processor.cgroup.groupids { 0 = 4 }
When customers buy this item, they are not assigned to the customer group 'subscribers' as expected. What is going wrong? Do additional entries need to be made in Typoscript?
Used versions: Typo3 12, Aimeos 2023 and PHP 8.1.
Many thanks
Re: How to add a group to the customers' account during the customer has an active subscribtion?
Don't know if this works properly in TYPO3 and you should try this formatting instead:
Code: Select all
controller.common.subscription.process.processors {
0 = Cgroup
}
controller.common.subscription.process.processor.cgroup.groupids {
0 = 4
}
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: How to add a group to the customers' account during the customer has an active subscribtion?
Many thanks for the answer.
I've made the changes, but unfortunately they don't have the desired effect.
It is currently not possible for me to assign the purchaser of a subscription to a specific customer group.
But I will try other possible variations of my settings to solve the problem.
I've made the changes, but unfortunately they don't have the desired effect.
It is currently not possible for me to assign the purchaser of a subscription to a specific customer group.
But I will try other possible variations of my settings to solve the problem.
Re: How to add a group to the customers' account during the customer has an active subscribtion?
Does it work if you execute the scheduler task for starting the subscription by hand after you've placed the order?
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: How to add a group to the customers' account during the customer has an active subscribtion?
No, unfortunately it doesn't work even then.
Re: How to add a group to the customers' account during the customer has an active subscribtion?
This method should be executed when the scheduler task runs for a new order:
https://github.com/aimeos/ai-controller ... hp#L68-L84
Can you add a debug statement if that happens?
Furthermore, the orders to process are selected here:
https://github.com/aimeos/ai-controller ... #L158-L190
Check there too if the order is found or why not.
https://github.com/aimeos/ai-controller ... hp#L68-L84
Can you add a debug statement if that happens?
Furthermore, the orders to process are selected here:
https://github.com/aimeos/ai-controller ... #L158-L190
Check there too if the order is found or why not.
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: How to add a group to the customers' account during the customer has an active subscribtion?
I checked the function
https://github.com/aimeos/ai-controller ... #L158-L190
and found that under $processors only Email is included, not Cgroup.
If I add Cgroup here using the typescript of the cron-job "Start subscription":
controller.jobs.subscription.process.processors {
0 = Cgroup
1 = Email
}
additionally to
controller.common.subscription.process.processors {
0 = Cgroup
}
controller.common.subscription.process.processor.cgroup.groupids {
0 = 4
}
, then the buyer of the product with subscription interval is added to the desired customer group (ID=4) and everything works fine.
https://github.com/aimeos/ai-controller ... #L158-L190
and found that under $processors only Email is included, not Cgroup.
If I add Cgroup here using the typescript of the cron-job "Start subscription":
controller.jobs.subscription.process.processors {
0 = Cgroup
1 = Email
}
additionally to
controller.common.subscription.process.processors {
0 = Cgroup
}
controller.common.subscription.process.processor.cgroup.groupids {
0 = 4
}
, then the buyer of the product with subscription interval is added to the desired customer group (ID=4) and everything works fine.