WishlistPlus - Version 1.0.2.2

Version Notes

WishlistPlus adds the features of Pagination, search and selective add to cart to your wishlst module.

Download this release

Release Info

Developer Magento Core Team
Extension WishlistPlus
Version 1.0.2.2
Comparing to
See all releases


Code changes from version 1.0.2.1 to 1.0.2.2

app/code/local/Customwishlist/Customwishlist/etc/config.xml ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Customwishlist_Customwishlist>
5
+ <version>0.1.0</version>
6
+ </Customwishlist_Customwishlist>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <customwishlist>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Customwishlist_Customwishlist</module>
14
+ <frontName>customwishlist</frontName>
15
+ </args>
16
+ </customwishlist>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <customwishlist>
21
+ <file>customwishlist.xml</file>
22
+ </customwishlist>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <admin>
27
+ <routers>
28
+ <customwishlist>
29
+ <use>admin</use>
30
+ <args>
31
+ <module>Customwishlist_Customwishlist</module>
32
+ <frontName>customwishlist</frontName>
33
+ </args>
34
+ </customwishlist>
35
+ </routers>
36
+ </admin>
37
+ <!--<adminhtml>
38
+ <menu>
39
+ <customwishlist module="customwishlist">
40
+ <title>Customwishlist</title>
41
+ <sort_order>71</sort_order>
42
+ <children>
43
+ <items module="customwishlist">
44
+ <title>Manage Items</title>
45
+ <sort_order>0</sort_order>
46
+ <action>customwishlist/adminhtml_customwishlist</action>
47
+ </items>
48
+ </children>
49
+ </customwishlist>
50
+ </menu>
51
+ <acl>
52
+ <resources>
53
+ <all>
54
+ <title>Allow Everything</title>
55
+ </all>
56
+ <admin>
57
+ <children>
58
+ <Customwishlist_Customwishlist>
59
+ <title>Customwishlist Module</title>
60
+ <sort_order>10</sort_order>
61
+ </Customwishlist_Customwishlist>
62
+ </children>
63
+ </admin>
64
+ </resources>
65
+ </acl>
66
+ <layout>
67
+ <updates>
68
+ <customwishlist>
69
+ <file>customwishlist.xml</file>
70
+ </customwishlist>
71
+ </updates>
72
+ </layout>
73
+ </adminhtml>-->
74
+ <global>
75
+ <models>
76
+ <customwishlist>
77
+ <class>Customwishlist_Customwishlist_Model</class>
78
+ <resourceModel>customwishlist_mysql4</resourceModel>
79
+ </customwishlist>
80
+ <customwishlist_mysql4>
81
+ <class>Customwishlist_Customwishlist_Model_Mysql4</class>
82
+ <entities>
83
+ <customwishlist>
84
+ <table>customwishlist</table>
85
+ </customwishlist>
86
+ </entities>
87
+ </customwishlist_mysql4>
88
+ </models>
89
+ <resources>
90
+ <customwishlist_setup>
91
+ <setup>
92
+ <module>Customwishlist_Customwishlist</module>
93
+ </setup>
94
+ <connection>
95
+ <use>core_setup</use>
96
+ </connection>
97
+ </customwishlist_setup>
98
+ <customwishlist_write>
99
+ <connection>
100
+ <use>core_write</use>
101
+ </connection>
102
+ </customwishlist_write>
103
+ <customwishlist_read>
104
+ <connection>
105
+ <use>core_read</use>
106
+ </connection>
107
+ </customwishlist_read>
108
+ </resources>
109
+ <blocks>
110
+ <customwishlist>
111
+ <class>Customwishlist_Customwishlist_Block</class>
112
+ </customwishlist>
113
+ </blocks>
114
+ <helpers>
115
+ <customwishlist>
116
+ <class>Customwishlist_Customwishlist_Helper</class>
117
+ </customwishlist>
118
+ </helpers>
119
+ </global>
120
+ </config>
app/code/local/Mage/Wishlist/Block/Abstract.php DELETED
@@ -1,263 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category Mage
22
- * @package Mage_Wishlist
23
- * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
- */
26
-
27
-
28
- /**
29
- * Wishlist Product Items abstract Block
30
- *
31
- * @category Mage
32
- * @package Mage_Wishlist
33
- * @author Magento Core Team <core@magentocommerce.com>
34
- */
35
- abstract class Mage_Wishlist_Block_Abstract extends Mage_Catalog_Block_Product_Abstract
36
- {
37
- /**
38
- * Wishlist Product Items Collection
39
- *
40
- * @var Mage_Wishlist_Model_Mysql4_Product_Collection
41
- */
42
- protected $_collection;
43
-
44
- /**
45
- * Wishlist Model
46
- *
47
- * @var Mage_Wishlist_Model_Wishlist
48
- */
49
- protected $_wishlist;
50
-
51
- /**
52
- * Retrieve Wishlist Data Helper
53
- *
54
- * @return Mage_Wishlist_Helper_Data
55
- */
56
- protected function _getHelper()
57
- {
58
- return Mage::helper('wishlist');
59
- }
60
-
61
- /**
62
- * Retrieve Customer Session instance
63
- *
64
- * @return Mage_Customer_Model_Session
65
- */
66
- protected function _getCustomerSession()
67
- {
68
- return Mage::getSingleton('customer/session');
69
- }
70
-
71
- /**
72
- * Retrieve Wishlist model
73
- *
74
- * @return Mage_Wishlist_Model_Wishlist
75
- */
76
- protected function _getWishlist()
77
- {
78
- if (is_null($this->_wishlist)) {
79
- if (Mage::registry('shared_wishlist')) {
80
- $this->_wishlist = Mage::registry('shared_wishlist');
81
- }
82
- elseif (Mage::registry('wishlist')) {
83
- $this->_wishlist = Mage::registry('wishlist');
84
- }
85
- else {
86
- $this->_wishlist = Mage::getModel('wishlist/wishlist');
87
- if ($this->_getCustomerSession()->isLoggedIn()) {
88
- $this->_wishlist->loadByCustomer($this->_getCustomerSession()->getCustomer());
89
- }
90
- }
91
- }
92
- return $this->_wishlist;
93
- }
94
-
95
- /**
96
- * Prepare additional conditions to collection
97
- *
98
- * @param Mage_Wishlist_Model_Mysql4_Product_Collection $collection
99
- * @return Mage_Wishlist_Block_Customer_Wishlist
100
- */
101
- protected function _prepareCollection($collection)
102
- {
103
- return $this;
104
- }
105
-
106
- /**
107
- * Retrieve Wishlist Product Items collection
108
- *
109
- * @return Mage_Wishlist_Model_Mysql4_Product_Collection
110
- */
111
- public function getWishlistItems()
112
- {
113
- if (is_null($this->_collection)) {
114
- $attributes = Mage::getSingleton('catalog/config')->getProductAttributes();
115
- $this->_collection = $this->_getWishlist()
116
- ->getProductCollection()
117
- ->addAttributeToSelect($attributes)
118
- ->addStoreFilter()
119
- ->addUrlRewrite();
120
-
121
- Mage::getSingleton('catalog/product_visibility')
122
- ->addVisibleInSiteFilterToCollection($this->_collection);
123
-
124
- $this->_prepareCollection($this->_collection);
125
- }
126
-
127
- $searchquery = trim(Mage::helper('core')->htmlEscape(Mage::app()->getRequest()->getParam('wishq')));
128
-
129
- $searchkey = '%'.$searchquery.'%';
130
-
131
-
132
- if(isset($searchquery) && $searchquery != '')
133
- {
134
- $this->_collection->addAttributeToFilter(
135
- array(
136
- array('attribute'=>'name', 'like'=>$searchkey),
137
- array('attribute'=>'sku', 'like'=>$searchkey),
138
- array('attribute'=>'short_description', 'like'=>$searchkey)
139
- )
140
- );
141
- }
142
- // echo $this->_collection->getSelect();die;
143
-
144
- // return $collection;
145
- return $this->_collection;
146
- }
147
-
148
- /**
149
- * Back compatibility retrieve wishlist product items
150
- *
151
- * @deprecated
152
- * @return Mage_Wishlist_Model_Mysql4_Product_Collection
153
- */
154
- public function getWishlist()
155
- {
156
- return $this->getWishlistItems();
157
- }
158
-
159
- /**
160
- * Retrieve URL for Removing item from wishlist
161
- *
162
- * @param Mage_Catalog_Model_Product $item
163
- * @return string
164
- */
165
- public function getItemRemoveUrl($product)
166
- {
167
- return $this->_getHelper()->getRemoveUrl($product);
168
- }
169
-
170
- /**
171
- * Retrieve Add Item to shopping cart URL
172
- *
173
- * @param Mage_Catalog_Model_Product $product
174
- * @return string
175
- */
176
- public function getItemAddToCartUrl($product)
177
- {
178
- return $this->_getHelper()->getAddToCartUrl($product);
179
- }
180
-
181
- /**
182
- * Retrieve URL for adding Product to wishlist
183
- *
184
- * @param Mage_Catalog_Model_Product $product
185
- * @return string
186
- */
187
- public function getAddToWishlistUrl($product)
188
- {
189
- return $this->_getHelper()->getAddUrl($product);
190
- }
191
-
192
- /**
193
- * Retrieve Escaped Description for Wishlist Item
194
- *
195
- * @param Mage_Catalog_Model_Product $item
196
- * @return string
197
- */
198
- public function getEscapedDescription($item)
199
- {
200
- if ($item->getWishlistItemDescription()) {
201
- return $this->htmlEscape($item->getWishlistItemDescription());
202
- }
203
- return '&nbsp;';
204
- }
205
-
206
- /**
207
- * Check Wishlist item has description
208
- *
209
- * @param Mage_Catalog_Model_Product $item
210
- * @return bool
211
- */
212
- public function hasDescription($item)
213
- {
214
- return trim($item->getWishlistItemDescription()) != '';
215
- }
216
-
217
- /**
218
- * Retrieve formated Date
219
- *
220
- * @param string $date
221
- * @return string
222
- */
223
- public function getFormatedDate($date)
224
- {
225
- return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
226
- }
227
-
228
- /**
229
- * Check is the wishlist has a salable product(s)
230
- *
231
- * @return bool
232
- */
233
- public function isSaleable()
234
- {
235
- foreach ($this->getWishlistItems() as $item) {
236
- if ($item->isSaleable()) {
237
- return true;
238
- }
239
- }
240
-
241
- return false;
242
- }
243
-
244
- /**
245
- * Retrieve wishlist loaded items count
246
- *
247
- * @return int
248
- */
249
- public function getWishlistItemsCount()
250
- {
251
- return $this->getWishlistItems()->count();
252
- }
253
-
254
- /**
255
- * Check is the wishlist has items
256
- *
257
- * @return bool
258
- */
259
- public function hasWishlistItems()
260
- {
261
- return $this->getWishlistItemsCount() > 0;
262
- }
263
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/Mage/Wishlist/Block/Customer/Wishlist.php DELETED
@@ -1,73 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category Mage
22
- * @package Mage_Wishlist
23
- * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
- */
26
-
27
-
28
- /**
29
- * Wishlist block customer items
30
- *
31
- * @category Mage
32
- * @package Mage_Wishlist
33
- * @author Magento Core Team <core@magentocommerce.com>
34
- */
35
- class Mage_Wishlist_Block_Customer_Wishlist extends Mage_Wishlist_Block_Abstract
36
- {
37
- /**
38
- * Preparing global layout
39
- *
40
- * @return Mage_Wishlist_Block_Customer_Wishlist
41
- */
42
- protected function _prepareLayout()
43
- {
44
- /* if ($headBlock = $this->getLayout()->getBlock('head')) {
45
- $headBlock->setTitle($this->__('My Wishlist'));
46
- }*/
47
-
48
- parent::_prepareLayout();
49
- $pager = $this->getLayout()->createBlock('page/html_pager', 'wishlist.customer.pager')
50
- ->setCollection($this->getWishlist());
51
- $this->setChild('pager', $pager);
52
- $this->getWishlist()->load();
53
- return $this;
54
- }
55
-
56
- /**
57
- * Retrieve Back URL
58
- *
59
- * @return string
60
- */
61
- public function getBackUrl()
62
- {
63
- if ($this->getRefererUrl()) {
64
- return $this->getRefererUrl();
65
- }
66
- return $this->getUrl('customer/account/');
67
- }
68
-
69
- public function getPagerHtml()
70
- {
71
- return $this->getChildHtml('pager');
72
- }
73
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>WishlistPlus</name>
4
- <version>1.0.2.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -9,10 +9,10 @@
9
  <summary>WishlistPlus adds the features of Pagination, search and selective add to cart to your wishlst module.</summary>
10
  <description>WishlistPlus adds the features of Pagination, search and selective add to cart to your wishlst module.</description>
11
  <notes>WishlistPlus adds the features of Pagination, search and selective add to cart to your wishlst module.</notes>
12
- <authors><author><name>Arvind Bhardwaj</name><user>auto-converted</user><email>bhardwajsonheight@gmail.com</email></author><author><name>Arvind Bhardwaj</name><user>auto-converted</user><email>bhardwajsonheight@gmail.com</email></author></authors>
13
- <date>2011-02-08</date>
14
- <time>09:47:22</time>
15
- <contents><target name="magelocal"><dir name="Customwishlist"><dir name="Customwishlist"><dir name="controllers"><file name="IndexController.php" hash="10b92133ffaa20d5dd6d31da009701eb"/></dir></dir></dir><dir name="Mage"><dir name="Wishlist"><dir name="Block"><file name="Abstract.php" hash="72b0d8f8e4da904d168363d3a57b6fb4"/><dir name="Customer"><file name="Wishlist.php" hash="384efdba68ca1ed7c665bc848c218da6"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="wishlist"><file name="view.phtml" hash="8a2a83127edb746386a1e6a4e2f90fd1"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Customwishlist_Customwishlist.xml" hash="76f03ae1f3d1904758bd80b113dfe207"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>WishlistPlus</name>
4
+ <version>1.0.2.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
9
  <summary>WishlistPlus adds the features of Pagination, search and selective add to cart to your wishlst module.</summary>
10
  <description>WishlistPlus adds the features of Pagination, search and selective add to cart to your wishlst module.</description>
11
  <notes>WishlistPlus adds the features of Pagination, search and selective add to cart to your wishlst module.</notes>
12
+ <authors><author><name>Arvind Bhardwaj</name><user>auto-converted</user><email>bhardwajsonheight@gmail.com</email></author></authors>
13
+ <date>2011-02-12</date>
14
+ <time>08:33:27</time>
15
+ <contents><target name="magelocal"><dir name="Customwishlist"><dir name="Customwishlist"><dir name="controllers"><file name="IndexController.php" hash="10b92133ffaa20d5dd6d31da009701eb"/></dir><dir name="etc"><file name="config.xml" hash="b8a2e5b2694ec258fd4ca90124e074f5"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="wishlist"><file name="view.phtml" hash="8a2a83127edb746386a1e6a4e2f90fd1"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Customwishlist_Customwishlist.xml" hash="76f03ae1f3d1904758bd80b113dfe207"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>