/** * Returns item configure url in wishlist * * @param Mage_Catalog_Model_Product|Mage_Wishlist_Model_Item $product * * @return string */ public function getItemConfigureUrl($product) { if ($product instanceof Mage_Catalog_Model_Product) { $id = $product->getWishlistItemId(); } else { $id = $product->getId(); } $params = array('id' => $id); return $this->getUrl('wishlist/index/configure/', $params); }
/** * Retrieve url for updating product in wishlist * * @param Mage_Catalog_Model_Product|Mage_Wishlist_Model_Item $item * * @return string|bool */ public function getUpdateUrl($item) { $itemId = null; if ($item instanceof Mage_Catalog_Model_Product) { $itemId = $item->getWishlistItemId(); } if ($item instanceof Mage_Wishlist_Model_Item) { $itemId = $item->getId(); } if ($itemId) { return $this->_getUrl('wishlist/index/updateItemOptions', array('id' => $itemId)); } return false; }
/** * Retrieve url for adding item to shoping cart with b64 referer * * @param Mage_Wishlist_Model_Item $item * @return string */ public function getAddToCartUrlBase64($item) { return $this->_getUrl('wishlist/index/cart', array('item' => $item->getWishlistItemId(), Mage_Core_Controller_Front_Action::PARAM_NAME_BASE64_URL => AO::helper('core')->urlEncode($this->_getUrl('*/*/*', array('_current' => true))))); }
/** * Retrieve URL for removing item from wishlist * * @param Mage_Catalog_Model_Product|Mage_Wishlist_Model_Item $item * @return string */ public function getConfigureUrl($item) { return $this->_getUrl('wishlist/index/configure', array('item' => $item->getWishlistItemId())); }
/** * Retrieve url for updating product in wishlist * * @param Mage_Catalog_Model_Product|Mage_Wishlist_Model_Item $item * * @return string|bool */ public function getUpdateUrl($item) { $itemId = null; if ($item instanceof Mage_Catalog_Model_Product) { $itemId = $item->getWishlistItemId(); } if ($item instanceof Mage_Wishlist_Model_Item) { $itemId = $item->getId(); } if ($itemId) { $params['id'] = $itemId; return $this->_getUrlStore($item)->getUrl('wishlist/index/updateItemOptions', $params); } return false; }
/** * Retrieve URL for removing item from wishlist * * @param Mage_Catalog_Model_Product|Mage_Wishlist_Model_Item $item * @return string */ public function getRemoveUrl($item) { return $this->_getUrl('wishlist/index/remove', array('item' => $item->getWishlistItemId())); }
/** * Retrieve url for adding item to shoping cart * * @param Mage_Wishlist_Model_Item $item * @return string */ public function getAddToCartUrl($item) { return $this->_getUrl('wishlist/index/cart', array('item' => $item->getWishlistItemId())); }