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)
#6096 by sixbynine
07 May 2018, 09:43

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 :

"": 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 !

#6099 by aimeos
07 May 2018, 12:21
The price used might be arbitrary if both have the same quantity.

If you want to sell products with different prices and taxrates, you need the sites extension from the Aimeos company where you can create subsites for each country/etc. which you can assign the country specific prices to:
#6103 by sixbynine
07 May 2018, 14:55

Thank you very much for your answer... i'm not sure the extension can help me because I just need to manage one country but in my country the same product from the same stock sold to the same customer can have 3 different taxrates depending how it will be used, so I need a way to select the VAT for the product and then add it to the basket.

Thank you a lot in advance,

#6107 by sixbynine
08 May 2018, 08:07
It's for food ! People can order (and prepay) a meal and go to the shop to get it. Then if they bring it home (take away) or if they eat it in the shop they won't pay the same tax, if it contains alcohol the tax rate changes too... So they need to decide what they'll do and choose the correct taxrate when they order on the website. (It works like this in different EU countries I guess, mine is Belgium). Because for the same product I won't ever have two different prices with the same taxrate, I think I need to change de default db price select req and pass the selected taxrate in a where clause. I could also make 2 or 3 versions of each product but it would be really messy and complicated because the stock is the same !

Thank you very much for your answers and your patience !

#6113 by aimeos
11 May 2018, 05:34
May we suggest another solution? Create selection products and variants with only contains the different prices. Then, the customers can select e.g. "take away" and "restaurant". The tax rate for alcohol is only in the prices for products that contain alcohol but the customers still only need to select "take away" and "restaurant". That seems much more user friendly.
#6121 by sixbynine
14 May 2018, 05:55

Thank you very much for your response and your suggestion. I'm trying it... but it looks like i need to add all the prices as independant variants... it's really messy to manage.

if I keep the variant price set to 0, would it be possible to have only three variants that doesn't contain the prices but only the taxation rates that need to be used and that would overwrite the taxrate of the main price taxrate of the selection?

Thank you very much,

#6129 by aimeos
14 May 2018, 17:41
Currently, articles can't share the same stock level of the selection product but you can implement an alternative basket plugin for the stock level check:

Stock level update is done here: