Addify Flash Sale! Get Flat 30% Off on all Addify Extensions . Hurry Up and Save Big! Use Coupon Code: Flashify30.

How to Add Attributes & Variations to Products in WooCommerce

When you have a large number of products in your WooCommerce store, you’ll need to categorize them in a variety of ways. WooCommerce comes with a variety of taxonomies or grouping mechanisms, including categories, tags, and attributes, by default. In this guide, we will take a look at how WooCommerce Products by Attributes & Variations plugin can make your products more accessible to customers. 

Add Product Variations in WooCommerce – Methods

There are two basic methods to add attributes and variations to products in WooCommerce.

  1. Products By Attributes and Variations for WooCommerce by Addify
  2. Add Attributes & Variations to Products in WooCommerce Programmatically

Method #1: Products By Attributes and Variations for WooCommerce by Addify

The Products by Attributes & Variants plugin allows you to display variations on listing pages in two ways: 

1) As simple products

2) As product attributes

Allow customers to identify relevant variations from shop pages and add products to their basket without having to visit the product detail page. This will help in improving your user experience.

FeaturesProgrammatical SolutionProducts by attributes and variations by Addify
Show variations as individual products on the shop page.Noyes
Show variations as individual products on the listing page.Noyes
Show attribute drop downNoyes
Convert attributes to simple products.NoYes
Add to cart from shop page.Noyes
Customizable variationsNoyes
Variations for specific products and categories.Noyes
Add attributes and variations to products.yesyes
Classify products by attributes and variations.yesyes

Installation

  1. To install this plugin, search the .zip file from your WooCommerce account and start the download.
  2. On the WordPress Admin Panel, go to Plugins and choose Add New. Upload your plugin here by choosing the downloaded file.
  3. Click on Install Now and then Activate.

Setup and Configuration

As you activate the plugin, you can view the “Products by Attributes” section under the WooCommerce admin panel.

Show Variations as Simple Products

WooCommerce Products By Attributes and Variations plugin provides you the option to display variations as simple products. To enable the settings, go to variations on the shop page and select ‘Show Single Variations’ settings. You can configure the following settings:

  • Allow variations to be displayed as single products on listing pages
  • Remove parent product from the listing pages
  • Specify products and categories so that their variations can be displayed as simple products
products by attributes and variations for woocommerce

Exclude Specific Attributes from Showing as Simple Product

Any attribute, such as size, can be hidden from display as simple products on the shop page. Navigate to the attributes tab on the product edit page.

To hide size or any other attribute for a given variable product, select the checkbox “Exclude from products as variants.”

Note: It is not feasible to omit the entire attribute from global settings due to technological limitations; instead, you must disable the attribute for each product from its product edit sheet.

products by attributes and variations for woocommerce

Exclude Specific Variation from Showing as Simple Product

Using this plugin, you can choose to remove specific variations to be displayed as simple product on the shop page. Navigate to the variations tab on the product edit page, where you’ll see the following settings under each variation:

  • Check this box to prevent this product from being displayed as a simple product
  • Give your product a unique title
products by attributes and variations for woocommerce

Customize Sorting Order

With the WooCommerce Products By Attributes and Variations plugin, you can sort order of the variations on the shop page. 

From the Product edit page, go to the Variation tab. Here you can change the default menu sorting order for each variation.

Display Attributes Selection on Listing Pages

You can get the option to display attributes selection on listing pages. To enable this, go to variations on the shop page and then Display Variation Dropdown Settings. Here you can set the following settings:

  • Enable/Disable variations dropdown
  • Display variations for specific products & categories on the listing pages
  • Show quantity box on listing pages
  • Enable/Disable Toggle mode and change its title
  • Enable toggle mode to display variations with a button
products by attributes and variations for woocommerce

Method #2: Add Attributes & Variations to Products in WooCommerce Programmatically

Let’s take a look at the program-based implementation of Products by Attributes & Variations in WooCommerce.

add_action( 'init', array($this, '_change_loop_add_to_cart'), 10 );

function _change_loop_add_to_cart() {

remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );

add_action( 'woocommerce_after_shop_loop_item', '_template_loop_add_to_cart', 10 );

}

function _template_loop_add_to_cart() {

global $product;

if ( ! $product->is_type( 'variable' ) ) {

woocommerce_template_loop_add_to_cart();

}

}

End Note

We hope this guide has provided you with the necessary information to assist you in the successful implementation and configuration of WooCommerce Products by Attributes & Variations plugin. If you come across any further queries, get in touch with our responsive support team. 

Avail The Opportunity

Subscribe to Our Updates and Newsletters.