This tutorial shows you how to enable variation buttons on shop pages and allow customers to add products to cart directly from the shop page using the Variation Buttons Pro plugin.
Prerequisites
- WooCommerce installed and activated
- Variation Buttons Pro plugin installed and activated
- Variable products with attributes set up

Step 1 : Configure Global Settings
- Navigate to WooCommerce > Variation Buttons > General tab
- Check “Enable variation buttons globally for all variable products”
- Select your color attribute from the dropdown (e.g., “Color”, “Colour”, “Shade”)
- Assign colors to each attribute value using the color pickers
- Set selected colors for each attribute value (optional)
- Choose your button size (Small, Medium, or Large)
Step 2 : Enable Variation Buttons on Shop Pages
- Navigate to WooCommerce > Variation Buttons > Shop tab
- Check the box next to “Enable variation buttons on shop and archive pages”
- Select where the buttons should appear:
- Before Price
- After Price (default)
- Before Add to Cart
- After Add to Cart
4. Select the button size for shop pages:
- Extra Small (30px)
- Small (40px)
- Medium (50px, default)
- Large (60px)
Step 3 : Enable Add to Cart from Shop Pages
- In the Shop tab settings, check the box next to “Enable Add to Cart”
- The full label reads: “Enable customers to add products to cart from shop/archive pages”
2. Save your settings
How It Works
Once enabled, customers can:
- See variation buttons for each product on the shop page
- Click buttons to select attributes (e.g., Color: Red, Size: Large)
- Once all required attributes are selected, the add to cart button appears
- Click add to cart to add the product with selected variations directly to the cart
- The cart updates via AJAX without requiring a page refresh
Optional Customization
The Variation Buttons Pro plugin offers additional customization options for shop pages:
- Use Variation Image: Display variation images as buttons instead of text or color
- Use Product Image as Fallback: Use the main product image when a variation has no image
- Variation Image Size: Select the image size (Thumbnail, Medium, Large, Full Size)
- Hide Variation Names: Hide the text on buttons
- Hover Color Type: Override global hover settings for shop pages
- Selected Color: Set a specific color for selected buttons
Note : On shop/archive pages, attribute labels are automatically hidden and buttons are centered for a cleaner appearance.
Testing
After configuring your settings:
- Visit your shop page
- Look for variable products – you should see variation buttons instead of dropdowns
- Click different variation buttons to see the hover and selected states
- If “Enable Add to Cart” is enabled:
- Select all required attributes for a product
- Verify the add to cart button appears
- Click it and confirm the product is added to your cart
- Check that the cart updates without a page refresh
Troubleshooting
If variation buttons don’t appear on shop pages:
- Verify “Enable on Shop Page” is checked in the Shop tab
- Ensure the product is a variable product with attributes set up
- Check that variation buttons are enabled globally or for that specific product
- Clear any caching plugins
If add to cart doesn’t work :
- Verify “Enable Add to Cart” is checked in the Shop tab
- Ensure all required attributes are selected
- Check browser console for JavaScript errors
- Verify WooCommerce is up to date
If colors don’t display correctly :
- Check that you’ve selected the correct color attribute in global settings
- Verify colors are assigned to attribute values
- Check if product-level settings are overriding global settings

Leave a Reply