1. Anonymous User
  2. RO CSVI
  3. Monday, 27 April 2020
  4.  Subscribe via email
hello,

I would like to do a Product import with custom fields to VirtueMart 3.6.10 10211. I am importing a XML file and the element = item

I want each product to have Stock per City, as you can see bellow I dont have it divided by ~ , how can I make this custom import?

<disponibleCD>0</disponibleCD>
<VENTAS_ACAPULCO>0</VENTAS_ACAPULCO>
<VENTAS_AGUASCALIENTES>0</VENTAS_AGUASCALIENTES>
<VENTAS_CAMPECHE>0</VENTAS_CAMPECHE>
<VENTAS_CANCUN>0</VENTAS_CANCUN>
<VENTAS_CHIHUAHUA>0</VENTAS_CHIHUAHUA>
<VENTAS_COLIMA>0</VENTAS_COLIMA>
<VENTAS_CUERNAVACA>0</VENTAS_CUERNAVACA>
<VENTAS_CULIACAN>0</VENTAS_CULIACAN>
<VENTAS_DF_TALLER>0</VENTAS_DF_TALLER>
<VENTAS_DURANGO>0</VENTAS_DURANGO>
<VENTAS_GUADALAJARA>0</VENTAS_GUADALAJARA>
<VENTAS_HERMOSILLO>0</VENTAS_HERMOSILLO>
<VENTAS_LA_PAZ>0</VENTAS_LA_PAZ>
<VENTAS_LEON>0</VENTAS_LEON>
<VENTAS_MERIDA>0</VENTAS_MERIDA>
<VENTAS_MONTERREY>0</VENTAS_MONTERREY>
<VENTAS_MORELIA>0</VENTAS_MORELIA>
<VENTAS_OAXACA>0</VENTAS_OAXACA>
<VENTAS_PACHUCA>0</VENTAS_PACHUCA>
<VENTAS_PUEBLA>0</VENTAS_PUEBLA>
<VENTAS_QTOUCH>0</VENTAS_QTOUCH>
<VENTAS_QUERETARO>0</VENTAS_QUERETARO>
<VENTAS_SAN_LUIS_POTOSI>0</VENTAS_SAN_LUIS_POTOSI>
<VENTAS_TEPIC>0</VENTAS_TEPIC>
<VENTAS_TIJUANA>0</VENTAS_TIJUANA>
<VENTAS_TLAXCALA>0</VENTAS_TLAXCALA>
<VENTAS_TOLUCA>0</VENTAS_TOLUCA>
<VENTAS_TORREON>0</VENTAS_TORREON>
<VENTAS_TUXTLA>0</VENTAS_TUXTLA>
<VENTAS_VERACRUZ>0</VENTAS_VERACRUZ>
<VENTAS_VILLAHERMOSA>0</VENTAS_VILLAHERMOSA>
<VENTAS_ZACATECAS>0</VENTAS_ZACATECAS>
Accepted Answer Pending Moderation
Hello,
You need to use RO CSVI Combine rule to combine these custom fields with ~ and then use it for custom_value field on import. Let me know if you have any more questions.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
tharuna Thank you for the reply.

Yes I will combine. The doubt I have is how can Multivariant handle stock.

I read both documents:
https://rolandd.com/documentation/ro-csvi/virtuemart/importing-multi-variant-custom-field
https://rolandd.com/documentation/ro-csvi/virtuemart/updating-stock-tutorial

but I dont find how to import custom fields for one product with Stock.

For example in the case I shared:

Fields: City, Stock
Data: City1~City2~City3, 10~8~5

is this considered a single variant, please help me out.
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,
but I dont find how to import custom fields for one product with Stock.

VirtueMart does not store multiple stocks. It is only one value stored in product_in_stock field in database. Since you are looking at saving multiple stock values for a product, only way i see is to use custom fields.

For example in the case I shared:

Fields: City, Stock
Data: City1~City2~City3, 10~8~5

is this considered a single variant, please help me out.

The better way i am seeing is to create City1, City2, City3 as String custom fields instead of Multi variants. That will be a simple way to handle multiple stock of products based on city. You can check Product import with custom fields document to see how to import multiple values for string custom fields.

Let me know if that helps.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hi tharuna Thank you for the support.I would like to create a MultiVariant with City Multivariant Custom Field with CustomLabels City1,City2,City3,City4 and then add Child per City with Unique product SKU. and then add stock to each Additional SKU.

This way I can update stock per Product SKU.

please see this video: https://www.youtube.com/watch?v=dtdj_ei8iCY&list=PLP4nHMYZsmNqozko-5Lds-4xiEfHf9ooF&index=2&t=332s
that is what I want to use only for city.
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
specifically for Importing Multi Variant Custom Fields you mention
Now we need to give each product a unique code so we can identify which product the customer ordered.
in my case the List has over 5k products and each "item".

Does CSVI automatically create the "new product unique SKU"? I want mine to be parent-sku combined with City Abbreviation for example with a "-" separator.
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
This is the file I am using, I translated the xml nodes for better understanding.


<item>
<key>CB-480</key>
<manufacturer_code>323215</manufacturer_code>
<description>
CABLE HDMI DE ALTA VELOCIDAD CON CANAL ETHERNET M-M BLINDADO NEGRO 2 M
</description>
<group>CABLES</group>
<brand>MANHATTAN</brand>
<warranty>3 ANIOS</warranty>
<class>AC</class>
<available>0</available>
<price>2.87</price>
<currency>Dolares</currency>
<technical_spec>
Estándares y certificaciones: ISO9002 General Ancho de banda: 10.2 Gbps 340 MHz Soporta HEC Cumple o excede los estándares actuales de HDMI Longitud: 2 m (6.6 ft.) Conectores: 2 HDMI de 19 pines, macho Contactos con baño de níquel Terminales moldeadas en PVC Blindado, aluminio y trenzado Calibre 30 AWG Eléctrico: Corriente promedio: 0.5 A DC Voltaje de ruptura: 300 V DC Resistencia de aislamiento: 50 MOhms Resistencia de conductividad: 2 Ohms Forro de plástico térmico Contenido del paquete: Cable HDMI de Alta Velocidad con Canal Ethernet
</technical_spec>
<commercial_spec>
Soporta HDMIcon Canal Ethernet, Canal de Audio de Retorno, Vídeo en 3D, Display 4K y Color Profundo Ethernet de Alta Velocidad, tasa de transferencia de red de hasta 100 Mbps La función ARC permite a la TV por HDMI enviar el sonido a un sistema de audio; no es necesario un cable adicional para ello La resolución 4K soporta 1080p y más; hasta 1080p en 3D con Color Profundo Compatible con cualquier dispositivo HDMI, como Blu-ray, consolas de juego, estéreos y PCs Cumple con las especificaciones de HDMI de Alta Velocidad Hasta 10.2 Gbps con un ancho de banda de 340 MHz Doble blindaje para reducir EMI y otras fuentes de interferencia Terminales moldeadas en PVC
</commercial_spec>
<image>
http://www.grupocva.com/detalle_articulo/5909685.jpg
</image>
<DistributionCenter Stock>46</DistributionCenter Stock>
<stock_ACAPULCO>0</stock_ACAPULCO>
<stock_AGUASCALIENTES>3</stock_AGUASCALIENTES>
<stock_CAMPECHE>0</stock_CAMPECHE>
<stock_CANCUN>2</stock_CANCUN>
<stock_CHIHUAHUA>3</stock_CHIHUAHUA>
<stock_COLIMA>0</stock_COLIMA>
<stock_CUERNAVACA>0</stock_CUERNAVACA>
<stock_CULIACAN>6</stock_CULIACAN>
<stock_DF_TALLER>25</stock_DF_TALLER>
<stock_DURANGO>3</stock_DURANGO>
<stock_GUADALAJARA>39</stock_GUADALAJARA>
<stock_HERMOSILLO>3</stock_HERMOSILLO>
<stock_LA_PAZ>3</stock_LA_PAZ>
<stock_LEON>18</stock_LEON>
<stock_MERIDA>6</stock_MERIDA>
<stock_MONTERREY>15</stock_MONTERREY>
<stock_MORELIA>15</stock_MORELIA>
<stock_OAXACA>3</stock_OAXACA>
<stock_PACHUCA>9</stock_PACHUCA>
<stock_PUEBLA>9</stock_PUEBLA>
<stock_QTOUCH>0</stock_QTOUCH>
<stock_QUERETARO>16</stock_QUERETARO>
<stock_SAN_LUIS_POTOSI>0</stock_SAN_LUIS_POTOSI>
<stock_TEPIC>3</stock_TEPIC>
<stock_TIJUANA>3</stock_TIJUANA>
<stock_TLAXCALA>3</stock_TLAXCALA>
<stock_TOLUCA>0</stock_TOLUCA>
<stock_TORREON>0</stock_TORREON>
<stock_TUXTLA>0</stock_TUXTLA>
<stock_VERACRUZ>2</stock_VERACRUZ>
<stock_VILLAHERMOSA>6</stock_VILLAHERMOSA>
<stock_ZACATECAS>0</stock_ZACATECAS>
</item>


as you can see, the STOCK per city is under one element Item it is not separated easily to create the Child Product SKU.
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello Belto,

Does CSVI automatically create the "new product unique SKU"?
By default RO CSVI doesn't create SKUs however you can create them using a rule with the Multi-replace plugin. This has an option to create a unique ID. So if you add the product_sku field to your template and assign the rule you created to this field, it will will it with a unique value per product as you can see in attached screenshot.

I want mine to be parent-sku combined with City Abbreviation for example with a "-" separator.
That is not possible if I understand your XML correctly. In the article you refer to having a unique SKU, each variant is a child product. Your XML has 1 product with n cities with stock. RO CSVI cannot create child products out of this.

Just another idea, why not have a custom field per city and update that with the stock from your XML?
Attachments (1)
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 7
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!