Feefo iframe review integration
Hi,
I'm trying to use Feefo reviews iFrame integration to send order data from the order confirmation page. I have two main problems/questions that are beyond me. Here's the iframe code: Code:
<iframe and here's the issues:
thanks |
Re: Feefo iframe review integration
Code:
{* depends on your XC/smarty versions you may need to use back ticks around value; 7 * 24 * 60 * 60 = 604800 for 7 days, adjust if less or more days needed *} |
Re: Feefo iframe review integration
Hi Steve,
thanks very much for the quick reply! So in theory I can just copy this in to my order_message.tpl file? Or do I need to add the variable {assign var="future_date" value=$order.date+604800} within script tags. thanks Martin |
Re: Feefo iframe review integration
You just copy it in the appropriate template and place.
The {assign ....} block is smarty code not javascript so you use it as posted. make sure you test on order info or notification page the correct output |
Re: Feefo iframe review integration
thanks Steve, although I'm struggling. I've got this on order_message.tpl (notification) page:
Code:
<!-- Post message handler --> and all I'm seeing in the iframe when I do a test order is: Code:
<iframe id="FSI_IFrame" style="display: none" src="https://api.feefo.com/api/sales/merchant?merchantidentifier=mathmos-es" data-feefo-email="" data-feefo-orderref="#" data-feefo-name=" " data-feefo-customerref="#" data-feefo-feedbackdate="08/01/1970 01:00" data-feefo-products="[" ]="" width="0" height="0"> seems to be working at grabbing a date but oddly has sent me back in time! doesn't seem to like other values though? |
Re: Feefo iframe review integration
Then you are not adding this to the right place. It looks like the $order variable is not available
You have to read the template and what's in there to know where exactly to add it or what the variable should be. It may have to be $order.order I don't know what you have available |
Re: Feefo iframe review integration
ok Steve thanks. I'll have a fish around
|
Re: Feefo iframe review integration
Hello Steve (or anyone),
I got the code working using the variables you suggested and the correct details are gathered in the iframe however the javascript that sends the data isn't firing. Can you see an obvious reason this might be happening? I've tried wrapping {literal}{/literal} tags around them but it's not working: {assign var="future_date" value=$order.order.date+86400} <iframe id="FSI_IFrame" style="display:none;" width="0" height="0" src="https://api.feefo.com/api/sales/merchant?merchantidentifier=mathmos-es" data-feefo-email="{$order.order.email}" data-feefo-orderref="#{$order.order.orderid}" data-feefo-name="{$order.order.firstname} {$order.order.lastname}" data-feefo-customerref="#{$order.order.orderid}" data-feefo-feedbackdate="{$future_date|date_format:$config.Ap pearance.datetime_format}" data-feefo-products='[{ldelim}{foreach from=$order.products item=product name=products}"description":"{$product.product}"," productsearchcode":"{$product.productcode}","amoun t":"{$product.display_price}","productlink":"https ://www.mathmos.es/product.php?product_id={$product.productid}","curr ency":"EUR","tags":{ldelim}"saleschannel":"Web","p roductline":"games"{rdelim}{rdelim}{if not $smarty.foreach.products.last},{/if}{/foreach}]'> </iframe> <!-- Post message handler --> <script type="text/javascript" src="https://api.feefo.com/api/assets/js-sale-integration/javascript/feefo-js-post-message-handler.js"> </script> <!-- Initialise the Post Message Handler --> <script type="text/javascript"> var FPMH = new Feefo.PostMessageHandler(); FPMH.init(); </script> |
All times are GMT -8. The time now is 07:23 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.