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

I have an xml file that looks like the below

<Omada>Εξωτερικός Χώρος</Omada>
<Category_Level2_Title>Εξωτερικός Χώρος</Category_Level2_Title>
<Category_Caption_Title>Μαξιλάρια - Πανιά</Category_Caption_Title>
<ProductCaption_Title>ZENITH Ανταλλακτικό Ύφασμα Εκρού</ProductCaption_Title>
<Product_Caption_SmallDescription>ZENITH Ανταλλακτικό Ύφασμα Εκρού</Product_Caption_SmallDescription>
Α776 ZENITH Εκρού Ύφασμα Ανταλ/κό<br> <br> ZENITH Εκρού Ύφασμα<br> <br> Ανταλλακτικό <br> <br> Για την Πολυθρόνα : <br> Ε776 ZENITH Οξυά Καρυδί<br> <br> Ύφασμα <br> Χρώμα Εκρού <br> <br> Προέλευση : EU

I would like to take the Availability filed, divide it with Package fild and put it to my virtuamrt product in stock field

I made an import template

product_mpn Product_Partnumber
product_availability Availability

and then I created a combine rule
Source fields Availability,Package
Target field product_in_stock
operation calculation
Perform operation division

If I do not put the rule, the import updates the product_in_stock and makes it equal to the Availability field (i am taking from xml) without the division of course
If I put the rule the product_in_stock is blank

What I am making wrong?
Accepted Answer Pending Moderation
I uploaded the log file
Attachments (1)
  1. 3 days ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
I managed to make it using the combine value
I have one problem though

When I make the divide (Availability/package) everything is going ok except one occasion
when availability is lets say 0 and package 1 0/1=0
The system is giving me 1 as a result
  1. 3 days ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
I was able to see the issue with 0 divided by 1. RO CSVI checks if there is a value set and uses it for division and that check ignores 0. I have fixed it with the attached patch file. Please load the patch file and check the import again.
Attachments (1)
Kind regards,


If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. 2 days ago
  2. RO CSVI
  3. # 3
  • Page :
  • 1

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