本文整理汇总了PHP中Mage_Wishlist_Model_Wishlist::getCustomerId方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Wishlist_Model_Wishlist::getCustomerId方法的具体用法?PHP Mage_Wishlist_Model_Wishlist::getCustomerId怎么用?PHP Mage_Wishlist_Model_Wishlist::getCustomerId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Wishlist_Model_Wishlist
的用法示例。
在下文中一共展示了Mage_Wishlist_Model_Wishlist::getCustomerId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configureAction
/**
* Ajax handler to response configuration fieldset of composite product in customer's wishlist
*
* @return Mage_Adminhtml_Customer_Wishlist_Product_Composite_WishlistController
*/
public function configureAction()
{
$configureResult = new Varien_Object();
try {
$this->_initData();
$configureResult->setProductId($this->_wishlistItem->getProductId());
$configureResult->setBuyRequest($this->_wishlistItem->getBuyRequest());
$configureResult->setCurrentStoreId($this->_wishlistItem->getStoreId());
$configureResult->setCurrentCustomerId($this->_wishlist->getCustomerId());
$configureResult->setOk(true);
} catch (Exception $e) {
$configureResult->setError(true);
$configureResult->setMessage($e->getMessage());
}
/* @var $helper Mage_Adminhtml_Helper_Catalog_Product_Composite */
$helper = Mage::helper('adminhtml/catalog_product_composite');
$helper->renderConfigureResult($this, $configureResult);
return $this;
}
示例2: isWishlistDefault
/**
* Check whether given wishlist is default for it's customer
*
* @param Mage_Wishlist_Model_Wishlist $wishlist
* @return bool
*/
public function isWishlistDefault(Mage_Wishlist_Model_Wishlist $wishlist)
{
return $this->getDefaultWishlist($wishlist->getCustomerId())->getId() == $wishlist->getId();
}
示例3: _getCustomerId
/**
* Get Customer ID from Quote/Wishlist
*
* @param int $ruleId
* @param Mage_Sales_Model_Quote $quote
* @param Mage_Wishlist_Model_Wishlist $wishlist
*
* @return int
*/
protected function _getCustomerId($ruleId, $quote, $wishlist)
{
if (!$ruleId || !$quote && !$wishlist) {
return 0;
}
if ($quote) {
return $quote->getCustomerId() ? $quote->getCustomerId() : 0;
}
if ($wishlist) {
return $wishlist->getCustomerId() ? $wishlist->getCustomerId() : 0;
}
return 0;
}