#219 – Disable "Add to Cart" when Product not available

Posted in ‘Catproduct’
Hi,

maybe I've overseen this option, but how can I disable the "Add To Cart" button, if a product is not available / out of stock?

We need to remove it. At the moment it looks like this:
http://gws-schlobohm.de/online-shop/gws-zubehoer-fuer-ladungssicherung/gws-endbeschlagteile-fur-zurrgurte-detail

best regards,
Björn

--
VM 3.0.18 / J3.6.4 / CatProduct 3.2.2
pixeldiele
Hello,

I don't know version of Catproduct you use, but lets try:

Open catproduct layout that you use (for example ROOT/plugins/vmcustom/catproduct/catproduct/tmpl/default.php)

and search for something like

<input type="submit" name="addtocart" class="addtocart-button"

just a little above is code like this:

if (!VmConfig::get('use_as_catalog', 0) && $see_price) {

change it into

if (!VmConfig::get('use_as_catalog', 0) && $see_price && $i > 0) {

I believe this should do. Try it.

Best Regards,
Maja
maja_mlinar

This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.

About the author

Who‘s behind this

Demo

Maja Mozina Mlinar

founder
Demo

Sandi Mlinar

procurator

info@sm-planet.net

Skype: maja.mozina1