Page 1 of 1

Multiplication for product qty

Posted: Tue Jul 21, 2020 2:12 am
by nickelaj
Hi,
I am using 3.0.3.2 opencart version.

I have product as pipe 4 or 6 meters. I want to calculate quantity with product price for adding to cart.

I mean Product price is 5$, customer added 8 quantities to cart , i have to add 8x4 (meters) = 32 pieces.
Can i do this calculation for some products only which i choose ?
Thanks.

Re: Multiplication for product qty

Posted: Tue Jul 21, 2020 4:56 pm
by paulfeakins
nickelaj wrote:
Tue Jul 21, 2020 2:12 am
I mean Product price is 5$, customer added 8 quantities to cart , i have to add 8x4 (meters) = 32 pieces.
Just put in the pipe in lengths of 4m with an option to extend by 2m and increase the price accordingly.

Re: Multiplication for product qty

Posted: Tue Jul 21, 2020 11:08 pm
by nickelaj
paulfeakins wrote:
Tue Jul 21, 2020 4:56 pm
nickelaj wrote:
Tue Jul 21, 2020 2:12 am
I mean Product price is 5$, customer added 8 quantities to cart , i have to add 8x4 (meters) = 32 pieces.
Just put in the pipe in lengths of 4m with an option to extend by 2m and increase the price accordingly.
Thanks but it is so long work for all pipes (80 types of pipes)
I am thinking a calculation if i can do it, in the product page i will try ;
(Price * Length(from product) ) * Qty before add to cart.

Re: Multiplication for product qty

Posted: Wed Jul 22, 2020 6:34 pm
by paulfeakins
See what you can do and if you get stuck you could pay a developer such as ourselves or post a job in the Commercial Support Forum.

Re: Multiplication for product qty

Posted: Thu Jul 23, 2020 5:42 pm
by JNeuhoff
Our Instant Option Price Calculator should be able to do that for your pipe products. For example, assuming you have a product option named 'Pipe Length' and a basic product price for 1m, then the option price calculation could be configured for the pipe products like this:

product_price() * option_value('Pipe Length') - product_price()

It would then automatically display the updated price, having added this overridden option price calculation. The displayed price is also updated when changing the cart quantity.

Re: Multiplication for product qty

Posted: Thu Jul 23, 2020 8:25 pm
by nickelaj
JNeuhoff wrote:
Thu Jul 23, 2020 5:42 pm
Our Instant Option Price Calculator should be able to do that for your pipe products. For example, assuming you have a product option named 'Pipe Length' and a basic product price for 1m, then the option price calculation could be configured for the pipe products like this:

product_price() * option_value('Pipe Length') - product_price()

It would then automatically display the updated price, having added this overridden option price calculation. The displayed price is also updated when changing the cart quantity.
Thanks for your intereset. It so usefull for compliacated calculations but i will need it ony for one formula as you said (product_price() * option_value('Pipe Length') - product_price())
So it will cost much for me.