News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Taxes & Calculation Rules Apply to All Products rather than specific Catagories

Started by steved, September 23, 2012, 17:04:44 PM

Previous topic - Next topic

steved

Hi there,

I am having issues when using the Tax calculation rules in Virtuemart Version 2.0.8e.

For the products in the 'commissions' category of the store I wish to show the full price on the product page, however only charge 50% at checkout. (As the customer only pays a deposit). I have gone about achieving this by applying a Tax Rule as follows:



However this applies to every item I add to my cart rather than Just items in the 'commissions' category.

For example - the item "Green Eyes" is in the 'prints' category



The item "Two Subjects" is in the 'commissions' category



However when they are added to the cart the discount is taken from both items rather than just "Two Subjects"



The issue also occurs when I Set the discount on an individual product rather than using the category feature.

I have tried the fix located at http://forum.virtuemart.net/index.php?topic=98178.0 but it did not work

Thank you for any help you can give

Additional info:
Joomla Version: 2.5.4 Stable
PHP: 5.3.3

bowie


GJC Web Design

What I've found specifically for "Tax per Bill" is there is no Category check at all in the code

This fixes it on my install  - 2.0.18a

File - administrator/components/com_virtuemart/helpers/calculationh.php
function gatherEffectingRulesForBill($entrypoint, $cartVendorId=1)

around line 986 -add after block

$hitsShopper = true;
if (isset($this->_shopperGroupId)) {
$hitsShopper = $this->testRulePartEffecting($shoppergrps, $this->_shopperGroupId);
}


//GJC - check category
$q = 'SELECT `virtuemart_category_id` FROM #__virtuemart_calc_categories WHERE `virtuemart_calc_id`="' . $rule["virtuemart_calc_id"] . '"';
$this->_db->setQuery($q);
$taxcategories = $this->_db->loadResultArray();
$hitsCats = true;
if (isset($this->_cats)) {
$hitsCats = $this->testRulePartEffecting($taxcategories, $this->_cats);

}
//GJC


then change line

if ($hitsDeliveryArea && $hitsShopper ) {

to

if ($hitsDeliveryArea && $hitsShopper && $hitsCats) {//fix for cat filtering GJC

works for me but haven't tested with country filters etc
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation