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

Class: AmazonItem

Source Location: /item.class.php

Class Overview

The AmazonItem class stores the minimum information that AWS returns for any product.

Author(s):

Version: 0.3RC2

Copyright: 2004 (c) Mauricio Diaz Orlich

Methods


Child classes:

CartItem
Objects contained in a ShoppingCart are of made from this class.
LiteDetails
The LiteDetails class is used to store information on products returned when doing a lite request to AWS.

Class Details [line 33]

The AmazonItem class stores the minimum information that AWS returns for any product.

This information includes:




Tags:

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


[ Top ]


Class Methods


method getASIN [line 84]

string|boolean getASIN( )

Fetches the product's ASIN, or Amazon Standart Item Number.

Each product sold at Amazon is identified by a different ASIN. ASINs are usually different in different Amazon sites. Although the product's ASIN in not usually changed when encoded, a decoded version is returned.




Tags:

Return:  The product's ASIN. Or false if the ASIN is not set.


[ Top ]

method getListPrice [line 136]

string|boolean getListPrice( [bool $selective = true])

The listed price of the item including its currency symbol.

The function can be selective, in this case it will only return the price if it exists and is different than $ourPrice.




Tags:

Return:  Product's list price. Or false if none is set or it is equal to $ourPrice.


Parameters:

bool   $selective   if true, the price is only returned if it exists and is different than $ourPrice

[ Top ]

method getOurPrice [line 159]

string|boolean getOurPrice( )

The price offered by Amazon for this product including its currency symbol.



Tags:

Return:  Amazon's price for the product. Or false if none is set.


[ Top ]

method getProductName [line 101]

string|boolean getProductName( [integer $words = 0], [string $end = "..."])

Decodes the product's name.



Tags:

Return:  The product's name, the request part, or false if the name is not set.


Parameters:

integer   $words   the number of words you want to get, or 0 if you want the complete title.
string   $end   the character(s) to be appended at the end of the title in case the whole text is not returned.

[ Top ]

method getSavings [line 185]

string|boolean getSavings( [boolean $selective = true])

Calculates the difference between Amazon's price and the list price.

If the list price is not strictly greater than Amazon's price, savings are not calculated (since there are none) and false is returned.

If money is saved, the difference between Amazon's price and the list price is returned including the currency symbol.




Tags:

Return:  The price difference including the currency symbol. Or false if the listed price for this product is not strictly greater than Amazon's price.
  
Since:  version 0.2. Before this, $locale had to be provided as first argument.


Parameters:

boolean   $selective   if this is set to false, the difference is calculated no matter what the value of the list price is. It is recommended not to use this.

[ Top ]

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