OXID Community Forum

> German forum > eCommerce-Marketing > Google Merchant: Fehlende Mikrodaten für Zustand
Login
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Thread: Google Merchant: Fehlende Mikrodaten für Zustand


Reply
 
Thread Tools Search this Thread Display Modes
#Top   #11  
Old 09-27-2016, 02:01 PM
Bastelfex's Avatar
Bastelfex Bastelfex is offline
Senior Member
Join Date: May 2012
Posts: 518
Bastelfex is on a distinguished road
Default AW: Google Merchant: Fehlende Mikrodaten für Zustand

Hier meine aktuelle /.../tpl/rdfa/details/inc/object.tpl. Damit werden die relevanten Informationen im Test-Tool erkannt.

Quote:
<div rel="gr:includes">
[{if $oProduct->getVariantsCount() || $oView->drawParentUrl()}]
<div typeof="gr:ProductOrServiceModel" about="[{$sRDFaUrl}]#productdata">
[{else}]
<div typeof="gr:SomeItems" about="[{$sRDFaUrl}]#productdata">
[{/if}]
[{if $oProduct->oxarticles__oxtitle->value}]
<div property="gr:name" content="[{$oProduct->oxarticles__oxtitle->value|strip_tags|strip}]" [{if $oView->getActiveLangAbbr()}] xml:lang="[{$oView->getActiveLangAbbr()}]"[{/if}]></div>
[{/if}]
[{oxhasrights ident="SHOWLONGDESCRIPTION"}]
[{assign var="oLongdesc" value=$oProduct->getLongDescription()}]
[{if $oLongdesc->value}]
<div property="gr:description" content="[{oxeval var=$oLongdesc->value|strip_tags|strip }]" [{if $oView->getActiveLangAbbr()}] xml:lang="[{$oView->getActiveLangAbbr()}]"[{/if}]></div>
[{/if}]
[{/oxhasrights}]
<div rel="foaf:depiction v:image" resource="[{$oView->getActPicture()}]"></div>
<div property="gr:hasStockKeepingUnit" content="[{$oProduct->oxarticles__oxartnum->value}]" datatype="xsd:string"></div>
[{if $oProduct->oxarticles__oxmpn->value}]
<div property="gr:hasMPN" content="[{$oProduct->oxarticles__oxmpn->value}]" datatype="xsd:string"></div>
[{/if}]
[{if $oProduct->oxarticles__oxean->value}]
<div property="gr:hasGTIN-14" content="[{$oProduct->oxarticles__oxean->value}]" datatype="xsd:string"></div>
[{elseif $oProduct->oxarticles__oxdistean->value}]
<div property="gr:hasGTIN-14" content="[{$oProduct->oxarticles__oxdistean->value}]" datatype="xsd:string"></div>
[{/if}]
[{if $oView->getRDFaGenericCondition()}]
<div property="gr:condition" content="[{$oView->getRDFaGenericCondition()}]" xml:lang="en"></div>
[{/if}]
[{foreach from=$oView->getCatTreePath() item=oCatPath name="detailslocation"}]
[{if $smarty.foreach.detailslocation.last}]
<div property="gr:category" content="[{$oCatPath->oxcategories__oxtitle->value|strip_tags}]" [{if $oView->getActiveLangAbbr()}] xml:lang="[{$oView->getActiveLangAbbr()}]"[{/if}]></div>
[{/if}]
[{/foreach}]
[{if $oProduct->oxarticles__oxlength->value}]
<div rel="gr:depth">
<div typeof="gr:QuantitativeValue">
<div property="gr:hasValue" content="[{$oProduct->oxarticles__oxlength->value}]" datatype="xsd:float"></div>
<div property="gr:hasUnitOfMeasurement" content="MTR" datatype="xsd:string"></div>
</div>
</div>
[{/if}]
[{if $oProduct->oxarticles__oxwidth->value}]
<div rel="gr:width">
<div typeof="gr:QuantitativeValue">
<div property="gr:hasValue" content="[{$oProduct->oxarticles__oxwidth->value}]" datatype="xsd:float"></div>
<div property="gr:hasUnitOfMeasurement" content="MTR" datatype="xsd:string"></div>
</div>
</div>
[{/if}]
[{if $oProduct->oxarticles__oxheight->value}]
<div rel="gr:height">
<div typeof="gr:QuantitativeValue">
<div property="gr:hasValue" content="[{$oProduct->oxarticles__oxheight->value}]" datatype="xsd:float"></div>
<div property="gr:hasUnitOfMeasurement" content="MTR" datatype="xsd:string"></div>
</div>
</div>
[{/if}]
[{if $oProduct->oxarticles__oweight->value}]
<div rel="gr:weight">
<div typeof="gr:QuantitativeValue">
<div property="gr:hasValue" content="[{$oProduct->oxarticles__oweight->value}]" datatype="xsd:float"></div>
<div property="gr:hasUnitOfMeasurement" content="KGM" datatype="xsd:string"></div>
</div>
</div>
[{/if}]
</div>
</div>
[{if $oView->getBundleArticle()}]
[{assign var="oBundleProduct" value=$oView->getBundleArticle()}]
<div rel="gr:includes" resource="[{$oBundleProduct->getLink()}]#productdata"></div>
[{/if}]

[{*block name="Google Microdaten"*}]
<div itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="
[{$oProduct->oxarticles__oxtitle->value|strip_tags|strip}] [{if $oView->getActiveLangAbbr()}] xml:lang=[{$oView->getActiveLangAbbr()}][{/if}]">
</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
[{if $oView->getRDFaGenericCondition()}]
<meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="[{$oView->getRDFaGenericCondition()}]">
[{/if}]
<meta itemprop="priceCurrency" content="[{$currency->name}]" >
[{assign var=price value=$oProduct->getPrice()}]
<meta itemprop="price" content="[{$price->getBruttoPrice()}]">
[{if $oDetailsProduct->getStockStatus() == -1}]
[{if $oDetailsProduct->oxarticles__oxnostocktext->value}]
<link itemprop="availability" href="http://schema.org/OutOfStock">
[{elseif $oViewConf->getStockOffDefaultMessage()}]
<link itemprop="availability" href="http://schema.org/OutOfStock">
[{/if}]

[{elseif $oDetailsProduct->getStockStatus() == 1}]

<link itemprop="availability" href="http://schema.org/InStock>

[{elseif $oDetailsProduct->getStockStatus() == 0}]
[{if $oDetailsProduct->oxarticles__oxstocktext->value}]
<link itemprop="availability" href="http://schema.org/InStock">
[{elseif $oViewConf->getStockOnDefaultMessage()}]
<link itemprop="availability" href="http://schema.org/InStock">
[{/if}]

[{/if}]
</div>
[{*/block*}]

</div>
__________________
___________________

Dirk

http://shop1.bastelfex.de
Reply With Quote
#Top   #12  
Old 09-29-2016, 06:49 PM
daytrader daytrader is offline
Senior Member
Join Date: Apr 2015
Posts: 310
daytrader is on a distinguished road
Default Re: Google Merchant: Fehlende Mikrodaten für Zustand

Hi,

danke. Aber damit funzt bei mir der Shop nicht mehr.

atal error: Call to a member function getStockStatus() on a non-object in /www/htdocs/xxxxx/xxxxxx.de/www/tmp/smarty/8226cc6e6e08e212f43f4a0fe4840d77^%%19^19C^19CE3394 %%object.tpl.php on line 116
Reply With Quote
#Top   #13  
Old 09-07-2017, 10:00 AM
dehansen dehansen is offline
Junior Member
Join Date: Aug 2017
Posts: 7
dehansen is on a distinguished road
Default Re: Google Merchant: Fehlende Mikrodaten für Zustand

Guckst Du hier, damit kriegst Du eine saubere Lösung und musst nicht global arbeiten.
Jeder Artikel jkann damit seinen eigenen Produktzustand haben, pflegbar über das Backend..
Mit der mitgelieferten Funktion getProductsCondition( kriegst Du, wenn Du die englische Sprache nutzt, einen Zustand ausgegeben der mit dem Text und XML Feed sowie dem Content API von Google kompatibel ist, so ist es ganz leicht das überall einzubringen.

Link : https://gitlab.petit-souris.de/oxid-...ucts_condition
Reply With Quote
Reply

Bookmarks

Tags
fehlende, google, merchant, mikrodaten, zustand

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Nicht Sichtbar
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EXONN Google merchant jake eCommerce-Marketing 4 01-13-2016 10:01 AM
RDFa wird von Google im Oxidshop nicht indiziert - Mikrodaten schon patchwork.de Entwickler 39 09-22-2014 04:32 PM
Google Merchant Center AmSpo24 eCommerce-Marketing 0 05-29-2013 05:08 AM
Google Merchant Center (Google Base)- Programm zum erstellen und uploaden der Google Merchant Center XML Datei caladan Module 0 11-23-2010 09:02 AM
Google Base / Google Merchant racoon OXID eFire 1 05-09-2010 01:07 PM

All times are GMT +1. The time now is 07:16 AM.