Posted - 10/19/2021 : 15:27:33
Hi Vince,
I added a brand function to incproddetail.php
[blue]function pddbrand(){ global $brand,$brandschemaidentifier,$showbrand,$rs; if((@$brand!='' || $GLOBALS['hascustomlayout'])) print '<div class="detailbrand" itemscope itemtype="https://schema.org/Brand">' . ($showbrand!=''?'<span class="prodbrandlabel detailbrandlabel">' . 'Brand:' . '</span> ':'') . ($GLOBALS['noschemamarkup']?'':'<span itemprop="' . $GLOBALS['brandschemaidentifier'] . '">') . $brand . ($GLOBALS['noschemamarkup']?'':'</span>') . '</div>'; }
elseif($layoutoption=='brand') pddbrand();[/blue]
I then added brand to product detail layout in the includes file:
[blue]$detailpagelayout="navigation,productname,productimage,discounts,productid,sreviews,sku,brand,options,contentregion4,instock,price,discountprice,currency,quantity,checkoutbutton,previousnext,socialmedia,description,catcontentregion,reviews,searchwords";[/blue]
[blue]$brandschemaidentifier="brand:"; $showbrand="none"; $brand="Your Brand";[/blue]
This passed the google validation check and the warnings went away.
You can then choose using css to display:
[green]div.detailbrand{display: inline-block;}[/green]
or not display:
[red]div.detailbrand{display: none;}[/red]
It would be nice if you could tidy this up and include this feature to your standard release.
John
Edited by - John M on 10/19/2021 15:33:37
|