Microdata Markup For Landing Page

How to add microdata markup for the following pages in MVE v4.2.4



1: Home Page with Products Showcase in Scroller Template

2: Category Page with all Products Listed.





Is there a specific file we need to edit or does this require an addon?

any one has any inputs on this ?

What do you mean by “[color=#282828][font=arial, verdana, tahoma, sans-serif]microdata markup[/font][/color]”?

[quote name='eComLabs' timestamp='1438685864' post='225521']

What do you mean by “[color=#282828][font=arial, verdana, tahoma, sans-serif]microdata markup[/font][/color]”?

[/quote]



Please have a look at the link below.

SEOChat - SEO news & guides in bite-sized portions!

結構定義標記測試工具 | Google 搜尋中心  |  Google Developers



Currently this works on the Product Page but not on the Category Page listings.

The following template is used to show microdata markups for products:



design\themes\YOUR_THEME\templates\addons\seo\hooks\products\view_main_info.pre.tpl



For the categories you can use this file as example. The content should be put in the following file:



design\themes\YOUR_THEME\templates\addons\my_changes\hooks\categories\view.pre.tpl

Hi Ecom,



Thanks for the tip the first option works.



But the second one for “[color=#282828][font=arial, verdana, tahoma, sans-serif]Category Page with all Products Listed” - we dont get any output in the source code for each product. The code we have used in view.pre.tpl is as below:[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]```php







{$product_amount = $product.inventory_amount|default:$product.amount}
{if ($product_amount <= 0 || $product_amount < $product.min_qty) && $settings.General.inventory_tracking == "Y"}

{else}

{/if}
{if !(!$auth.user_id && $settings.General.allow_anonymous_shopping == "hide_price_and_add_to_cart")}


{/if}
[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]

```[/font][/color]
[color=#282828][font=arial, verdana, tahoma, sans-serif]How can we ensure that each product with this microdata is listed in category view?[/font][/color]

Please make sure the the My changes add-on is installed and activated

The code is displaying in view source but the values are empty and its shown only 1 time not for every product. It means some where the code needs to be looped to show value for each product and may be the variable names are not right to get the values to display.

Try the following code:


```php

{if $products}

{foreach from=$products item=product}







{$product_amount = $product.inventory_amount|default:$product.amount}
{if ($product_amount <= 0 || $product_amount < $product.min_qty) && $settings.General.inventory_tracking == "Y"}

{else}

{/if}
{if !(!$auth.user_id && $settings.General.allow_anonymous_shopping == "hide_price_and_add_to_cart")}


{/if}


{/foreach}
{/if}
```

(!) Not tested

HI Ecom,



You are awesome. It works !!!



Thanks so much.

You are welcome!