PRODUCT MULTIPLE PRICES - HOW TO SELECT ONE ???

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
NOAhgomes
Posts: 2
Joined: 01 May 2019, 12:08

PRODUCT MULTIPLE PRICES - HOW TO SELECT ONE ???

Post by NOAhgomes » 01 May 2019, 12:10

Hello,

I have a product with 2 different prices (because of different taxrates)... but only one price is showed and used by Aimeos.

Can you explain which one is used by default (I guess it's last one inserted)?

I would like to add an options to select the price by VAT instead in JSONAPI passing an attribute like :

"product.id": response[0]['id'],
quantity: 1,
stocktype: "default",
taxrate: "0.15" <-

What do you think about it? How can I do it?

Thank you very much !

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

Re: PRODUCT MULTIPLE PRICES - HOW TO SELECT ONE ???

Post by aimeos » 02 May 2019, 11:50

It's the price of type "default" with the lowest minimum quantity. If you have two prices added to a product with the same quantity, the last one should be shown and used.

Adding an option to fetch prices by tax rate doesn't make sense because Aimeos uses the selection rules for the price when the product is put into the basket nevertheless. If you want to use different prices in the basket, you can use the ai-vatcheck extension of the Aimeos company (https://aimeos.com/extensions/). If you want so sell products in regions with different tax rates, their extension for complex B2C requirements is also an option (https://aimeos.com/extensions/#c1331).
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply