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)
#3839 by benjamin.butschell
16 Jan 2017, 14:10

if I have a product with an attribute and this attribute has a price, the price of the attribute is added to the price of the product and then multiplied by the quantity. Is logically, but is there also the possibility to multiply by quantity first and add the price of the attribute after this.

I need a selectbox where you choose an option and the price of this option is added only once, even if you buy an amount of 5 products.

In other words, add the price for the attribute only once for a position. Maybe there is some configuration available where this can be achieved? I tried Configurable, Standard, Hidden, Custom Value, Variant.

Any tips?
#3841 by aimeos
18 Jan 2017, 10:40
Currently, all calculations multiply the attribute prices with the product quantity and it's hard to get around this. The only way I can imagine at the moment for your request is to create basket plugin that recalculates the price according your requirements.
#3854 by benjamin.butschell
20 Jan 2017, 14:21
Thanks for the hint. But we used another workaround.

For everyone who might have a similiar problem: We created an extra product, with the price we need and added some more input fields to the form. So a user can now add any amount of this extra product to his basket with one click.

Code: Select all<input name="ai[b_prod][1][prodid]" type="hidden" step="1" value="2938">
<input name="ai[b_prod][1][quantity]" id="layouts" type="number" min="0" max="2147483647" maxlength="10" step="1" value="0" class="form-control">

Started as a workaround, but is actually quite handy. For client and editor. :)