Items Showing As Out Of Stock In Microdata Even If 'do Not Track'

So Google has been suspending shopping ads as microdata says 'out of stock' unless qty > 0 even though we are setting the item to 'do not track'?

Is this a bug?

I have just run this as a quick fix:

update cscart_products set amount = 1000 where tracking ='D'

thanks for this :)

No probs, Here is another workaround you might need with GTIN codes if you have some blank: https://forum.cs-cart.com/topic/49453-remove-product-id-form-gtin-in-datafeed/

We should not have to be doing this though really should we!

Adding to this if you have a product set as a configurable product by mistake but you don't want to use variations, the microdata says out of stock also. Am having to edit product back to simple products in the DB to get them to show as in stock!

Right ! yeah that was on one of ours in a new set up too.

PITA

Amdowney,

I'm facing this same issue with Pinterest. It shows the product is "Out of Stock" because the inventory is set to Do Not Track.

How has your workaround been working? Also, where you you go to change what you suggested (update cscart_products set amount = 1000 where tracking ='D')

I appreciate any tips you could provide.

Jon

Amdowney,

I'm facing this same issue with Pinterest. It shows the product is "Out of Stock" because the inventory is set to Do Not Track.

How has your workaround been working? Also, where you you go to change what you suggested (update cscart_products set amount = 1000 where tracking ='D')

I appreciate any tips you could provide.

Jon

Open phpMyAdmin and run the following query

UPDATE cscart_products SET amount = 1000 WHERE tracking ='D';

THANK YOU

Have just realised since implementing a new stock system that syncs our stock levels with the cart we now have this issue re-occurring (on CS Cart version 4.11.2).

Do Not Track should be published as 'in stock'.

Does a newer version correct this or is there some other fix?

Ta - Ad

Just wokring on this part of seo/func.php as a quick fix:

if ($amount > 0 || Registry::get('settings.General.inventory_tracking') == 'N' || $product_data['tracking'] == 'D') {
$availability = 'InStock';
}
new bit in bold not quite working, any pointers?

Try to replace

function fn_seo_get_availability_for_snippet($amount)

with

function fn_seo_get_availability_for_snippet($amount, $product_data)

and

$availability = fn_seo_get_availability_for_snippet($amount);

with

$availability = fn_seo_get_availability_for_snippet($amount, $product_data);

Ah finally - it works (I was close) thanks for this - I am looking to upgrade this site to latest versions shortly - Will most likely take you up on your JSON module if it has this minor alteration in an addon going forward!

https://forum.cs-cart.com/topic/57036-migrate-microdata-to-json-ld/#entry336232

Thank you.