I have implemented solution for import product using XML. Code is working fine but the category is not assigned to product.
Here is my sample XML file for import product.
<?xml version="1.0" encoding="UTF-8"?>
<Import>
<Products>
<ProductID>360</ProductID>
<productcode>0035</productcode>
<vendor_partno>035</vendor_partno>
<productname><![CDATA[product 1]]></productname>
<listprice>6.95</listprice>
<productprice>2</productprice>
<vendor_price>3.83</vendor_price>
<stockstatus>100</stockstatus>
<upc_code>99999</upc_code>
<categoryids>1814</categoryids>
<productdescriptionshort />
<productdescription />
<productweight>0.00</productweight>
<freeshippingitem />
<minqty />
<maxqty />
</Products>
</Import>
categoryids is a "virtual column" and not something you can import directly.
In order to assign categories to products or really products to categories you would have to do a separate import following the format shown here...
http://support.volusion.com/article/product-management-categories-products-link-developer
categoryids is a "virtual column" and not something you can import directly
That is true according to the documentation, but importing Category IDs works when you do a Standard Import with a CSV file.
You just have to pass the following XML code to your Volusion API.
<Categories_Products_Link>
<CategoryID>Write your category id that you assign to the product here</CategoryID>
<ProductID>Write your product id that you assign to the product here</ProductID>
</Categories_Products_Link>
How to check your product id please follow the below steps:
- Your admin click on Inventory.
- Click in drop down menu on Products
- Click on product
- In Advance Info click on Vendor.
You will see the Product ID
This is the screenshot.
I also had this issue and couldn't gain any clarity from that url posted above. You see the docs say that CategoryID and ProductID are required however we do not have product ID's only productCodes in the system. If you export the products table you will see no such ID column.
With that said I also went to export the Categories_Products_Link table and it only has 3 columns: ID, CategoryID, Auto_Maintenance_Column
So what data do we pass through for the ID column or is it actually ProductId?
I also wonder if maybe we should be using the aviary JSON API vs this old XML API?