1. melix
  2. RO CSVI
  3. Wednesday, 16 July 2025
  4.  Subscribe via email
Hello there,
I hope this find you doing well.
I want to have a google xml field set like this :
if product_in_stock < 1 (or/and) stock = 0 (or/and) Empty THEN g:availabiliy = backorder
if product_in_stock > 1 THEN g:availability = in stock
Even if the product_in_stock = 0.0 the xml output = in stock
What's wrong in the rule (and/or) in the product_in_stock field I set please ?

Note : in the database, product_in_stock have one float decimal (exemple 0.0 or 1.2)
Attachments (2)
Accepted Answer Pending Moderation
Hello,
What's wrong in the rule (and/or) in the product_in_stock field I set please ?

There is nothing wrong with the rule. You do not see rule applied on any product_in_stock value in export or it is not working for specific values? can you post the export file to check?

Note : in the database, product_in_stock have one float decimal (exemple 0.0 or 1.2)

VirtueMart has database field definition as int for product_in_stock so it cannot have float numbers. See attached screenshot. I was not able to save a float value from VirtueMart product edit page so I am not sure how you got that value.
Attachments (1)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. 1 day ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Yes, VirtueMart is indeed configured to have INT in product_in_stock — the float was just a hack on my side. But I also tested with integer values and got the same result.

I ran a test on products with zero stock using this rule and I got “in stock” as the result, whereas the expected result would be “backorder”.

Another test with products having 1000 in stock returned the logical “in stock”.

Thank you for your kind attention.
  1. 1 day ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation

<item>
<g:brand>Casal</g:brand>
<g:mpn>16124/10</g:mpn>
<g:condition>new</g:condition>
<g:unit_pricing_measure>1 m</g:unit_pricing_measure>
<g:description>Produit : TissuRéférence : casal_16124/10Composition : 59% VI 6% PE 35% PAPoids : 785 grLargeur : 140 cmRaccord Horizontal : 70 cmRaccord Vertical : 64 cmMartindale : 15000Utilisation : Rideaux, Coussins, Fauteuils</g:description>
<g:unit_pricing_base_measure>1 m</g:unit_pricing_base_measure>
<g:google_product_category>1604</g:google_product_category>
<g:availability>in stock</g:availability>
<SHOW STOCK><![CDATA[0]]></SHOW STOCK>
<g:price>129.00 EUR</g:price>
<g:image_link>https://www.laremiseauxtissus.fr/images/virtuemart/product/casal/16124_10.jpg</g:image_link>
<g:title>CASAL 16124-10 SANTIGNY bleu</g:title>
<g:id>casal_16124/10</g:id>
<g:link>https://www.laremiseauxtissus.fr/boutique/casal/chenilles-et-jacquards/casal-16124-santigny/casal-16124-10-santigny-bleu</g:link>
</item>

  1. 1 day ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hello,
I ran a test on products with zero stock using this rule and I got “in stock” as the result, whereas the expected result would be “backorder”.

I did run export with 4 different product_in_stock values and rule worked fine. Post template XML file and I will check the export with your template. To get the template XML file from RO CSVI templates list page select the export template and click on Backup templates button. Post the downloaded XML file.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. 1 day ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Here it is.
Attachments (1)
  1. 1 day ago
  2. RO CSVI
  3. # 5
  • Page :
  • 1


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