PayPalAddToCartHyperlink Class Reference

Inherits er::wopaypal::PayPalSingleItemHyperlink.

Collaboration diagram for PayPalAddToCartHyperlink:

Collaboration graph
[legend]

List of all members.

Public Member Functions

String addToCartHref ()
String onClickString ()
 PayPalAddToCartHyperlink (WOContext context)

Static Protected Attributes

static String PAYPAL_CGI_COMMAND = "?cmd=_cart&add=1"


Detailed Description

PayPalAddToCartHyperlink is a WOComponent that allows you to embed text, an image, etc. inside the hyperlink, or assign the string through through its bindings.

It returns the appropriate url to add an item to the user's PayPal shopping cart.


Constructor & Destructor Documentation

PayPalAddToCartHyperlink ( WOContext  context  ) 

Constructor

Parameters:
context WOContext


Member Function Documentation

String addToCartHref (  ) 

addToCartHref assembles the URL for the item, based on the values of the bindings it reads from the WOComponent. It gets the values, and most of it's code from the superclass.

Returns:
String containing the url to add the current item to the user's PayPal shopping cart.

String onClickString (  ) 

onClickString basically takes the addToCartHref and embeds it in a JavaScript window.open() method, as per PayPal's instructions. The JavaScript called tells the browser to open a new window that loads the addToCartHref url and has the characteristics given...

Returns:
String that contains the JavaScript code for the addToCart link


Member Data Documentation

String PAYPAL_CGI_COMMAND = "?cmd=_cart&add=1" [static, protected]

The cgi command we're calling on PayPal's server.

Reimplemented from PayPalSingleItemHyperlink.


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:37 2012 for Project Wonder by  doxygen 1.5.8