VirtueMart 1.1.x [ Old version - no longer supported ] > Products, Prices, Tax and Categories VM 1.1

Problem with Attributes not showing discounted prices.

<< < (3/3)

thrinodos:
Same problem here...any solution found???

janwetzer:

--- Quote from: thrinodos on June 17, 2011, 02:08:59 AM ---Same problem here...any solution found???

--- End quote ---

Any solutions found yet?.... :)

scept1c:
the same(

automatikas:
If anyone still need a solution:

administrator\components\com_virtuemart\classes\ps_product_attribute.php

Around line 760, change the code to the following


--- Code: ---$price = floatval( substr( $base_value, strrpos( $base_value, '[' ) + 2 ) ) * (1 + @$_SESSION['product_sess'][$product_id]['tax_rate']) ; // calculate Tax
} else {
$price = floatval( substr( $base_value, strrpos( $base_value, '[' ) + 2 ) ) ;
}
// Apply product discount to Attribute
$q = "SELECT product_discount_id FROM #__{vm}_product WHERE product_id=$product_id" ;
$db->query( $q ) ;
$db->next_record() ;
$discount_id_var = $db->f("product_discount_id");
$q = "SELECT amount FROM #__{vm}_product_discount WHERE discount_id=$discount_id_var" ;
$db->query( $q ) ;
$db->next_record() ;
$item_discount_var = $db->f("amount");
$price *= 1 - ($item_discount_var / 100) ;
// Apply shopper group discount
--- End code ---

tested on J1.5.23, VM1.1.9

andrewau:
thank automatikas that worked a treat.

Navigation

[0] Message Index

[*] Previous page

Go to full version