Skip to content

Instantly share code, notes, and snippets.

@KaySchneider
Last active June 18, 2016 11:26
Show Gist options
  • Save KaySchneider/967714c8585dec4790942c3b6ccdc0bc to your computer and use it in GitHub Desktop.
Save KaySchneider/967714c8585dec4790942c3b6ccdc0bc to your computer and use it in GitHub Desktop.
Xml template
<!-- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment