Community Forums

calculate new price and update column price in products

Coding & concept discussion for OpenCart v1.x development

calculate new price and update column price in products

Postby bertjebel » Fri May 25, 2012 2:12 am

I have been looking for a module that add's margin and extra costs and recalculate it as price.

Since there isn't a module like that i want to try it myself. No problem with adding fields into table products and updating them.

What i can't seem to find out is how i get this -- (cost price * margin) +extra cost + extra cost1 -- into table products and the column price. It seems to be done in admin/controler/catalog/product.php but how??

i think it has to be something like this

$updated_price = ($cost_price * margin) +$extra cost + $extra cost1);
$updated_price == $price;


anyone idea's on how to script that? I'm not a great scripter
User avatar
bertjebel
 
Posts: 95
Joined: Tue Jun 21, 2011 3:17 am

Return to Concepts

Who is online

Users browsing this forum: No registered users and 10 guests

Hosted by Arvixe Web Hosting