Home Forums Basel support forum Show Attribute Swatch when shop is in catalogue mode

Show Attribute Swatch when shop is in catalogue mode

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #20472

    wizard247
    Participant

    Hi,

    I have Catalogue Mode enabled, yet I want to show the Attribute Swatch on the single product page after Short Description.

    Is it possible to enable this with an “add action” hook in functions.php?

    The attribute swatch I have set is “pa_available-colours” – it works fine when shop is enabled, but it is removed in Catalogue mode.

    I don’t need them to be selectable, I just want the visitor to see which colours are available.

    The link I have attached below should have two colours in the swatch, black and grey.

    Thanks,
    Wizard247

    #20479

    Artem Temos
    Keymaster

    Hi,

    These attributes are connected to add to cart button and that is why being hidden with catalog mode. You need to disable this option and then simply hide all shopping elements with CSS to leave attributes swatches.

    Regards

    #20482

    wizard247
    Participant

    Yes – that is the “dirty fix” – this leaves the Add to Cart functionality enabled which is what I don’t want as it makes the attribute swatches clickable and it will say that there are no products with this combination and keep all sorts of loops going to the cart and checkout pages.

    Can I not inject this code snippet in the single product template so that it is always showing? Should be able to do this, right? Somehow… 😉

    I’ve tried via a function in functions.php but I think I need to add it straight into the template but not sure how it is called.

    Thanks,
    Wizard247

    #20486

    Artem Temos
    Keymaster

    The problem is that attributes swatches and add to cart comes with the same function in WooCommerce plugin. And if you want to disable the button only you may need to modify plugin’s template files.

    #20513

    wizard247
    Participant

    It’s OK – I understand – I have fixed it with a neat little plugin and some Attribute tab description manipulation. 🙂

    Thank you.

    #20515

    Artem Temos
    Keymaster

    We are glad that you have found the solution 🙂

    Kind Regards

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Show Attribute Swatch when shop is in catalogue mode’ is closed to new replies.