Link_Iwish - Version 1.1.0

Version Notes

* Magento 1.8 is now supported.
* Clicking the URL on the created wish on iWish.be will automatically add the product to your shopping cart.
* Some bug fixes.

Download this release

Release Info

Developer LIN.K NV
Extension Link_Iwish
Version 1.1.0
Comparing to
See all releases


Code changes from version 1.0.1 to 1.1.0

app/code/community/{LinK → Link}/Iwish/Block/Button.php RENAMED
File without changes
app/code/community/{LinK → Link}/Iwish/Helper/Data.php RENAMED
File without changes
app/code/community/{LinK → Link}/Iwish/Model/ButtonSizes.php RENAMED
@@ -16,7 +16,6 @@ class Link_Iwish_Model_ButtonSizes
16
  array('value'=>50, 'label'=>Mage::helper('iwish')->__('Big (50px)')),
17
  );
18
  }
19
-
20
  }
21
 
22
  ?>
16
  array('value'=>50, 'label'=>Mage::helper('iwish')->__('Big (50px)')),
17
  );
18
  }
 
19
  }
20
 
21
  ?>
app/code/community/Link/Iwish/controllers/AddController.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Created by PhpStorm.
4
+ * User: gvhoecke
5
+ * Date: 04/12/13
6
+ * Time: 10:49
7
+ */
8
+
9
+ class Link_Iwish_AddController extends Mage_Core_Controller_Front_Action
10
+ {
11
+ public function indexAction()
12
+ {
13
+ $coupon_code = $this->getRequest()->getParam( 'coupon_code' ); //To automatically apply a coupon code
14
+
15
+ if( $coupon_code != '' ) {
16
+
17
+ Mage::getSingleton( 'checkout/session' )->setData( 'coupon_code', $coupon_code );
18
+ Mage::getSingleton( 'checkout/cart' )->getQuote()->setCouponCode( $coupon_code )->save();
19
+ Mage::getSingleton( 'core/session' )->addSuccess( $this->__( 'Coupon was automatically applied' ) );
20
+ }
21
+
22
+ $product_id = $this->getRequest()->getParam( 'product' );
23
+ $qty = $this->getRequest()->getParam( 'qty' ); //Used if your qty is not hard coded
24
+ $cart = Mage::getModel( 'checkout/cart' );
25
+ $cart->init();
26
+
27
+ if( $product_id == '' ) {
28
+
29
+ $this->_redirect( '/' );
30
+ }
31
+
32
+ $productModel = Mage::getModel( 'catalog/product' )->load( $product_id );
33
+
34
+ if( TRUE ) {
35
+
36
+ try {
37
+
38
+ $cart->addProduct( $productModel, array( 'qty' => '1' ) ); //qty is hard coded
39
+ }
40
+ catch( Exception $e ) {
41
+
42
+ $this->_redirect( '/' );
43
+ }
44
+ }
45
+
46
+ $cart->save();
47
+
48
+ if( $this->getRequest()->isXmlHttpRequest() ) {
49
+
50
+ exit( '1' );
51
+ }
52
+
53
+ $this->_redirect( 'checkout/cart' );
54
+ }
55
+ }
app/code/community/{LinK → Link}/Iwish/etc/adminhtml.xml RENAMED
@@ -2,6 +2,9 @@
2
  <config>
3
  <acl>
4
  <resources>
 
 
 
5
  <admin>
6
  <children>
7
  <system>
2
  <config>
3
  <acl>
4
  <resources>
5
+ <all>
6
+ <title>Allow Everything</title>
7
+ </all>
8
  <admin>
9
  <children>
10
  <system>
app/code/community/{LinK → Link}/Iwish/etc/config.xml RENAMED
@@ -1,5 +1,6 @@
1
  <?xml version="1.0"?>
2
  <config>
 
3
  <modules>
4
  <Link_Iwish>
5
  <version>0.1.0</version>
@@ -31,6 +32,15 @@
31
  </Link_Iwish>
32
  </updates>
33
  </layout>
 
 
 
 
 
 
 
 
 
34
  </frontend>
35
 
36
  <default>
1
  <?xml version="1.0"?>
2
  <config>
3
+
4
  <modules>
5
  <Link_Iwish>
6
  <version>0.1.0</version>
32
  </Link_Iwish>
33
  </updates>
34
  </layout>
35
+ <routers>
36
+ <iwish>
37
+ <use>standard</use>
38
+ <args>
39
+ <module>Link_Iwish</module>
40
+ <frontName>urlcheckout</frontName>
41
+ </args>
42
+ </iwish>
43
+ </routers>
44
  </frontend>
45
 
46
  <default>
app/code/community/{LinK → Link}/Iwish/etc/system.xml RENAMED
@@ -42,7 +42,7 @@
42
  <label>Button size</label>
43
  <comment><![CDATA[No template changes are required, just enable the button.]]></comment>
44
  <frontend_type>select</frontend_type>
45
- <source_model>iwish/buttonsizes</source_model>
46
  <show_in_default>1</show_in_default>
47
  <show_in_store>1</show_in_store>
48
  <show_in_website>1</show_in_website>
42
  <label>Button size</label>
43
  <comment><![CDATA[No template changes are required, just enable the button.]]></comment>
44
  <frontend_type>select</frontend_type>
45
+ <source_model>iwish/buttonSizes</source_model>
46
  <show_in_default>1</show_in_default>
47
  <show_in_store>1</show_in_store>
48
  <show_in_website>1</show_in_website>
app/design/frontend/base/default/template/iwish/button.phtml CHANGED
@@ -6,5 +6,5 @@
6
  data-name="<?php echo Mage::registry('current_product')->getName(); ?>"
7
  data-description="<?php echo Mage::registry('current_product')->getDescription(); ?>"
8
  data-price="<?php echo Mage::registry('current_product')->getPrice(); ?>"
9
- data-url="<?php echo Mage::registry('current_product')->getProductUrl(); ?>"
10
  data-image="<?php echo Mage::registry('current_product')->getImageUrl(); ?>"><?php echo Mage::helper('iwish')->__('Add to my iWish');?></div>
6
  data-name="<?php echo Mage::registry('current_product')->getName(); ?>"
7
  data-description="<?php echo Mage::registry('current_product')->getDescription(); ?>"
8
  data-price="<?php echo Mage::registry('current_product')->getPrice(); ?>"
9
+ data-url="<?php echo Mage::getBaseUrl() . 'urlcheckout/add?product=' . Mage::registry('current_product')->getId() . '&qty=1'; ?>"
10
  data-image="<?php echo Mage::registry('current_product')->getImageUrl(); ?>"><?php echo Mage::helper('iwish')->__('Add to my iWish');?></div>
app/etc/modules/Link_Iwish.xml CHANGED
@@ -1,12 +1,12 @@
1
  <?xml version="1.0"?>
2
  <config>
3
  <modules>
4
- <Link_IWish>
5
  <active>true</active>
6
  <codePool>community</codePool>
7
  <!--<depends>-->
8
  <!--<Mage_Cms />-->
9
  <!--</depends>-->
10
- </Link_IWish>
11
  </modules>
12
  </config>
1
  <?xml version="1.0"?>
2
  <config>
3
  <modules>
4
+ <Link_Iwish>
5
  <active>true</active>
6
  <codePool>community</codePool>
7
  <!--<depends>-->
8
  <!--<Mage_Cms />-->
9
  <!--</depends>-->
10
+ </Link_Iwish>
11
  </modules>
12
  </config>
package.xml CHANGED
@@ -1,24 +1,26 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Link_Iwish</name>
4
- <version>1.0.1</version>
5
  <stability>stable</stability>
6
- <license>Apache Software License </license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Add integration with universal iWish.be wishlists to your store.</summary>
10
- <description>This extension offers free integration with the iWish.be universal wishlist site. &#xD;
11
  &#xD;
12
- Installing this plugin automatically adds the iWish.be button to each product page on your store, allowing users to add your products to their own wishlists with just a single click. Obviously, other iWish.be users wanting to purchase the product as a gift are directed back to your store.&#xD;
13
  &#xD;
14
- Configuration options for the iWish button are available in the Admin Panel (System -&gt; Configuration). Note that this plugin by default includes jQuery on your product page. You can disable this in the plugin's settings.&#xD;
15
  &#xD;
16
- To learn more about iWish, visit http://iwish.be</description>
17
- <notes>Initial release</notes>
18
- <authors><author><name>Lin.K N.V.</name><user>sgdesmet</user><email>magento@iwish.be</email></author></authors>
19
- <date>2012-12-12</date>
20
- <time>09:25:21</time>
21
- <contents><target name="magecommunity"><dir name="LinK"><dir name="Iwish"><dir name="Block"><file name="Button.php" hash="67dbe47dfa713bfea939c96d60a38ee4"/></dir><dir name="Helper"><file name="Data.php" hash="a8712c3b6171eb45f27734d0d39969ee"/></dir><dir name="Model"><file name="ButtonSizes.php" hash="98b3d59419bab36cd863d972ea3bac92"/></dir><dir name="etc"><file name="adminhtml.xml" hash="0432c60b691a70205f79316fbe730d37"/><file name="config.xml" hash="6b2c5d633011aadf310eeb0ae77f7eb4"/><file name="system.xml" hash="39d2db372f7aebe62c26f58b89634759"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="iwish"><file name="button.phtml" hash="fabd36d7c8f2a6f5ffa47cdd67d5fca5"/></dir></dir><dir name="layout"><file name="iwish.xml" hash="cc8042d40afb0b383ade8cec99bb7b2a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Link_Iwish.xml" hash="1904032fc1a1770ac0a0da479ff236e4"/></dir></target></contents>
 
 
22
  <compatible/>
23
- <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
24
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Link_Iwish</name>
4
+ <version>1.1.0</version>
5
  <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/apachepl.php">ASL</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Integrate universal wishlists from iWish.be in your store.</summary>
10
+ <description>&lt;p&gt;This extension offers free integration with the iWish.be universal wishlist site.&lt;/p&gt;&#xD;
11
  &#xD;
12
+ &lt;p&gt;Installing this plugin automatically adds the iWish.be button to each product page on your store, allowing users to add your products to their own wishlists with just a single click. Obviously, other iWish.be users wanting to purchase the product as a gift are directed back to your store. &lt;/p&gt;&#xD;
13
  &#xD;
14
+ &lt;p&gt;Configuration options for the iWish button are available in the Admin Panel (System -&gt; Configuration). Note that this plugin by default includes jQuery on your product page. You can disable this in the plugin's settings.&lt;/p&gt;&#xD;
15
  &#xD;
16
+ &lt;p&gt;To learn more about iWish, visit http://iwish.be&lt;/p&gt;</description>
17
+ <notes>* Magento 1.8 is now supported.&#xD;
18
+ * Clicking the URL on the created wish on iWish.be will automatically add the product to your shopping cart.&#xD;
19
+ * Some bug fixes.</notes>
20
+ <authors><author><name>LIN.K NV</name><user>linkid</user><email>safeonline-dev@lin-k.net</email></author><author><name>Gianni Van Hoecke</name><user>giannivh</user><email>gianni.vh@gmail.com</email></author><author><name>Stein Desmet</name><user>linkid</user><email>stein@lin-k.net</email></author></authors>
21
+ <date>2013-12-04</date>
22
+ <time>15:54:34</time>
23
+ <contents><target name="magecommunity"><dir name="Link"><dir name="Iwish"><dir name="Block"><file name="Button.php" hash="67dbe47dfa713bfea939c96d60a38ee4"/></dir><dir name="Helper"><file name="Data.php" hash="a8712c3b6171eb45f27734d0d39969ee"/></dir><dir name="Model"><file name="ButtonSizes.php" hash="3e5b0301b4bb92cac4765697a28334b4"/></dir><dir name="controllers"><file name="AddController.php" hash="3f9100af3c7a6197ed5ffe0eceb9915a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="8c0ae781f4d7873d9061037042f78cd9"/><file name="config.xml" hash="7a716feb16a0382053648141aa7bd703"/><file name="system.xml" hash="331f9209ae2da4159573f2ed60826360"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="iwish.xml" hash="cc8042d40afb0b383ade8cec99bb7b2a"/></dir><dir name="template"><dir name="iwish"><file name="button.phtml" hash="e70a2879382cbd4ac35fe52bd9ebcfed"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Link_Iwish.xml" hash="35eab846f3a37f0cc364a6ac40d6cbc6"/></dir></target></contents>
24
  <compatible/>
25
+ <dependencies><required><php><min>4.1.0</min><max>5.5.6</max></php></required></dependencies>
26
  </package>