[ic] InternationalCheckout.com's PHP code to Interchange??

Lisa Collins lisa at ultimatepassage.com
Fri Oct 22 16:22:29 UTC 2010


> Lisa Collins wrote:
> >/  Dear Interchange Gurus,
> />/
> />/  I am praying someone here can help me because my programming skills
> />/  are next to none and I've been told, "It's so easy!". I have tried so
> />/  many things over the last few days to no avail.
> />/
> />/  I'm trying to integrate InternationalCheckout.com's code on my site
> />/  [include include/checkout/shopping_cart] but the only example they
> />/  give is in PHP.
> />/
> />/  How can I do this with Interchange? What would be the equivalent of
> />/  this PHP Code to transfer the shopping cart to them?
> />/
> />/   From their instructions:
> />/  In order to transmit the contents of your shopping cart to the
> />/  International Checkout page, you'll have to send the contents of your
> />/  store's
> />/  shopping cart to International Checkout. The following parameters have
> />/  to be passed to our shopping cart in the form of HIDDEN
> />/  elements of HTML.
> />/  ---Just a few parameters from the list which I need:
> />/
> />/  ItemDescription (ItemDescription1)
> />/  ItemSKU (ItemSKU1)
> />/  ItemQuantity (ItemQuantity1)
> />/  ItemPrice (ItemPrice1)
> />/
> />/
> />/
> />/  Sample Code they provided in PHP:
> />/
> />/  <form name="icForm" id="icForm" method="post"
> />/  action="https://www.internationalcheckout.com/cart.php"  <https://www.internationalcheckout.com/cart.php%22>>
> />/  <?php for($i = 1; $i<= TOTAL ITEMS IN YOUR CART; $i++) { ?>
> />/  <input type="hidden" name="ItemDescription<?php echo $i?>" value="ITEM
> />/  DESCRIPTION">
> />/  <input type="hidden" name="ItemSKU<?php echo $i?>" value="ITEM CODE
> />/  VALUE">
> />/  <input type="hidden" name="ItemSize<?php echo $i?>" value="ITEM SIZE">
> />/  <input type="hidden" name="ItemQuantity<?php echo $i?>" value="ITEM
> />/  QUANTITY">
> />/  <input type="hidden" name="ItemPrice<?php echo $i?>" value="ITEM PRICE">
> />/  <? } ?>
> />/  <input type="hidden" name="p" value=" YOUR PARTNER VALUE REGISTERED
> />/  WITH US ">
> />/  </form>
> />/  <script>document.getElementById('icForm').submit();</script>
> />/
> />/  ---
> />/   From the above, I'm assuming "value=" would be MY Fields from
> />/  products.txt??
> />/
> />/
> />/  I would be SO Grateful to anyone who could tell me how to do this!
> /
> Hi Lisa,
>
> Try something like this. This would be the Interchange equivalent to the
> php code.
>
> <form name="icForm" id="icForm" method="post"
> action="https://www.internationalcheckout.com/cart.php"  <https://www.internationalcheckout.com/cart.php%22>>
> [item-list]
> <input type="hidden" name="ItemDescription[item-increment]"
> value="[item-description]">
> <input type="hidden" name="ItemSKU[item-increment]" value="[item-code]">
> <input type="hidden" name="ItemSize[item-increment]"
> value="[item-modifier size]">
> <input type="hidden" name="ItemQuantity[item-increment]"
> value="[item-quantity]">
> <input type="hidden" name="ItemPrice[item-increment]" value="[item-price]">
> [/item-list]
> <input type="hidden" name="p" value=" YOUR PARTNER VALUE REGISTERED WITH
> US ">
> </form>
> <script>document.getElementById('icForm').submit();</script>
>
> Hope this helps,
> Chris
>
> -- 
> Chris Kershaw
> End Point Corp.
> Direct Line: 919-249-5356
> Fax: 866-281-1373
> http://www.endpoint.com
>


Dear Chris,

I'm definitely getting closer because items are appearing in the page 
source, Thank You!

However nothing happens when the International Checkout Button is clicked.
I'm thinking 
<script>document.getElementById('icForm').submit();</script>  is not 
quite what Interchange is looking for??

Thanks So Much!!

Lisa

<form  name="icForm"id="icForm"method="post"
action="https://www.internationalcheckout.com/cart.php">

<input  type="hidden"name="ItemDescription1"value="RAYMARINE C140W MULTIFUNCTION DISPLAY w/US COASTAL CHARTS">
<input  type="hidden"name="ItemSKU1"value="34903">
<input  type="hidden"name="ItemQuantity1"value="1">
<input  type="hidden"name="ItemPrice1"value="$3,622.37">

<input  type="hidden"name="p"value="XXXXX">
<input  type="image"src="/images/yacht/IntlCO.jpg  <view-source:https://www.ultimatepassage.com/images/yacht/IntlCO.jpg>">
</form>
<script>document.getElementById('icForm').submit();</script>







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.icdevgroup.org/pipermail/interchange-users/attachments/20101022/285728c1/attachment.htm>


More information about the interchange-users mailing list