addwish - Version 1.0.0

Version Notes

New multisite module

Download this release

Release Info

Developer addwish
Extension addwish
Version 1.0.0
Comparing to
See all releases


Code changes from version 0.20.2 to 1.0.0

.DS_Store DELETED
Binary file
app/.DS_Store DELETED
Binary file
app/code/.DS_Store DELETED
Binary file
app/code/local/.DS_Store DELETED
Binary file
app/code/local/Addwish/.DS_Store DELETED
Binary file
app/code/local/Addwish/Awext/.DS_Store DELETED
Binary file
app/code/local/Addwish/Awext/Block/.DS_Store DELETED
Binary file
app/code/local/Addwish/Awext/Block/Adminhtml/.DS_Store DELETED
Binary file
app/code/local/Addwish/Awext/Block/Adminhtml/Awext/.DS_Store DELETED
Binary file
app/code/local/Addwish/Awext/Block/Adminhtml/Awext/View/.DS_Store DELETED
Binary file
app/code/local/Addwish/Awext/Model/Observer.php CHANGED
@@ -9,7 +9,7 @@ class Addwish_Awext_Model_Observer
9
10
$url = Mage::getUrl('awext/index/upsells');
11
Mage::getSingleton('core/session')->addSuccess('Product Added to Cart!');
12
- $request->setParam('return_url',$url);
13
} else {
14
return;
15
}
@@ -19,19 +19,14 @@ class Addwish_Awext_Model_Observer
19
$event = $observer->getEvent();
20
$customer = $event->getCustomer();
21
$email = $customer->getEmail();
22
- Mage::getSingleton('core/session')->setAddWishEmail($email);
23
}
24
25
- public function addwishHeader($observer=null){
26
- $update=Mage::getSingleton('core/layout')->getUpdate();
27
- $update->addHandle('addwish_head_add');
28
- }
29
-
30
- public function getbillingData($observer=null){
31
$addressObject=$observer->getEvent()->getQuoteAddress();
32
$quote = $observer->getEvent()->getQuoteAddress()->getQuote();
33
$email=$quote->getBillingAddress()->getEmail();
34
- Mage::getSingleton('core/session')->setAddWishEmail($email);
35
}
36
37
public function orderSuccess($observer) {
9
10
$url = Mage::getUrl('awext/index/upsells');
11
Mage::getSingleton('core/session')->addSuccess('Product Added to Cart!');
12
+ $request->setParam('return_url', $url);
13
} else {
14
return;
15
}
19
$event = $observer->getEvent();
20
$customer = $event->getCustomer();
21
$email = $customer->getEmail();
22
+ Mage::getSingleton('core/session')->setAddwishEmail($email);
23
}
24
25
+ public function getBillingData($observer=null){
26
$addressObject=$observer->getEvent()->getQuoteAddress();
27
$quote = $observer->getEvent()->getQuoteAddress()->getQuote();
28
$email=$quote->getBillingAddress()->getEmail();
29
+ Mage::getSingleton('core/session')->setAddwishEmail($email);
30
}
31
32
public function orderSuccess($observer) {
app/code/local/Addwish/Awext/etc/config.xml CHANGED
@@ -2,27 +2,19 @@
2
<config>
3
<modules>
4
<Addwish_Awext>
5
- <version>0.20.2</version>
6
</Addwish_Awext>
7
</modules>
8
<frontend>
9
<events>
10
<sales_quote_address_save_after>
11
<observers>
12
- <getbillingData>
13
<class>Addwish_Awext_Model_Observer</class>
14
- <method>getbillingData</method>
15
- </getbillingData>
16
</observers>
17
</sales_quote_address_save_after>
18
- <controller_action_layout_load_before>
19
- <observers>
20
- <addwishHeader>
21
- <class>Addwish_Awext_Model_Observer</class>
22
- <method>addwishHeader</method>
23
- </addwishHeader>
24
- </observers>
25
- </controller_action_layout_load_before>
26
<customer_register_success>
27
<observers>
28
<customerRegisterData>
2
<config>
3
<modules>
4
<Addwish_Awext>
5
+ <version>1.0.0</version>
6
</Addwish_Awext>
7
</modules>
8
<frontend>
9
<events>
10
<sales_quote_address_save_after>
11
<observers>
12
+ <getBillingData>
13
<class>Addwish_Awext_Model_Observer</class>
14
+ <method>getBillingData</method>
15
+ </getBillingData>
16
</observers>
17
</sales_quote_address_save_after>
18
<customer_register_success>
19
<observers>
20
<customerRegisterData>
app/code/local/Addwish/Awext/sql/addwish_setup/mysql4-install-0.0.4.php CHANGED
@@ -22,8 +22,5 @@ delete from `".$prefix."core_url_rewrite` where request_path in ('addwish-search
22
INSERT INTO `".$prefix."addwish` (`id`, `userId`, `enableUpsells`,`ipaddress`) VALUES ('1', '', '0','46.137.110.51');");
23
24
Mage::getModel('core/url_rewrite')->setIsSystem(0)->setOptions('')->setIdPath('Add Wish Search')->setTargetPath('/awext/index/search')->setRequestPath('addwish-search-result.html')->save();
25
- Mage::getModel('core/url_rewrite')->setIsSystem(0)->setOptions('')->setIdPath('Add Wish Order list')->setTargetPath('awext/index/orderlist')->setRequestPath('orderExportFeed.xml')->save();
26
-
27
28
$installer->endSetup();
29
- ?>
22
INSERT INTO `".$prefix."addwish` (`id`, `userId`, `enableUpsells`,`ipaddress`) VALUES ('1', '', '0','46.137.110.51');");
23
24
Mage::getModel('core/url_rewrite')->setIsSystem(0)->setOptions('')->setIdPath('Add Wish Search')->setTargetPath('/awext/index/search')->setRequestPath('addwish-search-result.html')->save();
25
26
$installer->endSetup();
app/design/frontend/base/default/layout/awext.xml CHANGED
@@ -1,20 +1,14 @@
1
<?xml version="1.0"?>
2
<layout version="0.1.0">
3
- <addwish_head_add>
4
- <block type="core/template" name="addwishheader" template="addwish/addwish-head.phtml"/>
5
- <reference name="header">
6
- <action method="append"><block>addwishheader</block></action>
7
- </reference>
8
- <reference name="head">
9
- <action method="append"><block>addwishheader</block></action>
10
- </reference>
11
- </addwish_head_add>
12
<default>
13
<reference name="before_body_end">
14
<block type="core/template" name="addwish-tracking" template="addwish/integrator.phtml" />
15
<block type="core/template" name="addwish-conversion" template="addwish/conversion-span.phtml"/>
16
<block type="core/template" name="addwish-basket" template="addwish/basket-span.phtml"/>
17
</reference>
18
</default>
19
<catalog_product_view>
20
<reference name="before_body_end">
1
<?xml version="1.0"?>
2
<layout version="0.1.0">
3
<default>
4
<reference name="before_body_end">
5
<block type="core/template" name="addwish-tracking" template="addwish/integrator.phtml" />
6
<block type="core/template" name="addwish-conversion" template="addwish/conversion-span.phtml"/>
7
<block type="core/template" name="addwish-basket" template="addwish/basket-span.phtml"/>
8
</reference>
9
+ <reference name="head">
10
+ <block type="core/template" name="addwish-header" template="addwish/addwish-head.phtml"/>
11
+ </reference>
12
</default>
13
<catalog_product_view>
14
<reference name="before_body_end">
app/design/frontend/base/default/template/addwish/addwish-head.phtml CHANGED
@@ -1,15 +1,10 @@
1
<?php
2
- $customerEmail=Mage::getSingleton('core/session')->getAddWishEmail();
3
- if(isset($customerEmail)){
4
- ?>
5
- <meta content="<?php echo $customerEmail;?>" name="aw:userEmail"/>
6
- <?php
7
- }else{
8
- if(Mage::getSingleton('customer/session')->isLoggedIn()){
9
- $customer=Mage::getSingleton('customer/session')->getCustomer();
10
- ?>
11
- <meta content="<?php echo $customer->getEmail();?>" name="aw:userEmail"/>
12
- <?php
13
}
14
- }
15
- ?>
1
<?php
2
+
3
+ $customerEmail=Mage::getSingleton('core/session')->getAddwishEmail();
4
+ if(!isset($customerEmail) && Mage::getSingleton('customer/session')->isLoggedIn()) {
5
+ $customer=Mage::getSingleton('customer/session')->getCustomer();
6
+ $customerEmail = $customer->getEmail();
7
}
8
+ if(isset($customerEmail)){
9
+ echo "<meta content=\"".htmlentities($customerEmail)."\" name=\"aw:userEmail\"/>\n";
10
+ }
app/design/frontend/base/default/template/addwish/basket-span.phtml CHANGED
@@ -1,19 +1,19 @@
1
- <?php $quote = Mage::getSingleton('checkout/session')->getQuote(); ?><span class="addwish-basket" style="display:none"
2
- data-total="<?php echo number_format($quote->getData('grand_total'), 2, '.', '');?>">
3
<?php
4
- $cartItems = Mage::getModel('checkout/cart')->getItems();
5
- if(count($cartItems)>0){
6
- foreach($cartItems->getData() as $cartProduct){
7
- $product=Mage::getModel('catalog/product')->load($cartProduct['product_id']);
8
- if($product->isVisibleInSiteVisibility()){ ?>
9
<span class="addwish-product"
10
data-url="<?php echo $product->getProductUrl();?>"
11
data-id="<?php echo $product->getId();?>"
12
data-productnumber="<?php echo $product->getSku();?>"
13
data-quantity="<?php echo (int)$cartProduct['qty'];?>">
14
- </span><?php
15
- }
16
- }
17
- }
18
- ?>
19
</span>
1
<?php
2
+ $cart = Mage::getSingleton('checkout/cart');
3
+ $quote = $cart->getQuote();
4
+ $cartItems = $cart->getItems();
5
+ ?>
6
+ <span class="addwish-basket addwish-cart" style="display:none"
7
+ data-total="<?php echo number_format($quote->getData('grand_total'), 2, '.', '');?>">
8
+ <?php foreach($cartItems as $cartProduct):
9
+ $product=Mage::getModel('catalog/product')->load($cartProduct['product_id']);
10
+ if($product->isVisibleInSiteVisibility()): ?>
11
<span class="addwish-product"
12
data-url="<?php echo $product->getProductUrl();?>"
13
data-id="<?php echo $product->getId();?>"
14
data-productnumber="<?php echo $product->getSku();?>"
15
data-quantity="<?php echo (int)$cartProduct['qty'];?>">
16
+ </span>
17
+ <?php endif ?>
18
+ <?php endforeach ?>
19
</span>
app/design/frontend/base/default/template/addwish/conversion-span.phtml CHANGED
@@ -3,10 +3,22 @@ $orderIds = $this->getOrderIds();
3
if($orderIds && count($orderIds)) {
4
$orderId = $orderIds[0];
5
$order = Mage::getModel('sales/order')->load($orderId);
6
if($order && $order->getId()):?>
7
<span class="addwish-conversion" style="display:none;"
8
data-ordernumber="<?php echo $order->getIncrementId();?>"
9
- data-total="<?php echo number_format($order->getGrandTotal(), 2, '.', '');?>">
10
<?php $cartItems= $order->getAllItems();
11
foreach($cartItems as $cartProduct):
12
$product=Mage::getModel('catalog/product')->load($cartProduct->getData('product_id'));
3
if($orderIds && count($orderIds)) {
4
$orderId = $orderIds[0];
5
$order = Mage::getModel('sales/order')->load($orderId);
6
+ $customerEmail=Mage::getSingleton('core/session')->getAddwishEmail();
7
+ error_log("Session ".$customerEmail);
8
+ if($order->getCustomerEmail()) {
9
+ $customerEmail = $order->getCustomerEmail();
10
+ error_log("Order ".$customerEmail);
11
+ } else if(!isset($customerEmail) && Mage::getSingleton('customer/session')->isLoggedIn()) {
12
+ $customer=Mage::getSingleton('customer/session')->getCustomer();
13
+ $customerEmail = $customer->getEmail();
14
+ error_log("Logged in ".$customerEmail);
15
+ }
16
+
17
if($order && $order->getId()):?>
18
<span class="addwish-conversion" style="display:none;"
19
data-ordernumber="<?php echo $order->getIncrementId();?>"
20
+ data-total="<?php echo number_format($order->getGrandTotal(), 2, '.', '');?>"
21
+ data-email="<?php echo $customerEmail ?>">
22
<?php $cartItems= $order->getAllItems();
23
foreach($cartItems as $cartProduct):
24
$product=Mage::getModel('catalog/product')->load($cartProduct->getData('product_id'));
package.xml CHANGED
@@ -1,2 +1,2 @@
1
<?xml version="1.0"?>
2
- <package><name>addwish</name><version>0.20.2</version><stability>stable</stability><license>GNU General Public License (GPL)</license><channel>community</channel><extends></extends><summary>New multisite module</summary><description>New multisite module</description><notes>New multisite module</notes><authors><author><name>addwish</name><user>addwish</user><email>krj@addwish.com</email></author></authors><date>2017-06-22</date><time>1:48:06</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>8.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="code"><dir name="local"><dir name="Addwish"><dir name="Awext"><dir name="Block"><dir name="Adminhtml"><dir name="Awext"><file name="View.php" hash="a5a5aa835bdbaf1102b50e90dec526a8"/><dir name="View"><file name="Tabs.php" hash="b68e152475528d168d92ca6e8ad6eafc"/><dir name="Tab"><file name="Details.php" hash="eff51a28eacafbe07577af60237ad9c4"/><file name="Recommend.php" hash="02d71705312a1de1da6445027bb0926d"/><file name="Search.php" hash="c94f0146c7529f0542100a871446c4f0"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="c777dfcbb9c8af630f0a9202b2463f47"/><dir name="Adminhtml"><file name="AwextController.php" hash="abf8b0b390b17add398d3af44e394d91"/></dir></dir><dir name="etc"><file name="config.xml" hash="aaf521206e6d0bf179eef8418c555f81"/></dir><dir name="Helper"><file name="Data.php" hash="8cebb04f255d5b4edcd38f3c271a989c"/></dir><dir name="Model"><file name="Awext.php" hash="1925cb6fd94cc7cd6baecda71964a424"/><file name="Observer.php" hash="510c80ff97a3d611f1f6bb9b54d486bb"/><dir name="Mysql4"><file name="Awext.php" hash="acd112233e367ebe80caf114f5dfe653"/><dir name="Awext"><file name="Collection.php" hash="12afe62372c67a5bd9154695c8d095f3"/></dir></dir></dir><dir name="sql"><dir name="addwish_setup"><file name="mysql4-install-0.0.4.php" hash="77a5d3d50380396c9bd2a9dfdfea8905"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="awext.xml" hash="b632bf4a38cfb992303f97cd7a449a15"/></dir><dir name="template"><dir name="awext"><file name="list.phtml" hash="5eedadcd2400f296b7ff3a77823cc4e4"/><file name="recommendations.phtml" hash="f8e63393c235903babd5a27a68b4a054"/><file name="search.phtml" hash="82d7130e256b0689d3b1682bf097fa55"/><file name="store-selector.phtml" hash="275b91522d136265f22de6550c7ca6dc"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="awext.xml" hash="b3b9b636bb472bae79628db04bb0dc84"/></dir><dir name="template"><dir name="addwish"><file name="addwish-head.phtml" hash="c5b6fa2cae55ad1ddd4a5c64f8d532f6"/><file name="basket-span.phtml" hash="3a99f0325a848b3c3e3e250269e4e84a"/><file name="conversion-span.phtml" hash="a2b47bc7cae4d983810f5d2efce04958"/><file name="integrator.phtml" hash="0a41e4e5c3f63f05dfce43040e52dd53"/><file name="product-span.phtml" hash="690c67739d6d4ad49c48a21939c1ab4f"/><file name="search-result-page.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="upsells-page.phtml" hash="ac41002da8c7bb57233599a00053ef77"/></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Addwish_Awext.xml" hash="fea2883f86536f249670eea31980f72c"/></dir></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><file name="addwish.css" hash="df6e33a58cf2381ceaba72253a29796d"/></dir><dir name="images"><dir name="addwish"><file name="addwish.png" hash="a588d24d1919d9206eff40a886b88ef1"/></dir></dir></dir></dir></dir></dir></target></contents></package>
1
<?xml version="1.0"?>
2
+ <package><name>addwish</name><version>1.0.0</version><stability>stable</stability><license>GNU General Public License (GPL)</license><channel>community</channel><extends></extends><summary>New multisite module</summary><description>New multisite module</description><notes>New multisite module</notes><authors><author><name>addwish</name><user>addwish</user><email>krj@addwish.com</email></author></authors><date>2017-08-04</date><time>5:36:48</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>8.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="code"><dir name="local"><dir name="Addwish"><dir name="Awext"><dir name="Block"><dir name="Adminhtml"><dir name="Awext"><file name="View.php" hash="a5a5aa835bdbaf1102b50e90dec526a8"/><dir name="View"><file name="Tabs.php" hash="b68e152475528d168d92ca6e8ad6eafc"/><dir name="Tab"><file name="Details.php" hash="eff51a28eacafbe07577af60237ad9c4"/><file name="Recommend.php" hash="02d71705312a1de1da6445027bb0926d"/><file name="Search.php" hash="c94f0146c7529f0542100a871446c4f0"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="c777dfcbb9c8af630f0a9202b2463f47"/><dir name="Adminhtml"><file name="AwextController.php" hash="abf8b0b390b17add398d3af44e394d91"/></dir></dir><dir name="etc"><file name="config.xml" hash="5932ed69c87363dd95699165163e0daf"/></dir><dir name="Helper"><file name="Data.php" hash="8cebb04f255d5b4edcd38f3c271a989c"/></dir><dir name="Model"><file name="Awext.php" hash="1925cb6fd94cc7cd6baecda71964a424"/><file name="Observer.php" hash="8af133ea91c417a754084b784e741f3f"/><dir name="Mysql4"><file name="Awext.php" hash="acd112233e367ebe80caf114f5dfe653"/><dir name="Awext"><file name="Collection.php" hash="12afe62372c67a5bd9154695c8d095f3"/></dir></dir></dir><dir name="sql"><dir name="addwish_setup"><file name="mysql4-install-0.0.4.php" hash="77d2f3700939b22938172052fb2c5d36"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="awext.xml" hash="b632bf4a38cfb992303f97cd7a449a15"/></dir><dir name="template"><dir name="awext"><file name="list.phtml" hash="5eedadcd2400f296b7ff3a77823cc4e4"/><file name="recommendations.phtml" hash="f8e63393c235903babd5a27a68b4a054"/><file name="search.phtml" hash="82d7130e256b0689d3b1682bf097fa55"/><file name="store-selector.phtml" hash="275b91522d136265f22de6550c7ca6dc"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="awext.xml" hash="b92327939b7971aa0cc53e7c870a8b88"/></dir><dir name="template"><dir name="addwish"><file name="addwish-head.phtml" hash="476acfe8eebe96f01c5f2575b2ade61a"/><file name="basket-span.phtml" hash="28f68b1e44337cc19166801972e93637"/><file name="conversion-span.phtml" hash="2b87e596ed37545e2d6b189251dee4ce"/><file name="integrator.phtml" hash="0a41e4e5c3f63f05dfce43040e52dd53"/><file name="product-span.phtml" hash="690c67739d6d4ad49c48a21939c1ab4f"/><file name="search-result-page.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="upsells-page.phtml" hash="ac41002da8c7bb57233599a00053ef77"/></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Addwish_Awext.xml" hash="fea2883f86536f249670eea31980f72c"/></dir></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><file name="addwish.css" hash="df6e33a58cf2381ceaba72253a29796d"/></dir><dir name="images"><dir name="addwish"><file name="addwish.png" hash="a588d24d1919d9206eff40a886b88ef1"/></dir></dir></dir></dir></dir></dir></target></contents></package>