Class Mage_Paypal_Model_Cart
PayPal-specific model for shopping cart items and totals The main idea is to accommodate all possible totals into PayPal-compatible 4 totals and line items
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Located at code/core/Mage/Paypal/Model/Cart.php
public
|
|
public
|
|
public
array|false
|
|
public
array
|
|
public
Varien_Object
|
|
public
boolean
|
|
public
|
#
updateTotal( string $code, float $amount, string $lineItemDescription = null )
Compound the specified amount with the specified total |
public
boolean|
|
#
isDiscountAsItem( mixed $setValue = null )
Get/Set whether to render the discount total as a line item |
public
boolean|
|
#
isShippingAsItem( mixed $setValue = null )
Get/Set whether to render the discount total as a line item |
protected
|
|
protected
string
|
#
_renderTotalLineItemDescriptions( string $code, string $prepend = '', string $append = '', string $glue = '; ' )
Merge multiple descriptions by a total code into a string |
protected
|
|
protected
Varien_Object
|
|
private
boolean|
|
#
_totalAsItem( string $var, mixed $setValue = null )
Get/Set for the specified variable. If the value changes, the re-rendering is commenced |
private
|
#
_applyHiddenTaxWorkaround(
Add "hidden" discount and shipping tax |
string |
TOTAL_SUBTOTAL
|
'subtotal' |
#
Totals that PayPal suppports when passing shopping cart |
string |
TOTAL_DISCOUNT
|
'discount' |
|
string |
TOTAL_TAX
|
'tax' |
|
string |
TOTAL_SHIPPING
|
'shipping' |
protected
|
$_salesEntity | null |
#
Order or quote instance |
protected
array
|
$_items | array() |
#
Rendered cart items Array of Varien_Objects |
protected
array
|
$_totals | array() |
#
Rendered cart totals Associative array with the keys from constants above |
protected
array
|
$_totalLineItemDescriptions | array() |
#
Set of optional descriptions for the item that may replace a total and composed of several amounts Array of strings |
protected
boolean
|
$_shouldRender | true |
#
Lazy initialization indicator for rendering |
protected
boolean
|
$_areItemsValid | false |
#
Validation result for the rendered cart items |
protected
boolean
|
$_areTotalsValid | false |
#
Validation result for the rendered totals |
protected
boolean
|
$_isDiscountAsItem | false |
#
Whether to render discount total as a line item Use case: WPP |
protected
boolean
|
$_isShippingAsItem | false |
#
Whether to render shipping total as a line item Use case: WPS |