musicmaster Posted January 13, 2023 Share Posted January 13, 2023 I have a problem with the Attribute Wizard Pro module: it displays the prices excl. VAT. When I searched for the cause I found that AWP uses a flag with the name "displayPrice" to indicate whether products should be displayed with or without VAT. It appears that Thirty Bees has in js/tools.js a function with the name displayPrice() and that interferes with this variable. This function is only present in Thirty Bees - not in Prestashop. Does anyone have a proven solution to solve this? Link to comment Share on other sites More sharing options...
datakick Posted January 13, 2023 Share Posted January 13, 2023 There's no simple solution, it's a name conflict. One of the implementation will have to change the name. This time, the conflict is between core and module. But it could very easily be conflict between two modules, if they both use same names in global namespace. Module authors should be careful to not pollute global namespace much. If they need to do so, they should use some prefixed variables. For example, i used 'revwsData' for my only global javascript variable in my revws module. This variable is an json object of other variables. There is very low chance for conflict this way. Declaring global variable 'displayPrice' was not very smart. It was not smart by AWP module author. And it was not smart by tb developers to declare this new function in global namespace as well. But what's done is done. I'm not sure what tb modules and themes adopted this new javascript function, so it would be quite risky to move it to some namespace now. You can ask module author to change their implementation, as nothing depends on that. 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