1. zakgr
  2. RO CSVI
  3. Thursday, 24 June 2021
  4.  Subscribe via email
Hi

I have an xml file that looks like the below

<NewDataSet>
<Table>
<Product_ID>89281</Product_ID>
<Product_Partnumber>Α-00016450</Product_Partnumber>
<Category_Level>2</Category_Level>
<Omada>Εξωτερικός Χώρος</Omada>
<Category_ParentOption_ID>2.1</Category_ParentOption_ID>
<Category_Level2_Title>Εξωτερικός Χώρος</Category_Level2_Title>
<Category_ID>2.1.6</Category_ID>
<Category_Caption_Title>Μαξιλάρια - Πανιά</Category_Caption_Title>
<Product_Code>Α776</Product_Code>
<ProductCaption_Title>ZENITH Ανταλλακτικό Ύφασμα Εκρού</ProductCaption_Title>
<Product_Caption_SmallDescription>ZENITH Ανταλλακτικό Ύφασμα Εκρού</Product_Caption_SmallDescription>
<ProductCaption_LargeDescription>
Α776 ZENITH Εκρού Ύφασμα Ανταλ/κό<br> <br> ZENITH Εκρού Ύφασμα<br> <br> Ανταλλακτικό <br> <br> Για την Πολυθρόνα : <br> Ε776 ZENITH Οξυά Καρυδί<br> <br> Ύφασμα <br> Χρώμα Εκρού <br> <br> Προέλευση : EU
</ProductCaption_LargeDescription>
<Choice_Item_Description>["Εξαρτήματα-Ανταλλακτικά-Αναλώσιμα"]</Choice_Item_Description>
<Item_color_Description>["Εκρού"]</Item_color_Description>
<Stuff_Item_Description>["Ύφασμα"]</Stuff_Item_Description>
<Messages/>
<Related_Item/>
<Barcode_Item>5203547164500</Barcode_Item>
<Image1>
https://www.woodwell.gr/uploads/images/89281/zenith-ekrou-yfasma-antal-ko-enlarge.jpg
</Image1>
<Image2>
https://www.woodwell.gr/uploads/resources/24334/a-00016450.jpg
</Image2>
<Image3/>
<Image4/>
<Image5/>
<Image6/>
<Image7/>
<Image8/>
<Image9/>
<Image10/>
<Info>BAZAAR</Info>
<WholesalePrice>3.000000000</WholesalePrice>
<RetailPrice>4.00000</RetailPrice>
<CatalogPage/>
<Dimensions/>
<Weight_PC>8.20000</Weight_PC>
<Product_Weight/>
<Cum_PC>0.00100</Cum_PC>
<ExpectedDate/>
<Package>1.00000</Package>
<KibotioDimensions/>
<Packages_pcs/>
<MUnit>Τεμάχια</MUnit>
<ShowRoomStock>1</ShowRoomStock>
<Availability>1</Availability>



From this xml I am importing the stock in my site
I have some products that uses the same product_mpn

In my template I use Import based on product_mpn
As I am making the import the csvi sees duplicated and do not update this product_mpns
How can avoid this ?

(I have attached you the log file)


In other words, I have 2 products with same mpn. I want to update the stock. Csvi do not let me as they are duplicate
Attachments (1)
Accepted Answer
Accepted Answer Pending Moderation
Hello,
I am not updating based on sku because
1. The sku from the supplier is not the same as mine (they have e382,1 and not e382,1,s)
2. The mpn is better for my update

One import file row can update one existing row in database with VirtueMart Product import and that is because we use product_mpn and get the ID of the record and update it based on the ID. In this case only the first fetched ID record is updated.

Can you please tell me a solution (perhaps make me a patch) in order to update all mpns and do not care about duplicate mpns

The solution here will be to use RO CSVI Custom table import instead of VirtueMart Product import. In custom table import template on Options tab select virtuemart_products table in Custom table field, set Import based on to product_mpn and save the template. See attached screenshot. Run the import and check.
Attachments (1)
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. # Permalink
Accepted Answer Pending Moderation
Hello,

What do you see in the logs report of this import? This is the page you see when you go to Logs and click on your import.

The log you posted shows that the first 23 products are skipped, which is odd so I wonder what is in the log details.
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. # 1
Accepted Answer Pending Moderation
I can not understand exactly what are you asking

When I make the import, in the last page There are mony records that says "skipped" (duplicate records)
Probably, this happens because many products have the same mpn
That is my problem I want to update all products even if they have the same mpn
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,
In your import template settings on File tab you have set Skip new items to Yes, this setting will skip all new records which are not in database but are in import file. Set this field to No, save the template and run the import. Check if products are updated with import.
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 again

I have tried both setting
if I put skip new items to yes it gives me an error that some products are not updated because they are duplicate

If I put skip new items to no it imports new products and dont update those I want because they are duplicate

I will give an example I have 2 products with same mpn xaa1
The xml has this record once
The csv updates the 1 and not the other as they are the same
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello,
Please post sample of import file and template XML to check. To get template XML file, in RO CSVI maintenance menu select RO CSVI on first option, backup templates on second option, select your template and download the XML file. Post the XML file.

Also post latest import debug log to check. To get the debug log check How to collect debug information? document.
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. # 5
Accepted Answer Pending Moderation
Find the attachments

(I making these changes in a sub-domain which is the same as the live site. I could give you access if you like)
Attachments (2)
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello,
Thank you for posting the files. I need sample of import file to run it with the template you posted. Can you post that too?

I making these changes in a sub-domain which is the same as the live site. I could give you access if you like

Let me check import with your import file on my test site. If that does not help in reproducing the issue then will need the access to check on your site.
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. # 7
Accepted Answer Pending Moderation
the xml is at the following link

(save as .xml)

An example is with the product Ε382-1 & Ε382-1-S (SAME mpn Ε-00021588)
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello,
In the XML link you sent, i can see only one product with mpn Ε-00021588 and the corresponding Product_code is Ε382,1. I don't see any product with Product_Code Ε382-1-S or Ε382,1-S or Ε382,1,S or any related record in the file. Also i see product_mpn Ε-00021588 only once in the file and couldn't see any duplicates. Am i missing something?
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. # 9
Accepted Answer Pending Moderation
In order to understand the supplier has one product with mpn Ε-00021588 with code Ε382,1
I have 2 products with mpn Ε-00021588 and the one has code e382-1 (, instead of -) and the other e382-1-s
The duplicants are in my database
The first is updated and the second not
  1. more than a month ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
Hello,
That explains why products are not updated. When selecting existing product from database, RO CSVI will query based on mpn Ε-00021588 but will select first appeared record and updates that. May i ask why not update product based on product_sku? You can change product_sku in the format as in your database using RO CSVI rules. Will that not work?
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. # 11
Accepted Answer Pending Moderation
I am not updating based on sku because
1. The sku from the supplier is not the same as mine (they have e382,1 and not e382,1,s)
2. The mpn is better for my update

Can you please tell me a solution (perhaps make me a patch) in order to update all mpns and do not care about duplicate mpns
  1. more than a month ago
  2. RO CSVI
  3. # 12
Accepted Answer Pending Moderation
Worked like a charm
Thanks!!
  1. more than a month ago
  2. RO CSVI
  3. # 13
  • Page :
  • 1


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