Loading...
Changes Saved.
Error Occurred!

Integration With X-Cart

Step 1
------------

Header Script Integration

Before proceeding, please refer to our "Getting Started with Basic Integration" and check Phase 1 to prepare the clickscript.js and other codes required for the HEADER of your templates in X-Cart.

Step 1 involves getting our clickscript.js and other javascript included throughout the X-Cart template system. Once you have uploaded the clickscript.js file (with your merchant ID in it) to your server, you need to include that, along with the other pieces of javascript code in the X-Cart template headers. Follow these instructions to find out which files to edit:

  1. Admin Panel -> Edit Template -> Customer -> home.tpl
  2. Include clickscript.js and other javascript code at the header of the template (before the </head> tag) as described in Phase 1 of "Getting Started with Basic Integration"
  3. Admin Panel -> Edit Template -> Modules -> Fast_Lane_Checkout -> home.tpl
  4. Include clickscript.js and other javascript code at the header of the template (before the </head> tag) as described in Phase 1 of "Getting Started with Basic Integration"



Step 2
------------


Sales Integration

This phase consists of integrating ClickInc.com with the sales/ordering portion of your website. Follow these instructions carefully:

1. Admin Panel -. Edit Templates -> mail -> html-> order_data.tpl
2. Search for (or similar - depending which version X-Cart you have it may be slightly different):

 

<th width="60" bgcolor="#cccccc">{$lng.lbl_total}<br /><img height="1" src="{$ImagesDir}/spacer.gif" width="50" border="0" alt="" /></th></tr>

 

3. After finding the code mentioned in #2, add the following code below it:

 

<!-- The pattern should be orderIdiscount:customer:country:status -->
{math assign="total_discount" equation="discount+coupon_discount" discount=$order.discount coupon_discount=$order.coupon_discount}
{if $order.status eq "P" or $order.status eq "C"}
{assign var="clickinc_status" value="1"}
{else}
{assign var="clickinc_status" value="0"}
{/if}
<input type="hidden" name="_ipq_ipq" id="_ipq_ipq" value="{$order.orderid}:{$total_discount}:{$login}:{$order.b_country}:{$clickinc_status|default:0}" />
<script type="text/javascript">setTimeout("xmlPost()", 500);</script>

 

4. Search for:

 

{math assign="total" equation="amount*price" amount=$product.amount price=$product.display_price|default:$product.price|default:0}
{include file="currency.tpl" value=$total}
</td>
</tr>

 

5. After finding the code mentioned in #4, add the following code after the </td></tr> :

<input type="hidden" name="_productId_productId" id="_productId_productId" value="{$product.productcode}" />
<input type="hidden" name="_price_price" id="_price_price" value="{$product.price}" />
<input type="hidden" name="_quantity_quantity" id="_quantity_quantity" value="{$product.amount}" />

 

 




Related Articles