Length based article type
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Length based article type
Hi all,
as far as I can see there´s no length based article type. A product type for products sold by meter or any other length unit. Besides using block pricing what would be the best approach to set a per length price and let Aimeos calculate upon user entered desired length?
Best
Robert.
as far as I can see there´s no length based article type. A product type for products sold by meter or any other length unit. Besides using block pricing what would be the best approach to set a per length price and let Aimeos calculate upon user entered desired length?
Best
Robert.
Re: Length based article type
A product type isn't required as it's related to prices and quantities (maybe fractions of quantities).
The easiest way would be to create a new price type for €/m that you display in the frontend. Then, you can add one default price for the minium length unit (e.g. for one centimeter or one decimeter) with the price for that length. Aimeos will calculate the correct price by multiplying that price with the entered length of the user. Block pricing isn't required here, only that you need to define the minimum length unit.
If you want that users can enter fractions of a meter, you can compute the real quantity by dividing the user entered length in meter by the minimum length unit in the frontend via JS or in a HTML client decorator:
Example: 1,75m / 0,01m = 175cm
The easiest way would be to create a new price type for €/m that you display in the frontend. Then, you can add one default price for the minium length unit (e.g. for one centimeter or one decimeter) with the price for that length. Aimeos will calculate the correct price by multiplying that price with the entered length of the user. Block pricing isn't required here, only that you need to define the minimum length unit.
If you want that users can enter fractions of a meter, you can compute the real quantity by dividing the user entered length in meter by the minimum length unit in the frontend via JS or in a HTML client decorator:
Example: 1,75m / 0,01m = 175cm
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Length based article type
Thanks for your ongoing support!
I suppose that I have to follow some conventions regarding the form field for the users length/amount input for the automatism you suggest, haven´t I?
The next question would be, how is that handled regarding the basket weight. To calculate the right weight for delivery service selection?
I suppose that I have to follow some conventions regarding the form field for the users length/amount input for the automatism you suggest, haven´t I?
What do I have to ensure for the offered basket form field to integrate this type of price calculation automatism?
The next question would be, how is that handled regarding the basket weight. To calculate the right weight for delivery service selection?
Re: Length based article type
Only make sure that the customer always knows the scale he has to enter in the frontend.
The product weight must be for the minimum scale, e.g. if the product length is mutiple of 1cm, the product weight must be for 1cm.
BTW: The upcoming 2020.04 version will support fractional quantities and the code is already in the repositories.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Length based article type
Allright, nice! I think, that will do.
To make sure the customer knows the scale I would like to use
https://aimeos.org/docs/User_Manual/Adm ... ils#Prices
How can I access the config array?
To make sure the customer knows the scale I would like to use
https://aimeos.org/docs/User_Manual/Adm ... ils#Prices
But that´s not directly available at a priceItem retrieved viaOption/Value (optional)
Arbitrary list of key/value pairs that will be available with each price item in the frontend
Code: Select all
$priceItems = $this->get( 'prices', [] );
Re: Length based article type
We've used the product config (not price list config) until we decided to add a new column for the quantity scale:
https://github.com/aimeos/ai-client-htm ... 0R284-R285
https://github.com/aimeos/ai-client-htm ... 0R284-R285
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Length based article type
That helped, thank you!