Show different prices for customers of different membership

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Kylin00
Posts: 3
Joined: 27 Jan 2018, 11:22

Show different prices for customers of different membership

Post by Kylin00 » 27 Jan 2018, 11:50

Hi, everybody. Firstly, I have to say that my tongue is not English, please forgive me if I say something in a wrong way.
Then, my question is "how to show different prices for customers of different membership ?", to be explicit, Our shop have three types of membership currently, and they can buy the product in different price according to their membership level, here I had two thought:(1) every time a customer visit our shop, I will call a ajax to search the corresponding price to them, but It seems too complex if a new product needed to be add in the shop as I must manually add it to my database, (2) Try to change the controller behavior before it render the prices to the front end, and after a week, I still could not find the right way to do that so.

Would you please give me some advice, I will be appreciate!

Kylin00
Posts: 3
Joined: 27 Jan 2018, 11:22

Re: Show different prices for customers of different members

Post by Kylin00 » 27 Jan 2018, 12:06

Notes: My Laravel version is 5.5, Aimeos version is 2017.10.4, PHP version is 7.1, my environment is Linux

User avatar
aimeos
Administrator
Posts: 7941
Joined: 01 Jan 1970, 00:00

Re: Show different prices for customers of different members

Post by aimeos » 28 Jan 2018, 17:53

You need the customer / customer group extension form the Aimeos company for this:
https://aimeos.com/extensions/#c823
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Kylin00
Posts: 3
Joined: 27 Jan 2018, 11:22

Re: Show different prices for customers of different members

Post by Kylin00 » 29 Jan 2018, 15:46

aimeos wrote:You need the customer / customer group extension form the Aimeos company for this:
https://aimeos.com/extensions/#c823
So much thanks, I will consider it seriously.

vasile.loghin
Posts: 2
Joined: 09 May 2024, 06:24

Re: Show different prices for customers of different membership

Post by vasile.loghin » 09 May 2024, 06:46

Hi there
I am working on an Aimeos 24 on TYPO3 v.12 installation for a shop.
We need a specific application where the customer needs to be given access to different areas of the website based on the subscription they purchase, either Standard or Premium, and also be assigned to a different usergroup based on what subscription he chooses.
I have read in the docs in the Subscriptions section here https://aimeos.org/docs/latest/manual/subscriptions/ that this would be possible indeed using subscriptions, but it is not clearly exaplained there how this would need to be implemented.
Is there any way this can be implemented with the standard Aimeos package, or would this also require the Customer / Customer group extension, like in the OP?

User avatar
aimeos
Administrator
Posts: 7941
Joined: 01 Jan 1970, 00:00

Re: Show different prices for customers of different membership

Post by aimeos » 09 May 2024, 07:43

Assignment to different user groups should work without the extension:
https://aimeos.org/docs/latest/cronjobs ... rocessors/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

vasile.loghin
Posts: 2
Joined: 09 May 2024, 06:24

Re: Show different prices for customers of different membership

Post by vasile.loghin » 16 May 2024, 09:51

Ok, thanks for the reply.

I have implemented the custom processor in a separate extension, in a class called Myproc/Standard.
In the docs, as well as in the class that i try to extend (vendor/aimeos/ai-controller-jobs/src/Controller/Jobs/Subscription/Process/Begin/Standard.php, or vendor/aimeos/ai-controller-jobs/src/Controller/Jobs/Common/Subscription/Process/Processor/Cgroup/Standard.php), in the comments it says that i have to do the following setting in order for my class to be called in the place of the custom class:

* Each default job controller can be replace by an alternative imlementation.
* To use this implementation, you have to set the last part of the class
* name as configuration value so the controller factory knows which class it
* has to instantiate.
*
* For example, if the name of the default class is
*
* \Aimeos\Controller\Jobs\Subscription\Process\Begin\Standard
*
* and you want to replace it with your own version named
*
* \Aimeos\Controller\Jobs\Subscription\Process\Begin\Mybegin
*
* then you have to set the this configuration option:
*
* controller/jobs/subscription/process/begin/name = Mybegin

Where can this setting be set in TYPO3?

Code: Select all

controller/jobs/subscription/process/begin/name = Mybegin

I have not managed to find it or something similar anywhere in the code, nor by trying to figure it out by myself from the code how could such a processor class be extended with a custom class. Thus, the custom code from the custom class is still not being executed.

User avatar
aimeos
Administrator
Posts: 7941
Joined: 01 Jan 1970, 00:00

Re: Show different prices for customers of different membership

Post by aimeos » 17 May 2024, 17:34

You mix up two things. Either you overwrite the existing "subscription/process/begin" job controller (not recommended) or you create a new subscription processor decorator like the existing ones like you've tried to:
https://github.com/aimeos/ai-controller ... /Processor

Use the "Cgroup" decorator as example:
https://github.com/aimeos/ai-controller ... andard.php

Creating new decorators is described here:
https://aimeos.org/docs/latest/cronjobs ... processors

To configure the new decorator, add it to the Resources/Private/Config/controller.php file of your own Aimeos extension for the project:

Code: Select all

	'common' => [
		'subscription' => [
			'process' => [
				'processors' => ['Myproc']
			]
		]
	]
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply