Re: Google Merchant Center Feeder for ZC v1.5.x
I have my Configuration - Stock- Check stock level = false (I do not keep inventory in ZenCart but use setting product quantity to 0 when something is out of stock rather then disable it.
If I have an item temporarily out of stock I set the items qty to 0 but the feed still shows it as in stock. How can I correct this? Maybe changing below code? I have tried but my limited PHP knowledge failed me.
if (STOCK_CHECK == 'true') {
if ($variants_quantity > 0) {
$item->appendChild($dom->createElement('g:availability', 'in stock'));
} else {
// are back orders allowed?
if (STOCK_ALLOW_CHECKOUT == 'true') {
if ($products->fields['products_date_available'] != 'NULL') {
$item->appendChild($dom->createElement('g:availability', 'available for order'));
} else {
$item->appendChild($dom->createElement('g:availability', 'preorder'));
}
} else {
$item->appendChild($dom->createElement('g:availability', 'out of stock'));
}
}
} else {
$item->appendChild($dom->createElement('g:availability', 'in stock'));
}
Live and learn... the Zen way.
Bookmarks