Using buy links

This section explains how to use the buy links that appear on the confirmation page. For this we will use the site "http://www.austincakeball.com/". They have a great site and it is perfect for what we are trying to explain.

Each item displayed on the page contains either a link to a product description page, or an "add to cart" link. The "Buy Links" are your add to cart links. Scroll down below the image to see some sample code.

In this picture below you will see the site is using two options to direct the customer to the "Order" page.

Sample View Cart button. To start, they'd need to change their view cart link. Here's their current view cart link (I just did a 'view source' on their web page):

<div id="cartArea">
     <a href="http://www.petsmart.com/cart/index.jsp?clickid=topnav_cart_txt" 
        title="Cart" id="cart-label" 
        class="cartLabel">VIEW CART</a> 
     <a href="http://www.petsmart.com/cart/index.jsp?clickid=topnav_cart_txt" 
        title="Cart" 
        id="cart-label" class="cartContents"></a>
</div>



The code is pretty clean. It seems that /cart/index.jsp is their view cart page. Okay, let's change that to point to UltraCart. For this example, I'm going to assign Petsmart a Merchant ID of PSMART. Since PSMART is six characters (max allowed is 5), I know no one is already using it. Here's their new View Cart, now pointing to UltraCart.

<div id="cartArea">
     <a href="https://secure.ultracart.com/cgi-bin/UCEditor?MerchantID=Demo" 
        title="Cart" id="cart-label" 
        class="cartLabel">VIEW CART</a> 
     <a href="https://secure.ultracart.com/cgi-bin/UCEditor?MerchantID=Demo" 
        title="Cart" 
        id="cart-label" class="cartContents"></a>
</div>





What about buy links? For that, let's dive down into the site a little, and click on an individual item. I chose a Classic Cake Balls.  So you'll see below an ADD TO CART link. Let's change that. 


<span id="addCart">
    <a id="addToCart" href="javascript:theForm.addToCart();" >
        <img src="http://pet.imageg.net/images/btn_addToCart.gif" width="160" height="44" alt="Add To Cart" border="0" />
    </a>
</span>



Other sites may be using some javascript. That's cool. But it's even simpler with UltraCart. I'll just replace their href with our buy link, and we're done.

<span id="addCart">
    <a id="addToCart" href="https://secure.ultracart.com/cgi-bin/UCEditor?MerchantID=PSMART&ADD=BouncyBall" >
        <img src="http://pet.imageg.net/images/btn_addToCart.gif" width="160" height="44" alt="Add To Cart" border="0" />
    </a>
</span>

Related Documentation

Parameters that can be passed to UCEditor