Category/shop page: Buy now on swatch attribute?

This topic has 7 replies, 2 voices, and was last updated 3 years ago ago by demzie

  • Avatar: demzie
    demzie
    Participant
    November 12, 2021 at 16:08

    Hi,

    Howto create a buy now of the swatches on the categorypage?
    Like i only have T-Shirts with sizes below them.. i want the use to be able to cling a swatch size and then it gets added to the cart.

    Thanks.

    6 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 12, 2021 at 16:21

    Hello,

    Watch this video – https://youtu.be/LgzC4iK-j6A
    You can select Default Form Values – https://gyazo.com/7e4d5f496fc50b5a7a9184da97f5aef2 and enable “Redirect to the cart page after successful addition” – WooCommerce > Settings > Products > General

    Regards

    Avatar: demzie
    demzie
    Participant
    November 12, 2021 at 16:24

    Yes, i have it already in place.
    But they need to link: as a add to cart function.

    Without the add to cart button haha

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 12, 2021 at 17:06

    There is no such possibility, unfortunately.
    You can enable the Add to cart button via Theme Options > WooCommerce > Shop > Products style > Product Content Elements

    Regards

    Avatar: demzie
    demzie
    Participant
    November 12, 2021 at 17:27

    Ahhh to bad!

    When i want to edit the whole code of the swatches on the shop/category page..
    What file do i use? for my child theme?

    Thanks.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 13, 2021 at 14:34

    Hello,

    The functionality of variation swatches come from XStore Core plugin, not the theme.
    Check code in et-core-plugin/packages/st-woo-swatches/public/partials/class-st-woo-shop.php file and other files on the mentioned folder.

    Regards

    Avatar: demzie
    demzie
    Participant
    November 14, 2021 at 08:38

    Okay thank you!

  • Viewing 7 results - 1 through 7 (of 7 total)

The issue related to '‘Category/shop page: Buy now on swatch attribute?’' has been successfully resolved, and the topic is now closed for further responses

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.