Skip to content
0

How to Convert Simple Products to a Variable Product in WooCommerce

This guide provides a step-by-step process for converting two existing, separate "Simple Products" in WooCommerce into a single "Variable Product." This is a common challenge, for instance, after importing product variations from a marketplace like Amazon, which may appear as individual items in WooCommerce.

The primary goal is to merge these simple products while preserving the existing product URL, SEO value, and customer history of one of the products. This method is preferable to creating a new variable product from scratch and deleting the old ones.

We will use two example products for this guide:

  • Sound Rise II - Black (This will be our base product)
  • Sound Rise II - Wood Taupe

Prerequisites

Before you begin, ensure you have the following plugins installed and activated, as they are essential for a good user experience with variable products:

  • Variation Swatches for WooCommerce: To display color options as selectable swatches.
  • Variation Images Gallery for WooCommerce: To allow each product variation to have its own image gallery.

Step-by-Step Guide

We will use the existing Sound Rise II - Black product as the foundation for the new Variable Product and merge the data from the Sound Rise II - Wood Taupe product into it.

Phase 1: Prepare the Existing Products

  1. Gather Data from the Secondary Product (Wood Taupe):

    • Navigate to Products → All Products.
    • Find the Sound Rise II - Wood Taupe Simple Product and click Edit.
    • Crucially, copy its SKU, Price, and Stock Quantity to a safe place. You will need this information in Phase 4.
  2. Prepare the Primary Product (Black):

    • Go back to Products → All Products.
    • Find the Sound Rise II - Black Simple Product and click Edit.
    • Rename the product to a generic title that covers all variations, such as Sound Rise II. This will become the main name for the single product page.

Phase 2: Create the "Color" Attribute

If you already have a global Color attribute, you can skip this phase.

  1. Navigate to Attributes: In the WordPress dashboard, go to Products → Attributes.
  2. Create the Attribute:
    • Name: Color
    • Click Add attribute.
  3. Configure Terms:
    • On the Attributes page, find the new Color attribute and click "Configure terms".
    • Add Black and Wood Taupe as new terms if they don't already exist.

Phase 3: Convert the Primary Product and Apply Attributes

Now, we'll modify the primary product (which you renamed to "Sound Rise II").

  1. Change Product Type:
    • In the Product data section, change the dropdown from Simple product to Variable product.
  2. Go to the Attributes Tab:
    • Click on the Attributes tab.
    • In the dropdown menu, select the global Color attribute and click Add.
  3. Configure Attribute Settings:
    • In the Value(s) field, select both Black and Wood Taupe.
    • CRITICAL: Check the box for "Used for variations".
    • Click Save attributes.

Phase 4: Create and Configure Variations

This is where you'll use the data from both original products.

  1. Go to the Variations Tab:
    • Click on the Variations tab.
  2. Generate Variations:
    • From the dropdown menu, select "Create variations from all attributes" and click Go.
    • Confirm the alert. Two new variation panels, Black and Wood Taupe, will be created.
  3. Configure the Black Variation:
    • Expand the Black variation panel.
    • Image: Upload the main image for the black product.
    • SKU, Price, Stock: Since this was the base product, its original SKU, Price, and Stock data may already be filled in. Verify that this information is correct.
    • Manage Stock: Ensure this box is checked and the Stock quantity is accurate.
  4. Configure the Wood Taupe Variation:
    • Expand the Wood Taupe variation panel.
    • Image: Upload the main image for the wood taupe product.
    • SKU: Enter the SKU you saved from the original Wood Taupe product in Phase 1.
    • Regular Price: Enter the price you saved.
    • Manage Stock: Check this box and enter the stock quantity you saved.
  5. Save Changes: Click Save changes in the Product data box, and then click the main Update button to save the product.

Phase 5: Decommission the Secondary Product

  1. Verify the New Variable Product:
    • Go to the product page on your website.
    • Ensure that both the Black and Wood Taupe color swatches are visible and selectable.
    • Check that the product image, price, and stock information update correctly when you switch between variations.
  2. Delete the Old Simple Product:
    • Navigate to Products → All Products.
    • Find the original Sound Rise II - Wood Taupe Simple Product.
    • Hover over it and click Trash.

Final Result

  • The original URL of the "Black" product is now the URL for the unified "Sound Rise II" variable product, preserving its SEO value.
  • All reviews and sales history from the original black product are retained.
  • The inventory and data for the wood taupe variation are now managed correctly within the new variable product structure.

Known Issues & Workarounds

  • Image Gallery Conflicts: On wide desktop screens, the main product image gallery may conflict with the variation-specific galleries, causing images to appear squeezed or misaligned. This issue does not typically occur on tablet or mobile views.
  • Product Bundles Incompatibility: Some product bundling plugins do not support adding individual variations to a bundle.
    • Workaround: If you need to include a specific color in a promotion (e.g., a "Home Edition" bundle), you may need to maintain a separate, unlinked Simple Product for that color variation specifically for use in bundles.
最近更新