VirtueMart

VirtueMart coupons import in RO CSVI

| VirtueMart

A template can be created by following these steps:

  1. Go to Components -> RO CSVI -> Templates
  2. Click New
  3. Give the template a name, say for example VirtueMart Coupon import
  4. Set Action to Import
  5. Set Component to VirtueMart
  6. Set Operation to Coupon
  7. Click Next: Select Source
  8. Source is set default to Load from your computer. No need for change.
  9. Click Next: Select options
  10. The default values are OK, change if needed.
  11. Click Next: Select fields
  12. Nothing needed here as we set to Use column headers as configuration in step 10.
  13. Click Next: Finalize
  14. All done here
  15. Click Close to return to the list of templates or Edit if you want to fine-tune the template further.

Adding the template fields

Template fields can be added by following these steps:

  1. Go to Components -> RO CSVI -> Templates
  2. Click on Template fields
  3. In the Search Tools select your template
  4. Click on New to add a single field or click on Quick Add to add multiple fields.

Quick Add

The Quick Add Option allows you to quickly add multiple fields to a template. It is not possible to set any settings per field here but that can be done after the fields have been added to the template.

Run the import

The import can be run by following these steps:

  1. Go to Components -> RO CSVI -> Import
  2. Select the template created earlier with name VirtueMart Coupon import
  3. Click Select file
  4. Select the file to import
  5. Click Preview
  6. You now see a preview of the file as to how RO CSVI sees the file
  7. Click Start import
  8. The import is run
  9. The Log details page will be shown with information regarding the import if the Enable logging is enabled in the template

Video showing the process

 

Example file

virtuemart_coupons_import.csv

Read more ...

Advanced order XML export

| VirtueMart

Requirements

  • CSVI Pro 4.5+
  • VirtueMart 2.0.10+

Background information

The advanced order export makes it possible to export XML files with a complex structure that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<orders xmlns="urn:orders-schema">
<order>
        <customer>
            <name>Shipping name</name>
            <contactperson>Shipping name</contactperson>
            <address>Shipping address</address>
            <zip>Shipping zip</zip>
            <city>Shipping city</city>
            <country>Shipping country</country>
            <billtoname>Bill to name</billtoname>
            <billtoaddress>Bill to address></billtoaddress>
            <billtozip>Bill to zip</billtozip>
            <billtocity>Bill to city</billtocity>
            <billtocountry>Bill to country</billtocountry>
            <phone>0123456789</phone>
            <mobilephone>0123456789</mobilephone>
            <fax>9876543210</fax>
            <email>This email address is being protected from spambots. You need JavaScript enabled to view it.</email>
            <website>www.example.com</website>
            <taxnumber></taxnumber>
            <chamberofcommerce></chamberofcommerce>
        </customer>
        <orderdate>2013-05-01</orderdate>
        <orderdescription>Webshop order 25874</orderdescription>
        <ordernumber>ab12345</ordernumber>
        <note>Deliver it fast</note>
        <orderlines>
                <orderline>
                <code>H01</code>
                <description>Wooden hammer</description>
                <qty>1</qty>
                <price>14.95</price>
            </orderline>
             <orderline>
                <code>P01</code>
                <description>Power product</description>
                <qty>3</qty>
                <price>12.45</price>
            </orderline>
        </orderlines>
</order>
</orders>

These structures are most often used for exporting orders to external sources like a fullfilment company for example.

Preparing the template

The template is the same as any other template except you must setup the layout for CSVI to use for your export. The layout consists of four parts:

  1. Header
  2. Order
  3. Order line
  4. Footer

We are going to use the layout as shown at the intro as example here.

Header

The header is the start of the XML file and contains the opening node for the whole XML file. In our example that is <orders xmlns="urn:orders-schema">.

<?xml version="1.0" encoding="UTF-8"?>
<orders xmlns="urn:orders-schema">

Order

The order part is the complete node of the order and this part is repeated for every order that gets exported. There is a special tag inside the order and is called [orderlines]. This tag will be replaced by the Order line section.

<order>
        <customer>
            <name>[shipping_full_name]</name>
            <contactperson>[shipping_full_name]</contactperson>
            <address>[shipping_address_1]</address>
            <zip>[shipping_zip]</zip>
            <city>[shipping_city]</city>
            <country>[shipping_country_2_code]</country>
            <billtoname>[full_name]</billtoname>
            <billtoaddress>[address_1]></billtoaddress>
            <billtozip>[zip]</billtozip>
            <billtocity>[city]</billtocity>
            <billtocountry>[country_2_code]</billtocountry>
            <phone>[phone_1]</phone>
            <mobilephone>[phone_2]</mobilephone>
            <fax>[fax]</fax>
            <email>[email]</email>
            <website></website>
            <taxnumber></taxnumber>
            <chamberofcommerce></chamberofcommerce>
        </customer>
        <orderdate>[created_on]</orderdate>
        <orderdescription>Webshop order [order_number]</orderdescription>
        <ordernumber>[order_number]</ordernumber>
        <note>[customer_note]</note>
        <orderlines>
                [orderlines]
        </orderlines>
</order>

Order line

This section contains all the products that belong to the order. This part is repeated as many times as there are products in the order, once all the products are collected the order lines are injected in the Order part where the tag [orderlines] is set.

<orderline>
                <code>[order_item_sku]</code>
                <description>[order_item_name]</description>
                <qty>[product_quantity]</qty>
                <price>[product_item_price]</price>
</orderline>

Footer

The footer closes the XML

</orders>

Exporting the template

To export the order XML it works the same way as a regular order export, once you have assigned the fields to the template and set your options, click on Process to export the orders.

Read more ...

VirtueMart Shopper fields export

| VirtueMart

This tutorial explains how to create a VirtueMart Shopper fields export template, add the fields and how to run the export. Step by step we show you how to perform each task. A video will show you the steps in action so you can follow that as well.

Read more ...

Export VirtueMart Products to HikaShop Products

| VirtueMart

RO CSVI has a new feature of exporting data from one extension and importing into another extension, which we have named the bridge templates. Currently only VirtueMart Products to J2Store Products and VirtueMart Products to HikaShop Products is available. This feature is available from RO CSVI 7.15.0 version onwards.  In this document we will explain how to export VirtueMart Products to HikaShop Products.

Read more ...

Multiple Customfields Filter for VirtueMart

| VirtueMart

Background information

The ability to import custom field filter values and filter them using the Multiple Customfields Filter for Virtuemart.

Creating the custom field

Before you can start to import your filter values, you first need to create a custom field with a plugin of the VirtueMart2 multiple customfield plugin 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: 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: No
    6. Description: Change as you like
    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: VirtueMart2 multiple customfield plugin
  4. Click Save
  5. Go to the bottom of the page and notice there are some settings that can be set.
    Multiple Customfields filter plugin

    Set the Output template to multiselect-chosen.

    For this example fill the parameters with:
    1. Green
    2. Blue
    3. Yellow
    4. Pink
    5. Grey
  6. Click on Save & Close
  7. The Custom field has now been created

Creating the CSV file

An example CSV file for existing products looks like this:

"product_sku";"custom_title";"custom_value";"custom_param";"product_name";"product_in_stock";"product_price"
"10001";"Color";"param";"Blue#Pink#Grey";"Product with filter";"0";"100"

Let's have a closer look at the fields

product_sku

This is the unique code for a 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.2 when creating the custom field.

custom_value

This must always be param.

custom_param

The custom_param fields holds all the values you want to assign to the product, each one separated by a #.

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.

Multiple parameters

It is possible that you have multiple filter fields that you want to assign to a product, for example Color and Size. The CSV file looks like this:

"product_sku";"custom_title";"custom_value";"custom_param";"product_name";"product_in_stock";"product_price"
"10001";"Color~Size";"param~param";"Blue#Pink#Grey~M#L#S";"Product with filter";"0";"100"

If you have 2 custom titles, there must also be 2 custom values and 2 custom parameters.

Read more ...