addwish - Version 0.14.0

Version Notes

New multisite module

Download this release

Release Info

Developer addwish
Extension addwish
Version 0.14.0
Comparing to
See all releases


Code changes from version 0.13.0 to 0.14.0

app/design/adminhtml/default/default/layout/awext.xml ADDED
@@ -0,0 +1,155 @@
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <awext_adminhtml_awext_index>
4
+ <reference name="head">
5
+ <action method="setTitle">
6
+ <title>addwish Settings</title>
7
+ </action>
8
+ <action method="setTitle">
9
+ <title>addwish Settings</title>
10
+ </action>
11
+ <action method="setCanLoadTinyMce">
12
+ <load>1</load>
13
+ </action>
14
+ <action method="setCanLoadExtJs">
15
+ <flag>1</flag>
16
+ </action>
17
+ <action method="addJs">
18
+ <script>mage/adminhtml/variables.js</script>
19
+ </action>
20
+ <action method="addJs">
21
+ <script>mage/adminhtml/wysiwyg/widget.js</script>
22
+ </action>
23
+ <action method="addJs">
24
+ <script>lib/flex.js</script>
25
+ </action>
26
+ <action method="addJs">
27
+ <script>lib/FABridge.js</script>
28
+ </action>
29
+ <action method="addJs">
30
+ <script>mage/adminhtml/flexuploader.js</script>
31
+ </action>
32
+ <action method="addJs">
33
+ <script>mage/adminhtml/browser.js</script>
34
+ </action>
35
+ <action method="addJs">
36
+ <script>prototype/window.js</script>
37
+ </action>
38
+ <action method="addItem">
39
+ <name>skin/adminhtml/default/default/lib/prototype/windows/themes/magento.css
40
+ </name>
41
+ </action>
42
+ <action method="addItem">
43
+ <type>js_css</type>
44
+ <name>prototype/windows/themes/default.css</name>
45
+ </action>
46
+ </reference>
47
+ <reference name="content">
48
+ <block type="awext/adminhtml_awext" name="awext" />
49
+ </reference>
50
+ </awext_adminhtml_awext_index>
51
+ <awext_adminhtml_awext_edit>
52
+ <reference name="head">
53
+ <action method="setTitle">
54
+ <title>addwish Settings</title>
55
+ </action>
56
+ <action method="setTitle">
57
+ <title>addwish Settings</title>
58
+ </action>
59
+ <action method="setCanLoadTinyMce">
60
+ <load>1</load>
61
+ </action>
62
+ <action method="setCanLoadExtJs">
63
+ <flag>1</flag>
64
+ </action>
65
+ <action method="addJs">
66
+ <script>mage/adminhtml/variables.js</script>
67
+ </action>
68
+ <action method="addJs">
69
+ <script>mage/adminhtml/wysiwyg/widget.js</script>
70
+ </action>
71
+ <action method="addJs">
72
+ <script>lib/flex.js</script>
73
+ </action>
74
+ <action method="addJs">
75
+ <script>lib/FABridge.js</script>
76
+ </action>
77
+ <action method="addJs">
78
+ <script>mage/adminhtml/flexuploader.js</script>
79
+ </action>
80
+ <action method="addJs">
81
+ <script>mage/adminhtml/browser.js</script>
82
+ </action>
83
+ <action method="addJs">
84
+ <script>prototype/window.js</script>
85
+ </action>
86
+ <action method="addItem">
87
+ <name>skin/adminhtml/default/default/lib/prototype/windows/themes/magento.css
88
+ </name>
89
+ </action>
90
+ <action method="addItem">
91
+ <type>js_css</type>
92
+ <name>prototype/windows/themes/default.css</name>
93
+ </action>
94
+ </reference>
95
+ </awext_adminhtml_awext_edit>
96
+ <adminhtml_awext_view>
97
+ <reference name="content">
98
+ <block type="core/template" name="testing" before="-" template="awext/store-selector.phtml"></block>
99
+ </reference>
100
+ </adminhtml_awext_view>
101
+
102
+
103
+ <awext_adminhtml_awext_view>
104
+ <reference name="head">
105
+ <action method="setTitle">
106
+ <title>addwish Settings</title>
107
+ </action>
108
+ <action method="setTitle">
109
+ <title>addwish Settings</title>
110
+ </action>
111
+ <action method="setCanLoadTinyMce">
112
+ <load>1</load>
113
+ </action>
114
+ <action method="setCanLoadExtJs">
115
+ <flag>1</flag>
116
+ </action>
117
+ <action method="addJs">
118
+ <script>mage/adminhtml/variables.js</script>
119
+ </action>
120
+ <action method="addJs">
121
+ <script>mage/adminhtml/wysiwyg/widget.js</script>
122
+ </action>
123
+ <action method="addJs">
124
+ <script>lib/flex.js</script>
125
+ </action>
126
+ <action method="addJs">
127
+ <script>lib/FABridge.js</script>
128
+ </action>
129
+ <action method="addJs">
130
+ <script>mage/adminhtml/flexuploader.js</script>
131
+ </action>
132
+ <action method="addJs">
133
+ <script>mage/adminhtml/browser.js</script>
134
+ </action>
135
+ <action method="addJs">
136
+ <script>prototype/window.js</script>
137
+ </action>
138
+ <action method="addItem">
139
+ <name>skin/adminhtml/default/default/lib/prototype/windows/themes/magento.css
140
+ </name>
141
+ </action>
142
+ <action method="addItem">
143
+ <type>js_css</type>
144
+ <name>prototype/windows/themes/default.css</name>
145
+ </action>
146
+ </reference>
147
+ <reference name="content">
148
+ <block type="awext/adminhtml_awext_view" name="awext" />
149
+ </reference>
150
+ </awext_adminhtml_awext_view>
151
+
152
+
153
+
154
+
155
+ </layout>
app/design/adminhtml/default/default/template/awext/list.phtml ADDED
@@ -0,0 +1,126 @@
1
+ <link rel="stylesheet" href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);?>adminhtml/default/default/css/addwish.css" />
2
+ <link rel="stylesheet" href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);?>adminhtml/default/default/boxes.css" />
3
+ <div style="float: left; margin-top: 0;">
4
+ <img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);?>adminhtml/default/default/images/addwish/addwish.png" alt="addwish logo" />
5
+ </div>
6
+ <div class='clear'></div>
7
+ <div class="introtext">Great! You’ve successfully installed the addwish for business extension. This will allow you to quickly implement changes to how addwish functions on your webshop. We’ve made the extension as easy to use as possible but if you do have any questions don’t hesitate to contact us on <a href="mailto:support@addwish.com">support@addwish.com</a>. Alternatively, check out our FAQs on <a href="http://addwish.com/company/faq.html" target="_blank">http://addwish.com/company/faq.html</a>. We hope you enjoy growing your business with addwish!</div>
8
+ <div class="entry-edit">
9
+ <div class="entry-edit-head collapseable">
10
+ <a onclick="Fieldset.toggleCollapse('general_region', ''); return false;" href="#" id="general_region-head" class="">Script Setup</a>
11
+ </div>
12
+ <form action='' method='post'>
13
+ <?php
14
+ $currentStore= Mage::app()->getDefaultStoreView()->getStoreId();
15
+ if(Mage::app()->getRequest()->getParam('storeconfig')){
16
+ $currentStore=Mage::app()->getRequest()->getParam('storeconfig');
17
+ }
18
+ ?>
19
+ <input type='hidden' name='action' value='scriptsetup'/>
20
+ <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
21
+ <fieldset id="general_region" class="config collapseable">
22
+ <legend>Script Setup</legend>
23
+ <?php
24
+ $model = Mage::getModel('awext/awext')->load($currentStore);
25
+ ?>
26
+ <div class="introtext" style="margin-bottom: 10px">
27
+ In order to use this extension you'll need to have an addwish business ID.<br>If you don't already have one you can sign up for one on our <a href="http://www.addwish.com/business/"target="_blank">webpage</a> <br>
28
+ Once you have an addwish business ID enter it in the box below and press save.</div>
29
+
30
+
31
+ <div style="float: left">
32
+ <p>Your addwish ID</p>
33
+ </div>
34
+ <div style="float: left; margin-left: 20px;">
35
+ <input type='text' name='addwishID' size="40" value='<?php echo $model->getData('userId');?>'/>
36
+ </div>
37
+ <div style="float: left; margin-left: 20px;">
38
+ <input type="submit" class="form-button" value="Save" name="submit">
39
+ </div>
40
+ <div style="clear:both">
41
+
42
+ </div>
43
+
44
+ </fieldset>
45
+ </form>
46
+ </div>
47
+
48
+ <div class='clear'></div>
49
+ <div class="entry-edit">
50
+ <div class="entry-edit-head collapseable">
51
+ <a
52
+ onclick="Fieldset.toggleCollapse('general_Dataregion', ''); return false;"
53
+ href="#" id="general_Dataregion-head" class="">Data Export Setup</a>
54
+ </div>
55
+ <form action='' method='post'>
56
+ <input type='hidden' name='action' value='dataexport'/>
57
+ <input name="form_key" type="hidden"
58
+ value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
59
+ <fieldset id="general_Dataregion" class="config collapseable">
60
+ <legend>Data Export Setup</legend>
61
+ <div style="margin-bottom: 10px" class="introtext">
62
+ This extension will automatically create a product feed and an order history feed, which will allow addwish to correctly identify and display all the products on your webshop <br>and create relations between them, based on your historical orders. <br>
63
+ <br>
64
+ The product feed is being updated once pr. day. As generating the feed requires the plugin to read all product data we recommend that you choose a time when this feed can automatically re-generate daily. Please select from the drop-down selction below.
65
+ <br>
66
+ If you want to disable the product or order history feed you can do so below, however this will cause the addwish features to stop being updated and stop from displaying up-to-date.<br><br>
67
+
68
+ We have included a text area, where you can enter the IP addresses that you would allow to fetch the data feeds. The addwish IP has been pre-entered. If you would like to add another IP address, you can do so by clicking edit. If you delete all the IP addresses from this box the data exports will be publicly available.
69
+
70
+
71
+
72
+
73
+
74
+ </div>
75
+ <h6>Product feed</h6>
76
+ <div style="float:left">
77
+ <input type="checkbox" value="1" name="enable_product_feed" <?php if($model->getData('enable_product_feed')==1){echo "checked='checked'";} ?>/><label style="margin-left: 10px;">Product feed</label>
78
+ <p>You can access the feed from this URL: <a target="_blank" href="<?php echo Mage::getBaseUrl();?>awext/index">/index.php/awext/index</a> - <i><b>Please note that the feed is generated when ever the feed is requested, so coordinate with addwish as for when is the best time to request the feed</b></i></p><i><b>
79
+ </b></i>
80
+ </div>
81
+
82
+ <br>
83
+
84
+ <br>
85
+
86
+ <div style="clear:both"></div>
87
+ <hr>
88
+
89
+ <div style="margin-top: 10px;">
90
+ <h6>Order feed</h6><p>Enable and disable the order feed here. Addwish uses this to gather all needed information from historical orders to get the best possible data for our algorithms. You can access the order feed from this link
91
+ <a href="<?php echo Mage::getBaseUrl();?>awext/index/orderList/?exportFromDate=2015-11-11&amp;exportToDate=2015-12-11" target="_blank">/awext/index/orderList/?exportFromDate=2015-11-11&amp;exportToDate=2015-12-11</a></p>
92
+ </div>
93
+ <div style="clear:both; margin-top: 5px;"></div>
94
+ <div style="float:left">
95
+ <input type="checkbox" value="1" name="enable_order_feed" <?php if($model->getData('enable_order_export')==1){echo "checked='checked'";} ?>/><label for="general_region_display_all" style="margin-left: 10px;">Order feed</label>
96
+ </div>
97
+ <div style="clear:both; margin-top: 5px;"></div>
98
+ <br>
99
+ <hr>
100
+
101
+ <div style="margin-top: 10px;">
102
+ <h6>Feed access settings</h6><p>Indicate which IP addresses you will allow to access you feed data. The addwish IP is pre-entered into the text field below. Seperate each IP address with a komma. If you delete all IP addresses, all IP addresses, everybody can access your feeds.
103
+ </p><div>
104
+ <textarea name="ipaddress" id="ipaddress" style="width: 297px; height: 77px;" disabled="disabled"><?php echo $model->getData('ipaddress');?></textarea></textarea> <a href="javascript:void(0);" onclick="editip();">edit</a></div>
105
+ <div style="clear:both"></div>
106
+ <br>
107
+ <hr>
108
+ <div style="clear: both; margin-top: 10px;"></div>
109
+
110
+ <div style="float: left;">
111
+ <input type="submit" name="submit" value="Update Settings" class="form-button">
112
+ </div>
113
+ <br>
114
+ <div style="clear: both; margin-top: 10px;"></div>
115
+
116
+ </div>
117
+
118
+
119
+ </fieldset>
120
+ </form>
121
+ </div>
122
+ <script language='javascript'>
123
+ function editip(){
124
+ document.getElementById("ipaddress").disabled = false;
125
+ }
126
+ </script>
app/design/adminhtml/default/default/template/awext/recommendations.phtml ADDED
@@ -0,0 +1,70 @@
1
+ <link
2
+ rel="stylesheet"
3
+ href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);?>adminhtml/default/default/css/addwish.css" />
4
+ <link
5
+ rel="stylesheet"
6
+ href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);?>adminhtml/default/default/boxes.css" />
7
+ <div style="float: left; margin-top: 0;">
8
+ <img
9
+ src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);?>adminhtml/default/default/images/addwish/addwish.png"
10
+ alt="addwish logo" />
11
+
12
+ </div>
13
+ <div class='clear'></div>
14
+ <div class="entry-edit">
15
+ <div class="entry-edit-head collapseable">
16
+ <a class="" id="general_recommend-head" href="#" onclick="Fieldset.toggleCollapse('general_recommend', ''); return false;">Recommendations</a>
17
+ </div>
18
+ <form action="" method="post">
19
+ <?php
20
+ $currentStore= Mage::app()->getDefaultStoreView()->getStoreId();
21
+ if(Mage::app()->getRequest()->getParam('storeconfig')){
22
+ $currentStore=Mage::app()->getRequest()->getParam('storeconfig');
23
+ }
24
+ ?>
25
+ <input type="hidden" name="action" value="recomendations">
26
+ <input name="form_key" type="hidden"
27
+ value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
28
+ <fieldset class="config collapseable" id="general_recommend">
29
+ <legend>Recomendations</legend>
30
+ <?php
31
+ $model = Mage::getModel('awext/awext')->load($currentStore);
32
+ ?>
33
+ <div style="margin-bottom: 20px;" class="introtext">
34
+ Personalised recommendations will be displaying unique, relevant content targeted to their needs and shopping habits.
35
+ All the hard work of getting setup is being done by the addwish team, so please if you havn't done so yet, reach out to us, and we will make sure that all your requirements will be handled quickly.
36
+ <br>Get setup with personalised recommendations:
37
+ <br>
38
+ <ul style="list-style: none none none; margin-left: 20px;">
39
+ <li>Encourage your users to continue shopping on your shop</li>
40
+ <li>Customised algorithms to suit your customer experience strategy</li>
41
+ <li>Use them everywhere you wish, both on your front page, product page, category pages or any where else you find it relevant</li>
42
+ </ul>
43
+
44
+ Our recommendations feature automatically analyses user behaviour to recommend products that customers are most likely to buy.
45
+ <br>
46
+ <br>
47
+ In this Magento extension we have included the possibility of having a special upsell page. The upsell page will be shown everytime a product is added to the cart.<br>
48
+ On this upsell page we will have the opotunity to show specialised product recommendations for upsell based on the user and on the contents of the cart.
49
+ <br>
50
+ You can enable and disable the upsell page below. <br><br><b>Before enabling the upsell page, <u>please contact addwish support on <a href="mailto:support@addwish.com">support@addwish.com</a></u> to get you requirements for the recommendations on the upsell page implemented <br> Also please visit the upsell page before enabling the page to tailor the design of the upsell page. You can visit the page from this link : <br>
51
+ <a href="<?php echo Mage::getBaseUrl();?>awext/index/upsells?productId=3" target="_blank">awext/index/upsells?productId=3</a></b><br><i>Notice that you can change the ID in the url, to see how the product recommendations will depend on the product added to the cart.
52
+ </i>
53
+ </div>
54
+ <div style="clear:both"></div>
55
+ <div style="float: left">Enable upsell page</div>
56
+ <input type="checkbox" style="margin-left: 10px;" <?php if($model->getData('enableUpsells')==1){echo "checked='checked'";} ?> value="1" name="addwishUpsells">
57
+
58
+
59
+ <div style="clear:both; margin-top: 10px;"></div>
60
+ <hr>
61
+
62
+ <div style="float: left; margin-top: 10px;"><input type="submit" class="form-button" value="Update Settings" name="submit"></div>
63
+
64
+
65
+ <div style="clear:both"></div>
66
+
67
+
68
+ </fieldset>
69
+ </form>
70
+ </div>
app/design/adminhtml/default/default/template/awext/search-config.phtml ADDED
@@ -0,0 +1,63 @@
1
+ <style type="text/css">
2
+ table.addwishgrid {
3
+ width: 100%;
4
+ border-collapse: collapse;
5
+ /* margin:50px auto; */
6
+ }
7
+ /* Zebra striping */
8
+ table.addwishgrid tr:nth-of-type(odd) {
9
+ background: #eee;
10
+ }
11
+ table.addwishgrid th {
12
+ background: #6f8992;
13
+ color: white;
14
+ font-weight: bold;
15
+ }
16
+ table.addwishgrid td,table.addwishgrid th {
17
+ padding: 6px;
18
+ border: 1px solid #ccc;
19
+ text-align: left;
20
+ font-size: 13px;
21
+ }
22
+ </style>
23
+ <form action='' method='post'>
24
+ <input type='hidden' name='action' value='updateattributes'/>
25
+ <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
26
+ <?php
27
+ $currentStore= Mage::app()->getDefaultStoreView()->getStoreId();
28
+ if(Mage::app()->getRequest()->getParam('storeconfig')){
29
+ $currentStore=Mage::app()->getRequest()->getParam('storeconfig');
30
+ }
31
+ ?>
32
+ <div style="float: right; margin-right: 20px;">
33
+ <input type="submit" class="form-button" value="Save" name="submit">
34
+ </div>
35
+ <table class="addwishgrid">
36
+ <thead>
37
+ <tr>
38
+ <th>Attribute Name</th>
39
+ <th>Attribute Code</th>
40
+ <th>Attribute Type</th>
41
+ <th>Include ?</th>
42
+ </tr>
43
+ </thead>
44
+ <tbody>
45
+ <?php
46
+ $productAttrs = Mage::getResourceModel('catalog/product_attribute_collection');
47
+ $model = Mage::getModel('awext/awext')->load($currentStore);
48
+ $selected_attributes=explode(",",$model->enabled_attributes);
49
+ foreach ($productAttrs as $productAttr) {
50
+ /** @var Mage_Catalog_Model_Resource_Eav_Attribute $productAttr */
51
+ if($productAttr->getData('is_filterable')==1){
52
+ if(in_array($productAttr->getAttributeCode(),$selected_attributes)){
53
+ $checked='checked="checked"';
54
+ }else{
55
+ $checked='';
56
+ }
57
+ echo "<tr><td>".$productAttr->getFrontendLabel()."</td><td>".$productAttr->getAttributeCode()."</td><td>".$productAttr->getFrontendInput()."</td><td><input type='checkbox' name='includein[]' value='".$productAttr->getAttributeCode()."' ".$checked."></td></tr>";
58
+ }
59
+ }
60
+ ?>
61
+ </tbody>
62
+ </table>
63
+ </form>
app/design/adminhtml/default/default/template/awext/search.phtml ADDED
@@ -0,0 +1,6 @@
1
+ Our live search feature simplifies and speeds up your customers’ searches, and gives them live results while typing.<br>
2
+ It automatically corrects and understands spelling errors and gives them quick previews as they type.
3
+ <br><br>Included in the Search feature is also a full featured result page.<br>This plug-in automatically generated this result page, and the addwish javascript present on you shop pages, makes sure that the searched products is shown.
4
+ <br>You can visit the page here <a href="<?php echo Mage::getBaseUrl();?>addwish-search-result.html" target="_blank">/addwish-search-result.html</a> and make sure that design seperate from the space where the results will be shown, is fitting into you requirements.
5
+ <br><b>Please contact <a href="mailto:support@addwish.com">support@addwish.com</a> to get the search implemented and setup for you webshop.
6
+ </b>
app/design/adminhtml/default/default/template/awext/store-selector.phtml ADDED
@@ -0,0 +1,29 @@
1
+ <?php
2
+ $currentStore= Mage::app()->getDefaultStoreView()->getStoreId();
3
+ if(Mage::app()->getRequest()->getParam('storeconfig')){
4
+ $currentStore=Mage::app()->getRequest()->getParam('storeconfig');
5
+ }
6
+ ?>
7
+ <form action="" name="addwish_store_selector" id="addwish_store_selector">
8
+ <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
9
+ <div class="switcher">
10
+ <label for="store_switcher">Current Configuration Scope:</label>
11
+ <a class="link-store-scope" title="What is this?" onclick="this.target='_blank'" href="http://www.magentocommerce.com/knowledge-base/entry/understanding-store-scopes">What is this?</a> <select onchange="addwish_store_selector.submit()" class="system-config-store-switcher" id="storeconfig" name="storeconfig"">
12
+ <?php
13
+ foreach (Mage::app()->getWebsites() as $website) {
14
+ foreach ($website->getGroups() as $group) {
15
+ $stores = $group->getStores();
16
+ foreach ($stores as $store) {
17
+ $selected='';
18
+ if($store->getStoreId()==$currentStore){
19
+ $selected="selected='selected'";
20
+ }
21
+ echo "<option value='".$store->getStoreId()."' ".$selected.">".$store->getName()."</option>";
22
+ }
23
+ }
24
+ }
25
+ ?>
26
+ </select>
27
+
28
+ </div>
29
+ </form>
app/design/frontend/base/default/layout/awext.xml ADDED
@@ -0,0 +1,42 @@
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
+ </reference>
16
+ </default>
17
+ <catalog_product_view>
18
+ <reference name="before_body_end">
19
+ <block type="core/template" name="addwish-cart" template="addwish/product-span.phtml" after="-" />
20
+ </reference>
21
+ </catalog_product_view>
22
+ <checkout_cart_index>
23
+ <reference name="before_body_end">
24
+ <block type="core/template" name="addwish-basket" template="addwish/basket-span.phtml" after="-" />
25
+ </reference>
26
+ </checkout_cart_index>
27
+ <checkout_onepage_success>
28
+ <reference name="before_body_end">
29
+ <block type="core/template" name="addwish-conversion" template="addwish/conversion-span.phtml" after="-" />
30
+ </reference>
31
+ </checkout_onepage_success>
32
+ <awext_index_search>
33
+ <reference name="content">
34
+ <block type="core/template" name="addwish-search-page" template="addwish/search-result-page.phtml" />
35
+ </reference>
36
+ </awext_index_search>
37
+ <awext_index_upsells>
38
+ <reference name="content">
39
+ <block type="core/template" name="addwish-upsells" template="addwish/upsells-page.phtml" />
40
+ </reference>
41
+ </awext_index_upsells>
42
+ </layout>
app/design/frontend/base/default/template/addwish/addwish-head.phtml ADDED
@@ -0,0 +1,15 @@
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
+ ?>
app/design/frontend/base/default/template/addwish/basket-span.phtml ADDED
@@ -0,0 +1,28 @@
1
+ <?php
2
+ $quote = Mage::getSingleton('checkout/session')->getQuote();
3
+ ?><span class="addwish-basket" style="display:none"
4
+ data-total="<?php echo number_format($quote->getData('subtotal'), 2, '.', '');?>"
5
+ data-tax="<?php echo number_format($quote->getData('grand_total')-$quote->getData('subtotal'), 2, '.', '');?>"
6
+ data-noshipping="">
7
+ <?php
8
+ $cartItems = Mage::getModel('checkout/cart')->getItems();
9
+ if(count($cartItems)>0){
10
+ foreach($cartItems->getData() as $cartProduct){
11
+ $product=Mage::getModel('catalog/product')->load($cartProduct['product_id']);
12
+ if($product->isVisibleInSiteVisibility()){
13
+ ?>
14
+ <span class="addwish-product"
15
+ data-unit-price="<?php echo number_format($cartProduct['price'], 2, '.', '');?>"
16
+ data-url="<?php echo $product->getProductUrl();?>"
17
+ data-productnumber="<?php echo $product->getId();?>"
18
+ data-sku="<?php echo $product->getSku();?>"
19
+ data-quantity="<?php echo (int)$cartProduct['qty'];?>"
20
+ data-unit-tax="<?php echo number_format($cartProduct['tax_amount'], 2, '.', '');?>">
21
+ </span>
22
+ <?php
23
+ }
24
+ }
25
+ }
26
+ ?>
27
+
28
+ </span>
app/design/frontend/base/default/template/addwish/conversion-span.phtml ADDED
@@ -0,0 +1,30 @@
1
+ <?php
2
+ $order = Mage::getSingleton('sales/order');
3
+ $order->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());
4
+ ?>
5
+ <span class="addwish-conversion" style="display:none;"
6
+ data-tax="<?php echo number_format(Mage::helper('checkout')->getQuote()->getShippingAddress()->getData('tax_amount'), 2, '.', '');?>"
7
+ data-ordernumber="<?php echo $order->getIncrementId();?>"
8
+ data-total="<?php echo number_format($order->getSubtotal(), 2, '.', '');?>"
9
+ >
10
+
11
+ <?php
12
+ $cartItems= $order->getAllItems();
13
+ foreach($cartItems as $cartProduct){
14
+ $product=Mage::getModel('catalog/product')->load($cartProduct->getData('product_id'));
15
+ if($product->isVisibleInSiteVisibility()){
16
+ ?>
17
+ <span class="addwish-product"
18
+ data-unit-price="<?php echo number_format($cartProduct->getData('price'), 2, '.', '');?>"
19
+ data-url="<?php echo $product->getProductUrl();?>"
20
+ data-productnumber="<?php echo $product->getId();?>"
21
+ data-sku="<?php echo $product->getSku();?>"
22
+ data-quantity="<?php echo (int)$cartProduct->getData('qty_ordered');?>"
23
+ data-unit-tax="<?php echo number_format($cartProduct->getData('tax_amount'), 2, '.', '');?>">
24
+ </span>
25
+ <?php
26
+ }
27
+ }
28
+ ?>
29
+
30
+ </span>
app/design/frontend/base/default/template/addwish/integrator.phtml ADDED
@@ -0,0 +1,17 @@
1
+ <?php
2
+ $model = Mage::getModel('awext/awext')->load(Mage::app()->getStore()->getStoreId());
3
+ if($model->getData('userId')!=''){
4
+ ?><script type="text/javascript">
5
+ (function() {
6
+ var aws = document.createElement('script');
7
+ aws.type = 'text/javascript';
8
+ if (typeof(aws.async) != "undefined") { aws.async = true; }
9
+ aws.src = (window.location.protocol == 'https:' ? 'https://d1pna5l3xsntoj.cloudfront.net' :
10
+ 'http://cdn.addwish.com') + '/scripts/company/awAddGift.js#<?php echo $model->getData('userId');?>';
11
+ var s = document.getElementsByTagName('script')[0];
12
+ s.parentNode.insertBefore(aws, s);
13
+ })();
14
+ </script>
15
+ <?php
16
+ }
17
+ ?>
app/design/frontend/base/default/template/addwish/product-span.phtml ADDED
@@ -0,0 +1,108 @@
1
+ <?php
2
+ $product = Mage::registry('current_product');
3
+ $specialPrice = number_format($product->getSpecialPrice(), 2, '.', '');
4
+ $regularPrice = number_format($product->getPrice(), 2, '.', '');
5
+ $product_image=Mage::helper('catalog/image')->init($product , 'thumbnail')->resize(256);
6
+ $imageUrl = Mage::helper('catalog/image')->init($product , 'thumbnail')->resize(256);
7
+ ?>
8
+ <span class="addwish-product-info" style="display:none"
9
+ data-title="<?php echo htmlentities($product->getName());?>"
10
+ data-imgurl="<?php echo $imageUrl ;?>"
11
+
12
+ <?php
13
+
14
+
15
+ $product_inStock=0;
16
+ if($product->isConfigurable()){
17
+ $allProducts = $product->getTypeInstance(true)->getUsedProducts(null, $product);
18
+ foreach ($allProducts as $productD) {
19
+ if (!$productD->isSaleable()|| $productD->getIsInStock()==0) {
20
+ //out of stock for check child simple product
21
+ }else{
22
+ $product_inStock=1;
23
+ }
24
+ }
25
+ if($product_inStock==1){
26
+ echo " data-instock='true'";
27
+ }else{
28
+ echo " data-instock='false'";
29
+ }
30
+ }else{
31
+ if($product->isInStock()){
32
+ echo " data-instock='true'";
33
+ }else{
34
+ echo " data-instock='false'";
35
+ }
36
+ }
37
+
38
+ if(isset($specialPrice) && $specialPrice>0 && $specialPrice<$regularPrice ){
39
+ $today = date('Y-m-d');
40
+ $today=date('Y-m-d', strtotime($today));;
41
+ $spcialPriceDateBegin = date('Y-m-d', strtotime($product->getSpecialFromDate()));
42
+ $spcialPriceDateEnd = date('Y-m-d', strtotime($product->getSpecialToDate()));
43
+
44
+ if (($today > $spcialPriceDateBegin) && ($today < $spcialPriceDateEnd))
45
+ {
46
+ echo ' data-price="'.$specialPrice.'"';
47
+ echo ' data-previousprice="'.$regularPrice.'" ';
48
+ }
49
+ else
50
+ {
51
+ echo ' data-price="'.$regularPrice.'" ';
52
+ }
53
+
54
+
55
+
56
+
57
+
58
+ }else{
59
+ echo ' data-price="'.$regularPrice.'" ';
60
+ }
61
+ ?>
62
+ data-productnumber="<?php echo $product->getId();?>"
63
+ data-sku="<?php echo $product->getSku();?>"
64
+ data-url="<?php echo $product->getProductUrl();?>"
65
+ data-currency="<?php echo Mage::app()->getStore()->getCurrentCurrencyCode();?>"
66
+ <?php
67
+ if($product->getData('brand')){
68
+ echo " data-brand='".$product->getData('brand')."'";
69
+ }
70
+
71
+ $cats = $product->getCategoryIds();
72
+ $catJsonArray=array();
73
+ foreach ($cats as $category_id) {
74
+ $category = Mage::getModel('catalog/category')->load($category_id) ;
75
+ foreach ($category->getParentCategories() as $parent) {
76
+ $catJsonArray[] = htmlentities($parent->getName());
77
+ }
78
+ }
79
+ ?>
80
+ data-category='<?php echo addslashes(json_encode($catJsonArray));?>'
81
+ <?php
82
+ if($product->getData('gender')){
83
+ $attr = $product->getResource()->getAttribute("gender");
84
+ $genderLabel = $attr->getSource()->getOptionText($product->getData('gender'));
85
+ echo " data-gender='".$genderLabel."'";
86
+ }
87
+ if($product->getData('pricedetail')){
88
+ echo " data-pricedetail='".$product->getData('pricedetail')."'";
89
+ }
90
+ if($product->getData('score')){
91
+ echo " data-score='".$product->getData('score')."'";
92
+ }
93
+ if($product->getData('newsletter-promotion')){
94
+ echo " data-newsletter-promotion='".$product->getData('newsletter-promotion')."'";
95
+ }
96
+ if($product->getData('recurrent')){
97
+ echo " data-recurrent='".$product->getData('recurrent')."'";
98
+ }
99
+ if($product->getData('sold-related')){
100
+ echo " data-sold-related='".$product->getData('sold-related')."'";
101
+ }
102
+ $uencURL=Mage::helper('checkout/cart')->getAddUrl($product);
103
+ $elem1=explode("uenc/",$uencURL);
104
+ $elem2=explode("/product",$elem1[1]);
105
+ ?>
106
+ data-formkey='<?php echo Mage::getSingleton('core/session')->getFormKey();?>'
107
+ data-uenc='<?php echo $elem2[0];?>'
108
+ ></span>
app/design/frontend/base/default/template/addwish/search-result-page.phtml ADDED
File without changes
app/design/frontend/base/default/template/addwish/upsells-page.phtml ADDED
@@ -0,0 +1,24 @@
1
+ <?php
2
+ $lastAddedProduct=Mage::getSingleton('checkout/session')->getLastAddedProductId(true);
3
+ if($lastAddedProduct>0){
4
+ $product=Mage::getModel('catalog/product')->load($lastAddedProduct);
5
+ ?>
6
+
7
+
8
+ <span id="addwish-upsell-1"></span>
9
+ <span id="addwish-upsell-2"></span>
10
+ <span class="addwish-upsell-info" style="display:none" data-url="<?php echo $product->getProductUrl();?>"></span>
11
+
12
+ <?php
13
+ }else{
14
+ $productId=$this->getRequest()->getParam('productId');
15
+ if($productId>0){
16
+ $product=Mage::getModel('catalog/product')->load($productId);
17
+ ?><span id="addwish-upsell-1"></span>
18
+ <span id="addwish-upsell-2"></span>
19
+ <span class="addwish-upsell-info" style="display:none" data-url="<?php echo $product->getProductUrl();?>"></span>
20
+
21
+ <?php
22
+ }
23
+ }
24
+ ?>
app/etc/modules/Addwish_Awext.xml ADDED
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <Addwish_Awext>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ <depends>
8
+ <Mage_Adminhtml/>
9
+ </depends>
10
+ </Addwish_Awext>
11
+ </modules>
12
+ </config>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>addwish</name>
4
- <version>0.13.0</version>
5
<stability>stable</stability>
6
<license>GNU General Public License (GPL)</license>
7
<channel>community</channel>
8
<extends/>
9
- <summary>New improved addwish extension with mult-site key network support</summary>
10
- <description>New improved addwish extension with mult-site key network support</description>
11
- <notes>New improved addwish extension with mult-site key network support</notes>
12
<authors><author><name>addwish</name><user>addwish</user><email>krj@addwish.com</email></author></authors>
13
- <date>2016-05-29</date>
14
- <time>21:41:18</time>
15
- <contents><target name="magelocal"><dir name="Addwish"><dir name="Awext"><dir name="Block"><dir name="Adminhtml"><dir name="Awext"><file name="Grid.php" hash="0a9e0cc01157a49a58cddf0ef4eddbad"/><file name="Renderer.php" hash="f5f132bb8089270358be38f9e1fb342d"/><dir name="View"><dir name="Tab"><dir name="Details"><file name="List.php" hash="629a98942f2354a0a10d14e8564fc542"/></dir><file name="Details.php" hash="9431059a450be7a0bb9d69867c2b2b10"/><file name="Form.php" hash="14b1192bea84fbee58e47ff749a004f4"/><dir name="Recommend"><file name="List.php" hash="a8f994f1e5a29abf1f4bbf48e826e1d2"/></dir><file name="Recommend.php" hash="5d4fe965a062adcb51567c93e5adec2f"/><dir name="Search"><file name="List.php" hash="c556a6030e13ae9933bdf16e2ff1ff33"/></dir><file name="Search.php" hash="f194d4fa52fa3e106baa49ffd981de06"/><dir name="Searchconfig"><file name="List.php" hash="6ef64a77cfc24144aa3a85515f6ce22b"/></dir><file name="Searchconfig.php" hash="ce2a937906c8f2d13552d06b8c7b4f69"/></dir><file name="Tabs.php" hash="51d7b9c59068451c28bf614d42fe303d"/></dir><file name="View.php" hash="a5a5aa835bdbaf1102b50e90dec526a8"/></dir><file name="Awext.php" hash="2e46d78792ff55c3285d77780ba3e784"/></dir><file name="Awext.php" hash="5d627b94fe5a46ab3c5a77debbabcff6"/></dir><dir name="Helper"><file name="Data.php" hash="cb01c88cb51f7576e38209e495593b0f"/></dir><dir name="Model"><file name="Awext.php" hash="1925cb6fd94cc7cd6baecda71964a424"/><dir name="Mysql4"><dir name="Awext"><file name="Collection.php" hash="12afe62372c67a5bd9154695c8d095f3"/></dir><file name="Awext.php" hash="acd112233e367ebe80caf114f5dfe653"/></dir><file name="Observer.php" hash="e85fea849acf03c9353e557588e3f21d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AwextController.php" hash="791cdc06945d68170a621ef672769d60"/></dir><file name="IndexController.php" hash="67c59603c26c6e5b30545e6b99d4d059"/></dir><dir name="etc"><file name="config.xml" hash="a1a8d58b8191ad97bff73e32d0db4e45"/></dir><dir name="sql"><dir name="addwish_setup"><file name="mysql4-install-0.0.4.php" hash="77a5d3d50380396c9bd2a9dfdfea8905"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><file name="addwish.css" hash=""/></dir><dir name="layout"><file name="awext.xml" hash=""/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="awext.xml" hash=""/></dir></dir></dir></dir><dir name="modules"><file name="Addwish_Awext.xml" hash=""/></dir></target></contents>
16
<compatible/>
17
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
</package>
1
<?xml version="1.0"?>
2
<package>
3
<name>addwish</name>
4
+ <version>0.14.0</version>
5
<stability>stable</stability>
6
<license>GNU General Public License (GPL)</license>
7
<channel>community</channel>
8
<extends/>
9
+ <summary>New multisite module</summary>
10
+ <description>New multisite module</description>
11
+ <notes>New multisite module</notes>
12
<authors><author><name>addwish</name><user>addwish</user><email>krj@addwish.com</email></author></authors>
13
+ <date>2016-06-03</date>
14
+ <time>07:39:12</time>
15
+ <contents><target name="magelocal"><dir name="Addwish"><dir name="Awext"><dir name="Block"><dir name="Adminhtml"><dir name="Awext"><file name="Grid.php" hash="0a9e0cc01157a49a58cddf0ef4eddbad"/><file name="Renderer.php" hash="f5f132bb8089270358be38f9e1fb342d"/><dir name="View"><dir name="Tab"><dir name="Details"><file name="List.php" hash="629a98942f2354a0a10d14e8564fc542"/></dir><file name="Details.php" hash="9431059a450be7a0bb9d69867c2b2b10"/><file name="Form.php" hash="14b1192bea84fbee58e47ff749a004f4"/><dir name="Recommend"><file name="List.php" hash="a8f994f1e5a29abf1f4bbf48e826e1d2"/></dir><file name="Recommend.php" hash="5d4fe965a062adcb51567c93e5adec2f"/><dir name="Search"><file name="List.php" hash="c556a6030e13ae9933bdf16e2ff1ff33"/></dir><file name="Search.php" hash="f194d4fa52fa3e106baa49ffd981de06"/><dir name="Searchconfig"><file name="List.php" hash="6ef64a77cfc24144aa3a85515f6ce22b"/></dir><file name="Searchconfig.php" hash="ce2a937906c8f2d13552d06b8c7b4f69"/></dir><file name="Tabs.php" hash="51d7b9c59068451c28bf614d42fe303d"/></dir><file name="View.php" hash="a5a5aa835bdbaf1102b50e90dec526a8"/></dir><file name="Awext.php" hash="2e46d78792ff55c3285d77780ba3e784"/></dir><file name="Awext.php" hash="5d627b94fe5a46ab3c5a77debbabcff6"/></dir><dir name="Helper"><file name="Data.php" hash="cb01c88cb51f7576e38209e495593b0f"/></dir><dir name="Model"><file name="Awext.php" hash="1925cb6fd94cc7cd6baecda71964a424"/><dir name="Mysql4"><dir name="Awext"><file name="Collection.php" hash="12afe62372c67a5bd9154695c8d095f3"/></dir><file name="Awext.php" hash="acd112233e367ebe80caf114f5dfe653"/></dir><file name="Observer.php" hash="e85fea849acf03c9353e557588e3f21d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AwextController.php" hash="791cdc06945d68170a621ef672769d60"/></dir><file name="IndexController.php" hash="67c59603c26c6e5b30545e6b99d4d059"/></dir><dir name="etc"><file name="config.xml" hash="a1a8d58b8191ad97bff73e32d0db4e45"/></dir><dir name="sql"><dir name="addwish_setup"><file name="mysql4-install-0.0.4.php" hash="77a5d3d50380396c9bd2a9dfdfea8905"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><file name="addwish.css" hash="19749f3be796449de42232fae0d77d2f"/></dir><dir name="images"><dir name="addwish"><file name="addwish.png" hash="a588d24d1919d9206eff40a886b88ef1"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="awext.xml" hash="0d94beddc26ad6e8a080ca4f0c8288f8"/></dir><dir name="template"><dir name="awext"><file name="list.phtml" hash="1590b47b152d27472a56731ec48240cb"/><file name="recommendations.phtml" hash="ec0a4cdb4909fed98b08f150d05fde5e"/><file name="search-config.phtml" hash="35e42872b25a359386b1ea239d571947"/><file name="search.phtml" hash="bcf56fe0d8728a45ca5421a0d6273385"/><file name="store-selector.phtml" hash="0807c0434f92c17688b4c4c24dadc7ad"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="awext.xml" hash="55de3edcbfdd85884f58b322f88cfc27"/></dir><dir name="template"><dir name="addwish"><file name="addwish-head.phtml" hash="c5b6fa2cae55ad1ddd4a5c64f8d532f6"/><file name="basket-span.phtml" hash="43ae1f4ca8daad61d16ef84bbfcab2cf"/><file name="conversion-span.phtml" hash="69ab18c525182edc1b83b0690556ac8c"/><file name="integrator.phtml" hash="8dc766ab6775bb24cd2c55d5db4c37b6"/><file name="product-span.phtml" hash="f7a43491071cca128eef424b93a6a971"/><file name="search-result-page.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="upsells-page.phtml" hash="ac41002da8c7bb57233599a00053ef77"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Addwish_Awext.xml" hash="fea2883f86536f249670eea31980f72c"/></dir></target></contents>
16
<compatible/>
17
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
</package>
skin/adminhtml/default/default/css/addwish.css ADDED
@@ -0,0 +1,11 @@
1
+ .introtext {
2
+ margin-bottom: 43px;
3
+ }
4
+ #informative {
5
+ list-style: outside none circle;
6
+ }
7
+ #addwish_store_selector {
8
+ float: right;
9
+ position: absolute;
10
+ right: 25px;
11
+ }
skin/adminhtml/default/default/images/addwish/addwish.png ADDED
Binary file