pasivnyprijem Posted November 27, 2011 Share Posted November 27, 2011 Hi, Anybody know when and how is are the variables: $special.price_without_reduction $special.reduction_percent loaded in the page? and if there is any way trough a module to load some information before this 2 variables are loaded? please thanks Link to comment Share on other sites More sharing options...
luci1 Posted November 28, 2011 Share Posted November 28, 2011 Hi, I haven't find these variables while searching in the code, in which template is it used ? Link to comment Share on other sites More sharing options...
pasivnyprijem Posted November 29, 2011 Author Share Posted November 29, 2011 Sorry from the template its in the product.tpl and the variables are like: var reduction_percent = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'percentage'}{$product->specificPrice.reduction*100}{else}0{/if}; I want to change the price reduction from a module but its cant be as the specificprice price is handled be a class which is loaded before the page. So I tought I could manualy override the variables maybe. Link to comment Share on other sites More sharing options...
pasivnyprijem Posted November 30, 2011 Author Share Posted November 30, 2011 or if somebody could help to understand in the product tpl you have a line "var specific_price_to = '{$product->specificPrice.to}';" I need to know how is defined the $product->specificPrice.to where is it defined and how. Link to comment Share on other sites More sharing options...
luci1 Posted December 1, 2011 Share Posted December 1, 2011 Hi, I think it's defined in the priceCaclulation function from the Product.php class, but I'm not sure. Link to comment Share on other sites More sharing options...
pasivnyprijem Posted December 1, 2011 Author Share Posted December 1, 2011 I assume aswell this is done in some class but I need a manual owerride from a module Link to comment Share on other sites More sharing options...
luci1 Posted December 2, 2011 Share Posted December 2, 2011 Well maybe you can do it through a hook. Link to comment Share on other sites More sharing options...
pasivnyprijem Posted December 2, 2011 Author Share Posted December 2, 2011 Im doing it trough a hook (to the header) but anyway the classes are loaded befor any hook so I need to overwrite somehow the data from the classes any idea? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now