amazOOP amazOOP
[ class tree: amazOOP ] [ index: amazOOP ] [ all elements ]

Class: ShoppingCart

Source Location: /cart.inc.php

Class Overview

AmazonResponse
   |
   --ShoppingCart
This is one of the classes returned when querying AWS.

Author(s):

Version: 0.3RC2

Copyright: 2004 (c) Mauricio Diaz Orlich

Methods


Inherited Methods:

Class: AmazonResponse

AmazonResponse::getErrorMessage()
An error message returned by AWS.
AmazonResponse::isBlendedSearch()
Test to determine if the top node of the search is a BlendedSearch node.
AmazonResponse::isProductInfo()
Test to determine if the top node of the search is a ProductInfo node.
AmazonResponse::isShoppingCart()
Test to determine if the top node of the search is a ShoppingCartResponse node.
AmazonResponse::requestArgument()
Gets an argument from the Request node of the AWS feed.

Class Details [line 34]

This is one of the classes returned when querying AWS.

This class is returned when you create or modify a ShoppingCart.




Tags:

Version:  0.3RC2
  
License:  GNU General Public License
  
Copyright:  2004 (c) Mauricio Diaz Orlich
  
Author:  Mauricio Diaz <madd0@users.sourceforge.net>
  
Since:  version 0.3


[ Top ]


Class Methods


constructor ShoppingCart [line 78]

ShoppingCart ShoppingCart( )

Default constructor.

Prepares the class.




[ Top ]

method buyNow [line 176]

string buyNow( [string $text = ""], [boolean $img = false], [string $linkAttributes = ""], [string $imageAttributes = ""])

Will generate either a link or a form to add the products in the cart to the final Amazon shopping cart.

For US shopping carts, a link will be created. If the

$img
parameter is set to "true", the more Buy Now image will be used as a link to the purchase URL, otherwise the
$text
parameter will be used as the text for the link. Parameters
$linkAttributes
and
$imageAttributes
can be used to specify additional attributes for the anchor and image tags. If no border is specified in the
$imageAttributes
, amazOOP will set the image's border to 0.

For all other shopping carts, the purchase URL is not available, therefore an "Add to Cart" form is created. In this case, if

$img
is set to "true", the more Buy Now image will be used as the submit button, otherwise a submit button will be created with the text from the first parameter.
$linkAttributes
and
$imageAttributes
are not used for these carts.




Tags:

Return:  For US shopping carts, a link to the purchase URL. For all other carts, an "Add to Cart" form for all products in the shopping cart.


Parameters:

string   $text   is the text that should be used in the link or button. If a blank string is submitted, the default value is used.
boolean   $img   if set to true, instead of a regular link or button an image is used. To learn how to define the image you want to use, read the tutorial about Configuring amazOOP. If this is set to true, the
$text
parameter is used as the ALT text for the image.
string   $linkAttributes   In US shopping carts, any additional attributes passed through this parameter, will be added to the anchor tag of the purchase URL.
string   $imageAttributes   In US shopping carts, any additional attributes passed through this parameter will be added to the image tag.

[ Top ]

method getCartID [line 84]

void getCartID( [mixed $decoded = false])



[ Top ]

method getHMAC [line 91]

void getHMAC( [mixed $decoded = false])



[ Top ]

method getItems [line 98]

void getItems( [mixed $number = 0])



[ Top ]

method getSimilarProducts [line 124]

string|boolean getSimilarProducts( [integer $product = 0])

Gets ASINs of other products sold at Amazon that are similar to the current product.



Tags:

Return:  the ASIN of the requested product from the list, or false if the requested position of the list does not contain an ASIN.


Parameters:

integer   $product   the ASIN you want to get. If set to 0 (default), a random ASIN from the list is returned.

[ Top ]

 
Documentation generated on Sat, 21 Aug 2004 17:40:24 +0200 by phpDocumentor 1.3.0RC3
hosted by
SourceForge.net Logo