bloggus Posted April 17 Share Posted April 17 (edited) Hi, Have problem with this core function. It gives me strange outputs for a product price. I want one price with tax and one without. Also I want it to take into account price reductions. What is givs me back is same price, even if I set $useTax to true och false. Also it calculated wrong price. Seems it outputs: calculated price = "price-without-tax" - "price-redution-with tax" Any thoughts on that fuction? Edited April 17 by bloggus (see edit history) Link to comment Share on other sites More sharing options...
Prestashop Addict Posted April 17 Share Posted April 17 Please can you specify PS, PHP versions, and more context, where do you use this code, module, override, smarty... Link to comment Share on other sites More sharing options...
Knowband Plugins Posted April 17 Share Posted April 17 I think priceCalculation function depends on various other parameters as well like group, country etc to calculate the tax price. I hope you passing the correct parameters in the function. Link to comment Share on other sites More sharing options...
bloggus Posted April 17 Author Share Posted April 17 Is a module I'm testing out. PS 8.2.1 php 8.1.x The rest of the parameters are basically default, like country, group etc. Changing the UseTax to true/false/0/1 give e the same straneg result. It is like tax is not used at all. Shop has been around for many years, so no problems there with that. Link to comment Share on other sites More sharing options...
bloggus Posted April 17 Author Share Posted April 17 (edited) Figured it our partially. Seems like $id_country = self::getDefaultCountry(false); not really gives the default country. See it is depreciated since long time. Edited April 17 by bloggus (see edit history) Link to comment Share on other sites More sharing options...
Prestashop Addict Posted April 17 Share Posted April 17 Where code is used in your module, admin, front, controller? Link to comment Share on other sites More sharing options...
bloggus Posted April 17 Author Share Posted April 17 In module classes. Link to comment Share on other sites More sharing options...
Prestashop Addict Posted April 17 Share Posted April 17 il y a 39 minutes, bloggus a dit : In module classes. admin or front? Link to comment Share on other sites More sharing options...
bloggus Posted April 17 Author Share Posted April 17 Found the issue. It was just wrong assigment of the country in this case. Thank you anyway to you all! 1 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