Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
integration:google_customer_reviews [2018/10/16 02:17] – [Adding Google Customer Reviews to your Foxy store] adam | integration:google_customer_reviews [2021/03/24 19:55] (current) – adam | ||
---|---|---|---|
Line 23: | Line 23: | ||
===== Adding Google Customer Reviews to your Foxy store ===== | ===== Adding Google Customer Reviews to your Foxy store ===== | ||
- | First you'll need to enable | + | ==== Requirements ==== |
+ | * **Customer Reviews | ||
+ | * **A custom subdomain for your Foxy Store** - The Opt-In Survey will also only display on your approved/ | ||
+ | |||
+ | ==== Add the integration code to your website ==== | ||
Once you have it enabled for your account - you'll then need to add some code to your store. Head to the " | Once you have it enabled for your account - you'll then need to add some code to your store. Head to the " | ||
Line 55: | Line 59: | ||
" | " | ||
{% if gtin|length > 0 %} | {% if gtin|length > 0 %} | ||
- | " | + | " |
{% endif %} | {% endif %} | ||
}); | }); | ||
Line 67: | Line 71: | ||
In the code above, make sure you update the '' | In the code above, make sure you update the '' | ||
- | You may also need to modify the estimated delivery date value. The code above defaults to setting it to be 1 week after the transaction date. If you need to provide a different estimated delivery date, you will want to edit this portion of the code: '' | + | You may also need to modify the estimated delivery date value. The code above defaults to setting it to be 1 week after the transaction date. If you need to provide a different estimated delivery date, you will want to edit this portion of the code: '' |
==== Supporting product reviews with GTINs ==== | ==== Supporting product reviews with GTINs ==== | ||
- | The survey opt-in also allows for supporting product reviews, which requires that you pass GTIN (Global Trade Item Numbers) for each of your products. The code above does support passing the GTIN, and just require that you set a custom option to each of your product with a name of '' | + | The survey opt-in also allows for supporting product reviews, which requires that you pass GTIN (Global Trade Item Numbers) for each of your products. The code above does support passing the GTIN, and just require that you set a custom option to each of your product with a name of '' |
You can [[https:// | You can [[https:// | ||
+ | |||
+ | ==== Using product code instead of a custom product option for gtin ==== | ||
+ | If you specify the '' | ||
+ | |||
+ | Specifically, | ||
+ | |||
+ | <code javascript> | ||
+ | {% set gtin = [] %} | ||
+ | {% for item in items %} | ||
+ | {% for option in item.options %} | ||
+ | {% if option.class == " | ||
+ | {% set gtin = gtin|merge([' | ||
+ | {% endif %} | ||
+ | {% endfor %} | ||
+ | {% endfor %} | ||
+ | </ | ||
+ | |||
+ | With this version: | ||
+ | |||
+ | <code javascript> | ||
+ | {% set gtin = [] %} | ||
+ | {% for item in items %} | ||
+ | {% set gtin = gtin|merge([' | ||
+ | {% endfor %} | ||
+ | </ |