Add to basket – product variations

This topic has 6 replies, 3 voices, and was last updated 8 years, 5 months ago ago by Jack Richardson

  • Avatar: radical
    radical
    Participant
    June 15, 2016 at 09:32

    Hi,

    On a product with variations, if I click ‘add to basket’ without first choosing a selection, the following modal pop-up appears: “Please select some product options before adding this product to your cart”

    After pressing ‘OK’ I then get a pop-up to say that the item has been successfully added to shopping cart. However, this is not case as when I go to checkout it states in red: “You cannot add that amount of “ELTER” to the basket because there is not enough stock (0 remaining).”

    This doesn’t make sense, it should not be possible to even add the default product to shopping cart, without first making a selection.

    Even with the option ‘Enable stock management at product level’ disabled, I can repeat the same steps, only this time the default product is added to the cart which doesn’t make sense either.

    Stock is managed at variation level just to point out.

    Is there a way of disabling the add to cart button until a selection (variation) is made? or preventing the product being added to the cart, as this is what the first pop-up suggests but is now the case.

    Thank you in advance

    Please, contact administrator
    for this information.
    5 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    June 15, 2016 at 10:21

    Hello,

    Please provide us with WP Dashboard credentials in private content.

    Best regards,
    Jack Richardson.

    Avatar: radical
    radical
    Participant
    June 15, 2016 at 10:37

    Thank you for such a quick reply. Information supplied below:

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Support staff
    June 15, 2016 at 12:07

    Hello,

    I’ve disabled “Ajax Add to Cart” option in Theme Options > Single Product Page.
    Please clear browser cache and check the page now.

    Regards,
    Eva Kemp.

    Avatar: radical
    radical
    Participant
    June 15, 2016 at 12:53

    Thank you Eva, though I would prefer to use ‘Ajax Add to Cart’ as this looks really nice.
    I decided to go with a CSS based soution:

    .woocommerce-variation-add-to-cart-disabled{
       opacity: 0.3;
       pointer-events: none;
       cursor: default;
    }

    which prevents the add to cart button from being clicked until a selection is made. Posted the code here in case you have any reservations about it, or to benefit others.

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    June 15, 2016 at 13:31

    Hello,

    We’re glad you’ve found the solution and thank you for sharing the code.

    Best regards,
    Jack Richardson.

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

The issue related to '‘Add to basket – product variations’' 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.