Magento - Extension "Simple Google Shopping" von wyomind
Um das Template anzupassen gibt es hier auch die Möglichkeit PHP code direkt in das XML Template zu schreiben.
Dies kann hilfreich sein wenn man Felder aus Magento ändern möchte und dazu ein if Konstrukt benötigt.
Hier ein Beispielhaftes Template für Simple Google Shopping mit PHP code direkt im template:
Hier ein Beispielhaftes Template für Simple Google Shopping mit PHP code direkt im template:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Basic Product Information --> | |
{G:ID} | |
{G:TITLE} | |
{G:LINK} | |
{G:DESCRIPTION} | |
{G:GOOGLE_PRODUCT_CATEGORY} | |
{G:PRODUCT_TYPE,[10]} | |
{G:IMAGE_LINK} | |
<g:condition>new</g:condition> | |
<!-- Availability & Price --> | |
<g:availability>in stock</g:availability> | |
{G:PRICE,[EUR],[vat_rate]} | |
{G:SALE_PRICE,[EUR],[vat_rate]} | |
<!-- Unique Product Identifiers--> | |
<g:brand>{manufacturer}</g:brand> | |
<g:gtin>{google_ean}</g:gtin> | |
<g:mpn>{sku}</g:mpn> | |
<g:identifier_exists>TRUE</g:identifier_exists> | |
<!-- Apparel Products --> | |
<g:gender><? | |
$gender="{geschlecht}"; | |
$gExploded = explode(",", $gender); | |
return str_replace("Männer", "male", str_replace("Frauen", "female",str_replace("Unisex", "unisex", $gExploded[0]))); | |
?></g:gender> | |
<g:age_group>adult</g:age_group> | |
<!-- Product Variants --> | |
{G:ITEM_GROUP_ID} | |
<g:color>{color_googleshopping}</g:color> | |
<g:size>{size_googleshopping}</g:size> | |
<g:material>{material[str_replace(",","/",%s)]}</g:material> | |
<g:pattern>{pattern}</g:pattern> | |
<!-- Shipping --> | |
<g:shipping_weight>{weight,[float],[2]}kg</g:shipping_weight> | |
<!-- AdWords attributes --> | |
<g:custom_label_0>{custom_label_0}</g:custom_label_0> | |
<g:custom_label_1>{custom_label_1}</g:custom_label_1> | |
<g:custom_label_2>{custom_label_2}</g:custom_label_2> | |
<g:custom_label_3>{custom_label_3}</g:custom_label_3> | |
<g:custom_label_4>{custom_label_4}</g:custom_label_4> |
Simple Google Shopping Extension
Kommentare