<div itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="<?php echo $heading_title; ?>" />
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<?php foreach ($_SESSION as $key => $value){$currency = $value['currency'];}?>
<meta itemprop="priceCurrency" content="<?php echo $currency; ?>">
<meta itemprop="price" content="<?php if (!$special) { echo preg_replace('/[^0-9.]+/','',$price);}else{echo preg_replace('/[^0-9.]+/','',$special);} ?>">
<meta itemprop="availability" content="<?php if ($stock >= 1){echo 'In Stock';}else{echo $stock;} ?>">
<meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/NewCondition" />
</div>
</div>
Thanks for any help!
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
Either "offers", "review", or "aggregateRating" should be specified
Since we do not offer the option of product reviews, we went with offers in the above code.
Warnings : brand, sku, pricevaliduntil, url and product ID
justahippy wrote: ↑Tue Apr 02, 2019 1:13 pmI know where it goes product.tpl and i know the site to link to schema.org but for the life of me i cant get rid of product errors/warnings related to microdata. I am pretty sure i can make it work with html, but i am a php idiot. Below is my section of code for product microdata, can anyone correct it for me or tell me what i need to do? My error is on offers right now with various other optional warnings for other things they request.
<div itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="<?php echo $heading_title; ?>" />
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<?php foreach ($_SESSION as $key => $value){$currency = $value['currency'];}?>
<meta itemprop="priceCurrency" content="<?php echo $currency; ?>">
<meta itemprop="price" content="<?php if (!$special) { echo preg_replace('/[^0-9.]+/','',$price);}else{echo preg_replace('/[^0-9.]+/','',$special);} ?>">
<meta itemprop="availability" content="<?php if ($stock >= 1){echo 'In Stock';}else{echo $stock;} ?>">
<meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/NewCondition" />
</div>
</div>
Thanks for any help!
Does this work for you?
I was searching something over the internet and found this code on https://feedarmy.com/kb/adding-microdat ... -merchant/
hopefully will help you.
Code: Select all
<div itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="<?php echo $heading_title; ?>" />
<div itemprop="offers" itemscope="" itemtype="http://schema.org/Offer">
<?php foreach ($_SESSION as $key => $value){$currency = $value['currency'];}?>
<meta itemprop="priceCurrency" content="<?php echo $currency; ?>">
<meta itemprop="price" content="<?php if (!$special) { echo preg_replace('/[^0-9.]+/','',$price);}else{echo preg_replace('/[^0-9.]+/','',$special);} ?>">
<meta itemprop="availability" content="<?php if ($stock >= 1){echo 'In Stock';}else{echo $stock;} ?>">
<meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/NewCondition" />
</div>
</div>
Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature
Not work for 3xkhnaz35 wrote: ↑Thu Aug 01, 2019 5:38 pmjustahippy wrote: ↑Tue Apr 02, 2019 1:13 pmI know where it goes product.tpl and i know the site to link to schema.org but for the life of me i cant get rid of product errors/warnings related to microdata. I am pretty sure i can make it work with html, but i am a php idiot. Below is my section of code for product microdata, can anyone correct it for me or tell me what i need to do? My error is on offers right now with various other optional warnings for other things they request.
<div itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="<?php echo $heading_title; ?>" />
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<?php foreach ($_SESSION as $key => $value){$currency = $value['currency'];}?>
<meta itemprop="priceCurrency" content="<?php echo $currency; ?>">
<meta itemprop="price" content="<?php if (!$special) { echo preg_replace('/[^0-9.]+/','',$price);}else{echo preg_replace('/[^0-9.]+/','',$special);} ?>">
<meta itemprop="availability" content="<?php if ($stock >= 1){echo 'In Stock';}else{echo $stock;} ?>">
<meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/NewCondition" />
</div>
</div>
Thanks for any help!
Does this work for you?
I was searching something over the internet and found this code on https://feedarmy.com/kb/adding-microdat ... -merchant/
hopefully will help you.
Code: Select all
<div itemscope itemtype="http://schema.org/Product"> <meta itemprop="name" content="<?php echo $heading_title; ?>" /> <div itemprop="offers" itemscope="" itemtype="http://schema.org/Offer"> <?php foreach ($_SESSION as $key => $value){$currency = $value['currency'];}?> <meta itemprop="priceCurrency" content="<?php echo $currency; ?>"> <meta itemprop="price" content="<?php if (!$special) { echo preg_replace('/[^0-9.]+/','',$price);}else{echo preg_replace('/[^0-9.]+/','',$special);} ?>"> <meta itemprop="availability" content="<?php if ($stock >= 1){echo 'In Stock';}else{echo $stock;} ?>"> <meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/NewCondition" /> </div> </div>
Warning Invalid enum value in field "availability"
Invalid price format in property "price"
Regards
Himanshu
It does not have to, it's an OC 2 topic here ...Not work for 3x

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Attachments
Screenshot_2020-10-09_09-58-08.png (60.92 KiB) Viewed 2746 times
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
Users browsing this forum: No registered users and 74 guests