Copter.bg Posted December 18, 2019 Share Posted December 18, 2019 Hello everyone! I am having quite the trouble. As everyone knows, this piece of code is used to hide the Add to Cart button in the product.tpl when the applied conditions are met: <div{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || (isset($restricted_country_mode) && $restricted_country_mode) || $PS_CATALOG_MODE} class="unvisible"{/if}> </div> I am using a module called One Click Order which has a button that is displayed below my Add to Cart button. In the One Click Order hook tpl I use the code above to hide the One Click Order button when the Add to Cart button hides. It has been working like that for over two years. But as of today it's not working anymore. Add to Cart button is displayed or hidden when the IF conditions are met, but the One Click Order button stays hidden no matter what. My prestashop version is 1.6.0.6. Yesterday i changet my PHP version from 5.4 to 5.6, could that be the problem? Link to comment Share on other sites More sharing options...
PCQUATRO Posted December 19, 2019 Share Posted December 19, 2019 16 hours ago, Copter.bg said: My prestashop version is 1.6.0.6. Yesterday i changet my PHP version from 5.4 to 5.6, could that be the problem? If that´s the only change you made, off course… you have to adapt the code to make te button show or hide to the new PHP version, check the console for errors. You say that the add to cart does what it should so replicate the code for your one click button... Best Regards 1 Link to comment Share on other sites More sharing options...
Copter.bg Posted December 19, 2019 Author Share Posted December 19, 2019 Hello, Actually I just managed to fix this issue. It turned out to be a hook problem. Now everything is working perfect. Link to comment Share on other sites More sharing options...
PCQUATRO Posted December 19, 2019 Share Posted December 19, 2019 1 hour ago, Copter.bg said: Hello, Actually I just managed to fix this issue. It turned out to be a hook problem. Now everything is working perfect. Nice Best Regards 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