Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_Wishlist_Block_Abstract
  • Mage_Wishlist_Block_Customer_Sharing
  • Mage_Wishlist_Block_Customer_Sidebar
  • Mage_Wishlist_Block_Customer_Wishlist
  • Mage_Wishlist_Block_Customer_Wishlist_Button
  • Mage_Wishlist_Block_Customer_Wishlist_Item_Column
  • Mage_Wishlist_Block_Customer_Wishlist_Item_Column_Cart
  • Mage_Wishlist_Block_Customer_Wishlist_Item_Column_Comment
  • Mage_Wishlist_Block_Customer_Wishlist_Item_Column_Image
  • Mage_Wishlist_Block_Customer_Wishlist_Item_Column_Remove
  • Mage_Wishlist_Block_Customer_Wishlist_Item_Options
  • Mage_Wishlist_Block_Customer_Wishlist_Items
  • Mage_Wishlist_Block_Item_Configure
  • Mage_Wishlist_Block_Links
  • Mage_Wishlist_Block_Render_Item_Price
  • Mage_Wishlist_Block_Share_Email_Items
  • Mage_Wishlist_Block_Share_Email_Rss
  • Mage_Wishlist_Block_Share_Wishlist
  • Mage_Wishlist_Controller_Abstract
  • Mage_Wishlist_Helper_Data
  • Mage_Wishlist_IndexController
  • Mage_Wishlist_Model_Config
  • Mage_Wishlist_Model_Config_Source_Summary
  • Mage_Wishlist_Model_Item
  • Mage_Wishlist_Model_Item_Option
  • Mage_Wishlist_Model_Mysql4_Item
  • Mage_Wishlist_Model_Mysql4_Item_Collection
  • Mage_Wishlist_Model_Mysql4_Item_Option
  • Mage_Wishlist_Model_Mysql4_Item_Option_Collection
  • Mage_Wishlist_Model_Mysql4_Product_Collection
  • Mage_Wishlist_Model_Mysql4_Wishlist
  • Mage_Wishlist_Model_Mysql4_Wishlist_Collection
  • Mage_Wishlist_Model_Observer
  • Mage_Wishlist_Model_Resource_Item
  • Mage_Wishlist_Model_Resource_Item_Collection
  • Mage_Wishlist_Model_Resource_Item_Option
  • Mage_Wishlist_Model_Resource_Item_Option_Collection
  • Mage_Wishlist_Model_Resource_Wishlist
  • Mage_Wishlist_Model_Resource_Wishlist_Collection
  • Mage_Wishlist_Model_Session
  • Mage_Wishlist_Model_Wishlist
  • Mage_Wishlist_SharedController
  • Overview
  • Package
  • Class
  • Tree

Class Mage_Wishlist_Model_Wishlist

Wishlist model

Varien_Object
Extended by Mage_Core_Model_Abstract
Extended by Mage_Wishlist_Model_Wishlist
Package: Mage\Wishlist
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Wishlist/Model/Wishlist.php
Methods summary
protected
# _construct( )

Initialize resource model

Initialize resource model

public Mage_Wishlist_Model_Wishlist
# loadByCustomer( mixed $customer, boolean $create = false )

Load wishlist by customer

Load wishlist by customer

Parameters

$customer
mixed
$customer
$create
boolean
$create Create wishlist if don't exists

Returns

Mage_Wishlist_Model_Wishlist
public string
# getName( )

Retrieve wishlist name

Retrieve wishlist name

Returns

string
public Mage_Wishlist_Model_Wishlist
# generateSharingCode( )

Set random sharing code

Set random sharing code

Returns

Mage_Wishlist_Model_Wishlist
public Mage_Wishlist_Model_Wishlist
# loadByCode( string $code )

Load by sharing code

Load by sharing code

Parameters

$code
string
$code

Returns

Mage_Wishlist_Model_Wishlist
protected string
# _getSharingRandomCode( )

Retrieve sharing code (random string)

Retrieve sharing code (random string)

Returns

string
protected Mage_Wishlist_Model_Wishlist
# _beforeSave( )

Set date of last update for wishlist

Set date of last update for wishlist

Returns

Mage_Wishlist_Model_Wishlist

Overrides

Mage_Core_Model_Abstract::_beforeSave()
protected Mage_Sales_Model_Quote
# _afterSave( )

Save related items

Save related items

Returns

Mage_Sales_Model_Quote

Overrides

Mage_Core_Model_Abstract::_afterSave()
protected Mage_Wishlist_Model_Item
# _addCatalogProduct( Mage_Catalog_Model_Product $product, integer $qty = 1, boolean $forciblySetQty = false )

Add catalog product object data to wishlist

Add catalog product object data to wishlist

Parameters

$product
Mage_Catalog_Model_Product
$product
$qty
integer
$qty
$forciblySetQty
boolean
$forciblySetQty

Returns

Mage_Wishlist_Model_Item
public Mage_Wishlist_Model_Mysql4_Item_Collection
# getItemCollection( )

Retrieve wishlist item collection

Retrieve wishlist item collection

Returns

Mage_Wishlist_Model_Mysql4_Item_Collection
public Mage_Wishlist_Model_Item
# getItem( integer $itemId )

Retrieve wishlist item collection

Retrieve wishlist item collection

Parameters

$itemId
integer
$itemId

Returns

Mage_Wishlist_Model_Item
public Mage_Wishlist_Model_Wishlist
# addItem( Mage_Wishlist_Model_Item $item )

Adding item to wishlist

Adding item to wishlist

Parameters

$item
Mage_Wishlist_Model_Item
$item

Returns

Mage_Wishlist_Model_Wishlist
public Mage_Wishlist_Model_Item|string
# addNewItem( integer|Mage_Catalog_Model_Product $product, mixed $buyRequest = null, boolean $forciblySetQty = false )

Adds new product to wishlist. Returns new item or string on error.

Adds new product to wishlist. Returns new item or string on error.

Parameters

$product
integer|Mage_Catalog_Model_Product
$product
$buyRequest
mixed
$buyRequest
$forciblySetQty
boolean
$forciblySetQty

Returns

Mage_Wishlist_Model_Item|string
public Mage_Wishlist_Model_Wishlist
# setCustomerId( integer $customerId )

Set customer id

Set customer id

Parameters

$customerId
integer
$customerId

Returns

Mage_Wishlist_Model_Wishlist
public integer
# getCustomerId( )

Retrieve customer id

Retrieve customer id

Returns

integer
public array
# getDataForSave( )

Retrieve data for save

Retrieve data for save

Returns

array
public array
# getSharedStoreIds( boolean $current = true )

Retrieve shared store ids for current website or all stores if $current is false

Retrieve shared store ids for current website or all stores if $current is false

Parameters

$current
boolean
$current Use current website or not

Returns

array
public Mage_Wishlist_Model_Wishlist
# setSharedStoreIds( array $storeIds )

Set shared store ids

Set shared store ids

Parameters

$storeIds
array
$storeIds

Returns

Mage_Wishlist_Model_Wishlist
public Mage_Core_Model_Store
# getStore( )

Retrieve wishlist store object

Retrieve wishlist store object

Returns

Mage_Core_Model_Store
public Mage_Wishlist_Model_Wishlist
# setStore( Mage_Core_Model_Store $store )

Set wishlist store

Set wishlist store

Parameters

$store
Mage_Core_Model_Store
$store

Returns

Mage_Wishlist_Model_Wishlist
public integer
# getItemsCount( )

Retrieve wishlist items count

Retrieve wishlist items count

Returns

integer
public boolean
# isSalable( )

Retrieve wishlist has salable item(s)

Retrieve wishlist has salable item(s)

Returns

boolean
public boolean
# isOwner( integer $customerId )

Check customer is owner this wishlist

Check customer is owner this wishlist

Parameters

$customerId
integer
$customerId

Returns

boolean
public Mage_Wishlist_Model_Wishlist
# updateItem( integer|Mage_Wishlist_Model_Item $itemId, Varien_Object $buyRequest, null|array|Varien_Object $params = null )

Update wishlist Item and set data from request

Update wishlist Item and set data from request

$params sets how current item configuration must be taken into account and additional options. It's passed to Mage_Catalog_Helper_Product->addParamsToBuyRequest() to compose resulting buyRequest.

Basically it can hold

  • 'current_config', Varien_Object or array - current buyRequest that configures product in this item, used to restore currently attached files
  • 'files_prefix': string[a-z0-9_] - prefix that was added at frontend to names of file options (file inputs), so they won't intersect with other submitted options

For more options see Mage_Catalog_Helper_Product->addParamsToBuyRequest()

Parameters

$itemId
integer|Mage_Wishlist_Model_Item
$itemId
$buyRequest
Varien_Object
$buyRequest
$params
null|array|Varien_Object
$params

Returns

Mage_Wishlist_Model_Wishlist

See

Mage_Catalog_Helper_Product::addParamsToBuyRequest()
public Mage_Wishlist_Model_Wishlist
# save( )

Save wishlist.

Save wishlist.

Returns

Mage_Wishlist_Model_Wishlist

Overrides

Mage_Core_Model_Abstract::save()
Methods inherited from Mage_Core_Model_Abstract
_afterDelete(), _afterDeleteCommit(), _afterLoad(), _beforeDelete(), _beforeLoad(), _clearData(), _clearReferences(), _getEventData(), _getResource(), _hasModelChanged(), _init(), _protectFromNonAdmin(), _setResourceModel(), afterCommitCallback(), afterLoad(), cleanModelCache(), clearInstance(), delete(), getCacheIdTags(), getCacheTags(), getCollection(), getEntityId(), getId(), getIdFieldName(), getResource(), getResourceCollection(), getResourceName(), isObjectNew(), load(), setId()
Properties summary
protected string $_eventPrefix 'wishlist'
#

Prefix of model events names

Prefix of model events names

protected Mage_Wishlist_Model_Mysql4_Item_Collection $_itemCollection null
#

Wishlist item collection

Wishlist item collection

protected Mage_Core_Model_Store $_store null
#

Store filter for wishlist

Store filter for wishlist

protected array $_storeIds null
#

Shared store ids (website stores)

Shared store ids (website stores)

Properties inherited from Mage_Core_Model_Abstract
$_cacheTag, $_dataSaveAllowed, $_eventObject, $_isObjectNew, $_resource, $_resourceCollectionName, $_resourceName
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0