• Resolved WebmasterNYC01

    (@webmasternyc01)


    I am using short code for “add to cart.” For a variable product it redirects to the product page.

    I am looking for a way to add a variable product to cart without redirecting to the product page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Kaushik S. a11n

    (@kaushiksomaiya)

    Hi there @webmasternyc01!

    Thanks for contacting us.

    I understand you are using [add_to_cart id="IDHERE"] shortcode, but you want it to add variable products to the cart without redirecting to the product page.

    In this case, you can do the following:

    1. Ensure the variations do not have “Any Attribute..” option – They must be assigned an attribute value.
    2. Use variation ID in [add_to_cart id="VARIATION_ID_HERE"] instead of the product ID.

    You’ll find the variation IDs under the Variations tab.

    I hope this helps! ??

    Thread Starter WebmasterNYC01

    (@webmasternyc01)

    Is there a way to display variations in drop down instead of creating a listing for each variation?

    Mirko P.

    (@rainfallnixfig)

    Hi @webmasternyc01,

    Is there a way to display variations in drop down instead of creating a listing for each variation?

    Not out of the box in WooCommerce but you can use a plugin like https://www.ads-software.com/plugins/display-product-variations-dropdown-on-shop-page/ or custom code and here is an example.

    * Make sure to save a full backup before you install plugins or add custom code to your site.

    Hope this helps.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Variable product’ is closed to new replies.