#103 – Calculation problem

Posted in ‘Easycheckbox’
  Hello, I have problem with this script ...

In VM Product details page, I have original price of product (10 kn), option checkbox (+100 kn) and +/- quantity box. And script is only work like this:

PRICE (10 kn) + OPTION (100 kn) x QUANTITY (50 pieces) or
10 + 100 x 50 = 5500 (Final price)

how to make work like this:
PRICE (10 kn) x QUANTITY (50 pieces) + OPTION (100 kn) or
10 x 50 + 100 = 600 (Final price)

I want that OPTION (100 kn) is calculate only 1 time no matter what is the amount in quantity box.

Hope you understand.
Thank you !
Vince
Hello,

Well, this is how variant plug-ins work. It's not an issue. Cause product price is change, for 1 piece not for all qty.

Well, you could try to change the srcipt inside easycheckbox.php, inside function :

public function plgVmPrepareCartProduct

find

$modificatorSum += $custom_price;

and try to change it to
$modificatorSum += ($custom_price / $product->quantity);

I'm not sure this would work, but you can try.

Best Regards,
Maja
maja_mlinar
Thank you Maja, it´s work!
Vince

This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.

About the author

Who‘s behind this

Demo

Maja Mozina Mlinar

founder
Demo

Sandi Mlinar

procurator

info@sm-planet.net

Skype: maja.mozina1