Lost password?    Lost username?    Create an account
OverviewDownloadsForumSupport
CSV Improved

CSV Improved

Stockable variants import

Requirements

  • CSVI Pro 4.3.1+
  • Joomla 2.5+
  • VirtueMart 2.0.4+
  • PHP 5.3

Background information

The ability to import stockable variants make it easier than using the interface in VirtueMart

Creating the custom field

Before you can start to import your stockable variants, you first need to create a custom field with a plugin of the Stockable Variant type. Take these steps to create the custom field:

  1. Click on Custom Fields in the left menu in the Products section
  2. Click on New
  3. Fill in the following fields:
    1. Custom FIeld Type: Plug-ins
    2. Title: Size and Color (Remember this name as you will need it later in the CSV file)
    3. Published: Yes
    4. Parent: Don't change
    5. Cart Attribute: Yes
    6. Description: Don't change
    7. Default: Don't change
    8. Tooltip: Don't change
    9. Layout position: Don't change
    10. Admin Only: No
    11. Is a list?: No
    12. Hidden: No
    13. Select a plug-in: Choose VM - custom, stockable variants
  4. Click Save
  5. Go to the bottom of the page and notice there are 4 input field sections there. You can use different / additional values. For this example fill in the first section with:
    1. Option name: Color
    2. Option values (only 1 value per line):
      Black
      Red
      Blue
      Green
  6. Fill in the second section with:
    1. Option name: Size
    2. Option values (only 1 value per line):
      S
      M
      L
      XL
      XXL
  7. Click on Save & Close
  8. The Custom field has now been created

Creating the CSV file

An example CSV file for existing products looks like this:

"product_sku";"product_parent_sku";"custom_title";"custom_value";"custom_param";"product_name";"product_in_stock";"product_price"
"10001";"";"Size and Color";"stockable";"10001brbl[Red#L[;10001brge[Black#M[;10001bror[Green#S[";"Parent product";"0";"100"
"10001brbl";"10001";"";"";"";"Child Red Large";"25";""
"10001brge";"10001";"";"";"";"Child Black Medium";"30";""
"10001bror";"10001";"";"";"";"Child Green Small";"20";""

Let's have a closer look at the fields

product_sku

This is the unique code for a product.

product_parent_sku

This is the SKU of the parent product.

custom_title

The name of the custom field. The correct name can be found on the Custom Fields page in VirtueMart in the column named Title. This is the name used in step 3.1 when creating the custom field.

custom_value

This must always be stockable.

custom_param

The custom_param fields holds all the settings about the child products. The value is build up of 3 values and separated by the square open bracket [:

  • Child SKU
  • Options
    Multiple options are separated by a pound sign #. The options follow the order as you have set them in the custom plugin.
  • Additional charge

A value like 10001brbl[Red#L[ as seen in the example CSV means:

  • SKU: 10001brb
  • Option:
    • Option 1: Red
    • Option 2: L
  • Additional charge: empty

product_name

The name of the product.

product_in_stock

The number of products that there are in stock.

product_price

The price of the product. This field is required for the parent product otherwise the selections will not show up.

 Some important notes

  • Only a parent product can be used to import stockable information

TESTIMONIAL

CSVI Pro is excellent extension
5 stars
2012-11-19
CSVI Pro is excellent extension, the best support I have ever seen. I highly recommend this extension Pro is well worth the money!

Best wishes for developers...
Samir

STAY INFORMED


Stay informed with the CSVI newsletter.