View Single Post
  #2  
Old 01-10-2020, 05:32 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,006
 

Default 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 *} {assign var="future_date" value=$order.date+604800} {* make sure variable is actually $products and not $order.products *} {* are you sure "amount" is price and not quantity? *} {* replace yourdomain with your site's address *} <iframe id="FSI_IFrame" style="display: none" width="0" height="0" src="https://api.feefo.com/api/sales/merchant?merchantidentifier=identifier" data-feefo-email="{$order.email}" data-feefo-orderref="#{$order.orderid}" data-feefo-name="{$order.firstname} {$order.lastname}" data-feefo-customerref="#{$order.orderid}" data-feefo-feedbackdate="{$future_date|date_format:$config.Appearance.datetime_format}" data-feefo-products=[ {foreach from=$products item=product name=products} {ldelim} "description":"{$product.product}", "productsearchcode":"{$product.productcode}", "amount":"{$product.display_price}", "productlink":"https://yourdomain/product.php?product_id={$product.productid}", "currency":"GBP", "tags":{ldelim} "saleschannel":"Web", "productline":"games" {rdelim} {rdelim} {if not $smarty.foreach.products.last},{/if} {/foreach} ]> </iframe> {* check all lines for extra spaces - the forum tends to add spaces here and there *}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote