Jump to content

Hiding a module from product page


Copter.bg

Recommended Posts

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

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

  • Thanks 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...