Reputation: 87
Here is the issue.
I had a product say "Love Bird" which price is 10$. Now is option I have Cage having price 5$.
If a customer order 3 lover birds Price = 30$ but when he select cage as well. It should add 30+5 =35 but it works different in opencart. (10 + 5)*3=45 basically (10*3)+(5*3).
I don't know how to overcome this basis issue in opencart system.
Upvotes: 0
Views: 2167
Reputation: 121
This isn't going to be an easy one to do, as I think multiple files will need to be edited for this to happen.
As a start though - and the main bit of code to change, in the file system\library\cart.php
you can replace this:
'price' => ($price + $option_price),
'total' => ($price + $option_price) * $quantity,
With this:
'price' => ($price + $option_price),
'total' => (($price * $quantity) + $option_price),
This WILL completely replace the existing option method though, and will give you fixed priced options throughout (once all other files edited as required).
Upvotes: 1