VirtueMart
VirtueMart coupons import in RO CSVI
A template can be created by following these steps:
- Go to Components -> RO CSVI -> Templates
- Click New
- Give the template a name, say for example VirtueMart Coupon import
- Set Action to Import
- Set Component to VirtueMart
- Set Operation to Coupon
- Click Next: Select Source
- Source is set default to Load from your computer. No need for change.
- Click Next: Select options
- The default values are OK, change if needed.
- Click Next: Select fields
- Nothing needed here as we set to Use column headers as configuration in step 10.
- Click Next: Finalize
- All done here
- 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:
- Go to Components -> RO CSVI -> Templates
- Click on Template fields
- In the Search Tools select your template
- 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:
- Go to Components -> RO CSVI -> Import
- Select the template created earlier with name VirtueMart Coupon import
- Click Select file
- Select the file to import
- Click Preview
- You now see a preview of the file as to how RO CSVI sees the file
- Click Start import
- The import is run
- 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
Advanced order XML export
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:
- Header
- Order
- Order line
- 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.
VirtueMart Shopper fields export
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.
Export VirtueMart Products to HikaShop Products
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.
Multiple Customfields Filter for 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:
- Click on Custom Fields in the left menu in the Products section
- Click on New
- Fill in the following fields:
- Custom Field Type: Plug-ins
- Title: Color (Remember this name as you will need it later in the CSV file)
- Published: Yes
- Parent: Don't change
- Cart Attribute: No
- Description: Change as you like
- Default: Don't change
- Tooltip: Don't change
- Layout position: Don't change
- Admin Only: No
- Is a list?: No
- Hidden: No
- Select a plug-in: VirtueMart2 multiple customfield plugin
- Click Save
- Go to the bottom of the page and notice there are some settings that can be set.
Set the Output template to multiselect-chosen.
For this example fill the parameters with:- Green
- Blue
- Yellow
- Pink
- Grey
- Click on Save & Close
- 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.