Integrating International Checkout

General ShopSite user discussion
Post Reply
OldSalt
Posts: 23
Joined: Mon Sep 28, 2009 4:37 pm
Location: MA

Integrating International Checkout

Post by OldSalt »

Hello,

I am trying to integrate International Checkout:
http://www.internationalcheckoutsolutio ... works.html
to a shopsite 10 cart, so international users can just click on a button and complete the order at the International Checkout site.

Has anyone done this?

I've been reading up on shopsite for the past week or so and am by no means an expert with it.

Would it be possible to create a custom shopping cart template and include the order data (e.g., ItemDescription, ItemSKU, ItemSize, temColor, ItemQuantity, ItemPrice, etc.) as hiddden fields in a form with the button for submission to International Checkout?

Thanks!
OldSalt
Posts: 23
Joined: Mon Sep 28, 2009 4:37 pm
Location: MA

Solved

Post by OldSalt »

I figure this out a few days ago and thought someone else might benefit. :D

In Merchandising -> Custom Templates -> Shopping Cart -> (your template) -> Edit, put:

Code: Select all

<!--start IC Checkout -->
<SCRIPT>
var i;
var j = 0;
function getFields() {
  for ( i=0; i<number_products; i++ ) {
    j++;
    document.write("<input type=\"hidden\" name=\"ItemStore" + j + "\" value=\"<YOUR IC ID>\">");
    document.write("<input type=\"hidden\" name=\"ItemDescription" + j + "\" value=\"" + ss_name[i] + "\">");
    document.write("<input type=\"hidden\" name=\"ItemSKU" + j + "\" value=\"" + ss_sku[i] + "\">");
    document.write("<input type=\"hidden\" name=\"ItemSize" + j + "\" value=\"" + ss_weight[i] + " lbs\">");
    document.write("<input type=\"hidden\" name=\"ItemQuantity" + j + "\" value=\"" + ss_quantity[i] + "\">");
    document.write("<input type=\"hidden\" name=\"ItemPrice" + j + "\" value=\"" + ss_price[i] + "\">");
  }
}
</SCRIPT>

<div align="center">
<form name="icForm" method="post" action="http://www.internationalcheckout.com/cart.php">
<input type="hidden" name="p" value="<YOUR IC ID>">
<SCRIPT>
getFields();
</SCRIPT>
<a href="javascript:document.icForm.submit();"><img src="http://<YOUR DOMAIN/<YOUR MEDIA FOLDER>/international_checkout.gif" height="33" width="190" border="0" alt="International Checkout" /></a>
</form>
</div>
<!--end IC Checkout -->
where you want the button to go.

Fairly simple, eh?

According to the docs, this will only work with the Pro and Manager versions if you put it in the cart like I did.
shoclabs
Posts: 6
Joined: Fri Oct 02, 2009 11:53 am
Location: Mexico

Great code!

Post by shoclabs »

Dude, you are a lifesaver! I could kiss you right now! I have been in contact with the people at international checkout and they just couldn't figure out how to integrate this. :D many, many, many thanks! there should be more people like you in the World!
Post Reply