...
Show cart total item count
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<script type="text/javascript" src="https://secure.ultracart.com/cgi-bin/UCJavaScript?merchantid=DEMO&type=count"></script> |
...
Show cart total amount
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<script type="text/javascript" src="https://secure.ultracart.com/cgi-bin/UCJavaScript?merchantid=DEMO&type=total"></script> |
...
Return both as XML (mainly used in flash):
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<script type="text/javascript" src="https://secure.ultracart.com/cgi-bin/UCJavaScript?merchantid=DEMO&type=xml"></script> |
...
Show Inventory:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<script type="text/javascript" src="https://secure.ultracart.com/cgi-bin/UCJavaScript?merchantid=DEMO&type=inventory&itemid=ITEMID"></script> |
Replace the DEMO merchant ID with your own and ITEMID with the item that you want inventory information about.
Info | ||
---|---|---|
| ||
Please note that when you are viewing pages that have the "show inventory" script in them and you're viewing the page from the same browser in which you are logged into the UltraCart back-end, you'll see the inventory displayed with the Distribution Center code. The DC code that you will see in front of the inventory count will not appear to regular customers browsing the page. |
Custom SSL
If you have a custom SSL certificate, you should replace secure.ultracart.com in any of the above links with your secure host name.
...
Below is a simple example of the snippet of code that displays the customers current shopping cart details on your store web pages:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<form method="post" action="http://secure.ultracart.com/cgi-bin/UCEditor"> <input type="hidden" name="merchantId" value="DEMO" /> <table class="uc-cart-summary" border="1"> <tr class="uc-cart-summary-details"> <td class="uc-cart-item-count-label"> <script type="text/javascript" src="https://secure.ultracart.com/cgi-bin/UCJavaScript?merchantid=DEMO&type=count"></script> | cart total: <script type="text/javascript" src="https://secure.ultracart.com/cgi-bin/UCJavaScript?merchantid=DEMO&type=total"></script> <input type="submit" name="submit" value="checkout" /> </td> </tr> </table> </form> |
...
Here is sample code using a custom cart image, replacing the form code with simple hyperlink:
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
| Items: <script type="text/javascript" src="https://secure.ultracart.com/cgi-bin/UCJavaScript?merchantid=DEMO&type=count"></script> | Total: <script type="text/javascript" src="https://secure.ultracart.com/cgi-bin/UCJavaScript?merchantid=DEMO&type=total"></script> | <a href="http://secure.ultracart.com/cgi-bin/UCEditor?merchantId=DEMO"><img src="http://secure.ultracart.com/cgi-bin/UCGraphic?merchantId=DEMO&ThemeCode=Z&Filename=cart" name="Shopping Cart" width="25" height="23"></a> | |
...