Page 1 of 1

Implement separate prices for product.

Posted: 13 Jun 2017, 09:36
by ujackson
Hi,
I'm trying to use Aimeos for a rental website. I want to display two separate prices for both hourly and daily rates at once. I also want to configure separate prices for different locations.
Can you point me in the right direction on how to achieve this. Thanks.

Re: Implement separate prices for product.

Posted: 13 Jun 2017, 22:42
by aimeos
You can create an additional price type and use it for your hourly rates. The price partial will render them too so you can style them via CSS: https://github.com/aimeos/ai-client-htm ... lt.php#L45

If you want to change the format to "49$/hour" for example, please read the article about changing the price format for specific types: https://aimeos.org/docs/Developers/Html ... pe_formats

The price with type "default" will be used for calculation in the basket and the one the customer has to pay at the end.

How do you "define" different locations?

Re: Implement separate prices for product.

Posted: 14 Jun 2017, 08:21
by ujackson
Many thanks for your response.
Does it mean I won't be to add the new price type "hourly" for calculation in the basket and the one the customer has to pay at the end. I want the customer toggle between the two prices and the calculations should be done based on chosen price.

What I mean by "different locations".
I want to be able to display product availability based on selected city or state.

Re: Implement separate prices for product.

Posted: 14 Jun 2017, 19:30
by aimeos
You can only use one price type for the calculation but you are free to decide which one (hourly or daily) as shop owner (not as customer). To give customers this option, you need to create selection products with two articles, one with the daily price, the other with the hourly rate.

Aimeos allows more than one stock level for products (by different stock types a.k.a. warehouses). This is ideal for different locations. If the prices should differ for those locations as well, you need the ai-sites extension from the Aimeos company: https://aimeos.com/extensions/#c1331

Re: Implement separate prices for product.

Posted: 17 Jun 2017, 15:10
by ujackson
Thanks for your feedback.

I have one little challenge.
How can I create selection products with two articles, one with the daily price, the other with the hourly rate.
When I go to add selection product in expert mode. I do not see this option. Is this the same as "Associated attributes"?

Re: Implement separate prices for product.

Posted: 17 Jun 2017, 15:52
by ujackson
ujackson wrote:Thanks for your feedback.

I have one little challenge.
How can I create selection products with two articles, one with the daily price, the other with the hourly rate.
When I go to add selection product in expert mode. I do not see this option. Is this the same as "Associated attributes"?
I figured it out:
https://aimeos.org/docs/User_Manual/Adm ... l_products

Many thanks.

Re: Implement separate prices for product.

Posted: 03 Apr 2020, 07:31
by trungdo
aimeos wrote: 14 Jun 2017, 19:30 You can only use one price type for the calculation but you are free to decide which one (hourly or daily) as shop owner (not as customer).
Hi aimeoe, how to decide which one (hourly or daily) of price type to calculation in the basket instead of Standard type?
I see that if not defined Price is Standard type, basket will not calculation

Re: Implement separate prices for product.

Posted: 04 Apr 2020, 08:37
by aimeos
You must have a price of type "default" which will be used as price the customer has to really pay. All other price types are only for informational purpose you can show in the frontend, e.g. you sell your stuff per day (default price) but show your customer that it would only cost xx per hour to display a small price. You can find documentation for that here:
https://aimeos.org/docs/Developers/Html ... pe_formats

If you really sell per hour and day, you have to use a selection product with two articles, one with the price per day and one with the price per hour.