News:

Looking for documentation? Take a look on our wiki

Main Menu

Dig deep into tax/calculation rules

Started by veeco, June 26, 2012, 21:24:10 PM

Previous topic - Next topic

veeco

Hello, i'm studying vm2 at the moment, and try to understand about tax/calculation rules. I'm using VM 2.0.6 in J2.5.6 with sample data installed

Here are my question:
1. How to create discount for specific item ? because if i create a rule without specify category and shopper group, all item get discounted as well, because every item is set 'use by generic rules'. Is there a way to create a rule and tell VM2 that 'this is a rule but don't use it as generic rule' ?

2. How to add 'Type of Arithmetic Operation' option ? i want to create rule for a discount program that calculate based on total cart, ex "Discount 20% for order bigger than $500", so the rules should be "Total Price Modifier after Tax", thinking to add another field as the limit (ex. 500), but if cannot add a field, maybe the value would be on specific format like '20%|500'

Thanks
Work On Doxa Web Developer Indonesia - http://doxadigital.com |

veeco

i'm trying to look at the code: vmCalculationPlugin.php
it seem it refer to a table:
$this->_tablename = '#__virtuemart_calc_plg_'. $this->_name;

but i don't such table exist.

Can someone point out where the custom calculation can be done..

i take a look at helpers/calculationh.php and views/calc/view.html.php

it seem the calculation parts  is hard coded ? is that mean someone have to 'hack' to extend it ?

Thanks
Work On Doxa Web Developer Indonesia - http://doxadigital.com |