Extend Price Item to create Price Lists

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!
Laurentiu Dodoloi
Posts: 2
Joined: 03 Aug 2018, 14:01

Extend Price Item to create Price Lists

Post by Laurentiu Dodoloi » 03 Aug 2018, 14:12

Hi there!

I need to extend Price Item from \vendor\aimeos\aimeos-core\lib\mshoplib\src\MShop\Price\Item\Standard because I want to show different prices for a specific user. How could I do that ? My solution is to override the getValue() method from the Price\Standard class and check the user before return the price value, but how ?

Thank you in advance!

nos3
Posts: 87
Joined: 01 Sep 2015, 13:26

Re: Extend Price Item to create Price Lists

Post by nos3 » 03 Aug 2018, 14:23

The customer group extension allows you to show products/prices/etc. to specific customers or customer groups:
https://aimeos.com/extensions/#c823

Laurentiu Dodoloi
Posts: 2
Joined: 03 Aug 2018, 14:01

Re: Extend Price Item to create Price Lists

Post by Laurentiu Dodoloi » 03 Aug 2018, 14:27

nos3 wrote:The customer group extension allows you to show products/prices/etc. to specific customers or customer groups:
https://aimeos.com/extensions/#c823
Thank you for you response, but I just need to override a simple method. There is no need of full extention.

Is there any other solution ?

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

Re: Extend Price Item to create Price Lists

Post by aimeos » 04 Aug 2018, 21:39

Like always, you can extend the item to overwrite the methods you need and extend the manager to create your new own item in createItemBase() method.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply