Setting Tax / Caluclation Rules Product wise rather than category

Started by MitEsp, January 02, 2013, 07:59:50 AM

Previous topic - Next topic

MitEsp

Hi,

I am totally new to Joomla / VM , but have some PHP coding knowledge.

I am setting up a VM store (Joomla 2.5.4 / Virtuemart 2.0.10 with istraxx_quantity plugin installed.

I have different product categories and different shopper groups. I am able to set different calculation rules for different shopper groups, only product categorywise - all product categories / selected product category(ies). - it works fine.

But, I have a slightly different requirement for which I need a solution :

I need to set the rules for individual products - NOT product categories, because within the same product category, for different products the rules are quite different. I understand that a possible solution is to have as many unpublished categories for each product and thus use these unpublished product categories for setting the rules. But it is complicated since I have at least around 30 different categories with around 20 to 40 products under each category - around 1000 products in total. I need to set the rules for each of the individual 1000 products and not the 30 categories. If I were to use unpublished categories, it would mean i need to create at least 1000 unpublished categories, which is going to be cumbersome.


Any solution - by which I can assign the rules to each product than category? If that would mean hacking the code, can anyone (@Milbo - Hi, I believe you are the guy behind this calculations part, can you please help me?) suggest how I could do that - tutorials for hacking the code etc...?

Thanks in advance for all your valuable help.

Regards
Chan


Parsimonious

I would like some kind of solution for this as well. Currently I override prices in my clearance category, but doing that means I can't show the original price with a strikethrough. I thought I could just create a rule and apply it at product level but can't figure out how to do that. Every item in clearance has a different discount so I can't apply it to the whole category.

jjk

Not shure if I understand correctly what you are missing. You can set up as many rules as you like. You don't have to limit rules to a category or shopper group (just leave the category and/or shopper group fields empty). Then you can select any published rule you like from the product edit view - Product pricing section - Rule(s) Affecting dropdown list (currently limited to 'None', 'All' or a single rule).

Alternatively you using coupons might work for you.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Parsimonious

I think I understand now. I think part of the confusions was because products have "apply generic rules" as the default setting. So I couldn't figure out how to create a rule that wouldn't automatically affect everything else in that category. To apply it per product then all other products need to have "apply no rule" set. This really isn't an ideal set up because sometimes you might want to apply a rule on a category basis, and sometimes on a product basis. To switch to a category rule you'd have to go into each product and change the setting again. Maybe there should be a way to set some rules that can only be applied on a per product basis. Not really sure how that would be accomplished.

jjk

Quote from: Parsimonious on February 02, 2013, 19:21:39 PM
I think I understand now.
I think there still is a misunderstanding on your side. I didn't test all possible combinations of rules myself yet, but if you set for example a rule as a profit margin and assign it to a single category, it will be automatically, the profit margin will automatically be applied to all products in that category. If you leave the category selection field blank or select all, it will be applied to all categories.

If you want to set up i.e. 100 rules as 'Price Modifier before Tax' and publish all 100 rules, they will not be applied to each product automatically. Instead you have to pick one of them in your individual product edt view from the 'Rule(s) Affecting' drop down list. So every product can have a different rule.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations