Version 4.7.0

This commit is contained in:
Neo committed 2025-12-19 16:00:35 -08:00
1 parent 517a5e1f70
commit 8ba7d43898
1933 files changed
+65613 -11332

No files matched your search

@@ -267,7 +267,6 @@ class _store extends \IPS\Dispatcher\Controller
'sku' => $package->id,
'offers' => array(
'@type' => 'Offer',
'availability' => ( $package->stock > 0 OR $package->stock == -1 ) ? 'http://schema.org/InStock' : 'http://schema.org/OutOfStock',
'price' => $price->amountAsString(),
'priceCurrency' => $price->currency,
'seller' => array(
@@ -277,6 +276,19 @@ class _store extends \IPS\Dispatcher\Controller
),
);
/* Stock levels */
if( $package->physical )
{
if( $package->stockLevel() === 0 )
{
\IPS\Output::i()->jsonLd['package' . $package->id ]['offers']['availability'] = 'http://schema.org/OutOfStock';
}
else
{
\IPS\Output::i()->jsonLd['package' . $package->id ]['offers']['availability'] = 'http://schema.org/InStock';
}
}
if( $package->image )
{
\IPS\Output::i()->jsonLd['package' . $package->id ]['image'] = (string) $package->image;