Back Printable

The "OK" BuyObject

The OK BuyObject uses the GoLive "Set Image URL Action" to give your customer an acknowledgement that the item has been put in the cart. It is for use when you have linked the form action to Addloop.php, so that making a purchase will reload the same page instead of going directly to checkout. This way, the customer knows that the item was added to the cart.

1. Make sure the form is linked to "../Cart/addloop.php", or "../Cart/addloopwOptions.php", if you are using the version with multiple options.

2. Make sure the transparent "blank" image ("okblank.gif") has a unique name. (Fig.19) The ones in the prepared OK BuyObjects are all named "OKBlankImage" by default, but if you use more than one OK BuyObject on a page, each one has to have a different, unique name. OKBlankImage1, OKBlankImage2, OKBlankImage3, etc. will work fine.

2. Select the Form (Fig. 20 .. see red arrow).

5. Go to the Actions Palette and select the Form Submit Event.

6. In the Image popup, select the name you assigned to the invisible image in this particular OK BuyObject.

Fig. 19 Give the invisible image in each OK BuyObject on the page, a unique name.
Fig. 20, Setting up the "Set Image Url" action for the OK BuyObject.

7. Then, in the Link field of the Actions Palette, link to "ok.gif", which is right above "okblank.gif" in HTML/images.

That's it. When your customer hits the Submit image, he should see .

You can make and use your own images, of course. Just make sure both the blank gif and the "OK" image are exactly the same size, as in any rollover.

Don't forget to put a "View Cart" button on the page:

Note: If the object does not seem to work, make sure you have given unique names to all your transparent "ok.gif" images, that you have not linked either the add button or the "ok.gif" to anything, and if you are using an external javascript file, that you also upload it to your site on the server.

If an OK BuyObject (or any BuyObject for that matter) does not put the items in the cart when tested on the server, there may be an error in the code. The easiest way to fix that is to simply delete that BuyObject and re-do it in GoLive.