I am trying to modify the way virtuemart (shopping cart module in joomla) adds its attribute prices to a product. At the moment you can add or subtract a price to the product which is then multiplied by the quantity amount.
Eg: Product Playstation 3 is $700
If they add an attribute, Playstation Controller $70
And they want 5 playstation’s all up, the calculation is =(700 + 70) x 5.
What we are trying to do is to have the attribute as a fixed cost ontop of the product cost so the equation will be =(700 x 5) + 70.
When you add the attribute in the back end you add a symbol (+), (-) or (=) depending on if you are adding or subtracting.
So far I have made it to accept an extra symbol “^?? which will be used for a fixed price on-top of the product cost post quantity multiplication.
The files to change the calculating pricing are listed in the administrator/component/virtuemart/classes
The calculation for attributes is in [login to view URL] file under lines 1799 and 1800, I have added these lines myself but still not getting desired results.
What i need the equation to be for line 1800 is either:
(product price X quantity) + Attribute; or
(product price +(Attribute / Quantity)) X Quantity
So far the fields I know are:
Product price = $price['product_price']
Attribute value = $modifier
What I need is the field that indicates the selected quantity.
For testing purposes I am using the product labeled “aa?? under products/standard ncr
Logins and passwords provided after confirmed price and agreement
start immediately
David Birch
[login to view URL]