VirtueMart
ICEcat Product Import for Virtuemart
Once that ICEcat settings are done as per the document Setting up ICEcat data, Product import can be done as a normal import. Make sure the template settings are done as per the linked document since it is not explained here.
An example import for Virtuemart is explained below.
Required fields for Virtuemart product import
- product_sku
- manufacturer_name
CSVI would identify the product details using product_sku and manufacturer_name from ICEcat tables. The other fields required can also be added to the import template fields. This example will explain how product_desc can be imported from ICEcat table to Virtuemart product table.
An example CSV file would look like
product_sku | manufacturer_name | product_desc |
80D0846 | LEXMARK ACCESSORIES | |
14V0801 | LEXMARK ACCESSORIES |
CSVI will now look for matching product information in ICEcat table using the above product_sku and manufacturer_name fields and imports product_desc to the Virtuemart table.
Please note the above import happens only if ICEcat option is set to Yes in template options else product_desc will be read from csv file or nothing will be imported if empty.
If any fields which are not needed to be populated by ICEcat data can be selected from Skip fields option and CSVI will ignore those fields.
Google Sitemap
Requirements:
CSVI 7.0 version
VirtueMart 3.0 or higher
A Google sitemap can be created using VirtueMart product export operation with the following steps.
Step 1
Create a template by selecting Component as VirtueMart, Action as Export and Operation as Product in template Details tab.
Step 2
Under File tab set the following optins
- Set Export type to XML
- Set Website to Custom
- Set Export State to Published. This is needed because only published products should appear in the sitemap as unpublished products are not accessible.
Step 3
To design the layout of the sitemap, under XML layout tab set the following
- Fill the header with the text:
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
- Fill the body with the text:
<url> <loc>[product_url]</loc> <image:image> <image:loc>[picture_url]</image:loc> </image:image> </url>
- Fill the footer with the text:
</urlset>
- Click on apply to save your changes
Step 4
Add the template fields needed for export on CSVI template fields page.
- Add the fields:
- product_url
- picture_url
- product_sku
- Fill in the column header for the product_url and picture_url fields
- Publish the fields product_url and picture_url and to unpublish product_sku field.
Step 5
Finally we are done with setting up the template. Go to CSVI Export page and select the Google sitemap template to download the sitemap file.
References:
Speed up product import
When you have a large number of products in your VirtueMart shop the import will take it's sweet time to finish. There are ways to speed up the import, one of the ways is to make use of indexes on your tables. An index can be seen as a list that the database keeps to remember where to find which item.
Product table index
CSVI uses the product SKU as a unique identifier to identify a product. Adding an index on this field will be beneficial because it allows the database to find the product faster as it then keeps a list of all your products. To add an index on the product_sku field we need to take the following steps using PhpMyAdmin.
- Go to PhpMyAdmin
- Go to the database that contains your site
- Go to the virtuemart_products table Structure page
- Click on the Indexes link (this is a bit obscure but it is above the Information table)
- There will be a line below the indexes that says "Create an index on 1 columns" with a Go button. Click the Go button.
- A popup will appear with a form to enter some information. Enter the following information:
- Index name: product_sku
- Index choice: Unique
We set this to unique to be sure there won't be any duplicate SKUs in the database - Column: Select the product_sku column
- Size: 25
- Click on Go
- The index is now created.
VirtueMart Calculation Rules export
This VirtueMart Calculation Rules export tutorial explains how to setup the fields and export the VirtueMart calculation rules.
VirtueMart Product Image Fields
This page shows which VirtueMart Product Image fields you can use for import and export.