Volusion import product using API

2019-09-11 07:09发布

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>

标签: php api volusion
4条回答
对你真心纯属浪费
2楼-- · 2019-09-11 07:47

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?

查看更多
迷人小祖宗
3楼-- · 2019-09-11 07:48

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

查看更多
Lonely孤独者°
4楼-- · 2019-09-11 07:56

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.

查看更多
我想做一个坏孩纸
5楼-- · 2019-09-11 08:09

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:

  1. Your admin click on Inventory.
  2. Click in drop down menu on Products
  3. Click on product
  4. In Advance Info click on Vendor.

You will see the Product ID

This is the screenshot.

enter image description here

查看更多
登录 后发表回答