addwish - Version 0.13.0

Version Notes

New improved addwish extension with mult-site key network support

Download this release

Release Info

Developer addwish
Extension addwish
Version 0.13.0
Comparing to
See all releases


Code changes from version 0.12.0 to 0.13.0

app/code/local/Addwish/Awext/Model/Mysql4/Awext.php CHANGED
@@ -5,5 +5,6 @@ class Addwish_Awext_Model_Mysql4_Awext extends Mage_Core_Model_Mysql4_Abstract
5
  public function _construct()
6
  {
7
  $this->_init('awext/awext', 'id');
 
8
  }
9
  }
5
  public function _construct()
6
  {
7
  $this->_init('awext/awext', 'id');
8
+ $this->_isPkAutoIncrement = false;
9
  }
10
  }
app/code/local/Addwish/Awext/controllers/Adminhtml/AwextController.php CHANGED
@@ -27,13 +27,24 @@ class Addwish_Awext_Adminhtml_AwextController extends Mage_Adminhtml_Controller_
27
  }
28
  }
29
  public function viewAction(){
 
30
  $this->loadLayout();
31
  $this->_initLayoutMessages('core/session');
32
  $this->_setActiveMenu('awext/awext');
33
  $this->_addBreadcrumb(Mage::helper('adminhtml')->__('AddWish'), Mage::helper('adminhtml')->__('AddWish'));
34
  $this->_addBreadcrumb(Mage::helper('adminhtml')->__('AddWish'), Mage::helper('adminhtml')->__('AddWish'));
35
-
36
  $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
 
 
 
 
 
 
 
 
 
 
 
37
  if ($data = $this->getRequest()->getPost()) {
38
  switch($data['action']){
39
  case "dataexport":
@@ -63,7 +74,7 @@ class Addwish_Awext_Adminhtml_AwextController extends Mage_Adminhtml_Controller_
63
  }
64
  $model = Mage::getModel('awext/awext');
65
  $model->setData($k)
66
- ->setId(1);
67
 
68
  try {
69
  $model->save();
27
  }
28
  }
29
  public function viewAction(){
30
+
31
  $this->loadLayout();
32
  $this->_initLayoutMessages('core/session');
33
  $this->_setActiveMenu('awext/awext');
34
  $this->_addBreadcrumb(Mage::helper('adminhtml')->__('AddWish'), Mage::helper('adminhtml')->__('AddWish'));
35
  $this->_addBreadcrumb(Mage::helper('adminhtml')->__('AddWish'), Mage::helper('adminhtml')->__('AddWish'));
 
36
  $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
37
+ $currentStore= Mage::app()->getDefaultStoreView()->getStoreId();
38
+ if(Mage::app()->getRequest()->getParam('storeconfig')!=""){
39
+ $currentStore=Mage::app()->getRequest()->getParam('storeconfig');
40
+ }
41
+ $loadValues= Mage::getModel('awext/awext')->load($currentStore);
42
+ if(count($loadValues->getData())<=0){
43
+
44
+ $data = array('id'=>$currentStore,'searchUUID'=>'');
45
+ $model = Mage::getModel('awext/awext')->setData($data);
46
+ $insertId = $model ->save()->getId();
47
+ }
48
  if ($data = $this->getRequest()->getPost()) {
49
  switch($data['action']){
50
  case "dataexport":
74
  }
75
  $model = Mage::getModel('awext/awext');
76
  $model->setData($k)
77
+ ->setId($currentStore);
78
 
79
  try {
80
  $model->save();
app/design/adminhtml/default/default/layout/awext.xml DELETED
@@ -1,151 +0,0 @@
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
-
97
-
98
-
99
- <awext_adminhtml_awext_view>
100
- <reference name="head">
101
- <action method="setTitle">
102
- <title>addwish Settings</title>
103
- </action>
104
- <action method="setTitle">
105
- <title>addwish Settings</title>
106
- </action>
107
- <action method="setCanLoadTinyMce">
108
- <load>1</load>
109
- </action>
110
- <action method="setCanLoadExtJs">
111
- <flag>1</flag>
112
- </action>
113
- <action method="addJs">
114
- <script>mage/adminhtml/variables.js</script>
115
- </action>
116
- <action method="addJs">
117
- <script>mage/adminhtml/wysiwyg/widget.js</script>
118
- </action>
119
- <action method="addJs">
120
- <script>lib/flex.js</script>
121
- </action>
122
- <action method="addJs">
123
- <script>lib/FABridge.js</script>
124
- </action>
125
- <action method="addJs">
126
- <script>mage/adminhtml/flexuploader.js</script>
127
- </action>
128
- <action method="addJs">
129
- <script>mage/adminhtml/browser.js</script>
130
- </action>
131
- <action method="addJs">
132
- <script>prototype/window.js</script>
133
- </action>
134
- <action method="addItem">
135
- <name>skin/adminhtml/default/default/lib/prototype/windows/themes/magento.css
136
- </name>
137
- </action>
138
- <action method="addItem">
139
- <type>js_css</type>
140
- <name>prototype/windows/themes/default.css</name>
141
- </action>
142
- </reference>
143
- <reference name="content">
144
- <block type="awext/adminhtml_awext_view" name="awext" />
145
- </reference>
146
- </awext_adminhtml_awext_view>
147
-
148
-
149
-
150
-
151
- </layout>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/awext/list.phtml DELETED
@@ -1,123 +0,0 @@
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
- <input type='hidden' name='action' value='scriptsetup'/>
14
- <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
15
- <fieldset id="general_region" class="config collapseable">
16
- <legend>Script Setup</legend>
17
- <?php
18
- $model = Mage::getModel('awext/awext')->load(1);
19
- ?>
20
- <div class="introtext" style="margin-bottom: 10px">
21
- 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>
22
- Once you have an addwish business ID enter it in the box below and press save.</div>
23
-
24
-
25
- <div style="float: left">
26
- <p>Your addwish ID</p>
27
- </div>
28
- <div style="float: left; margin-left: 20px;">
29
- <input type='text' name='addwishID' size="40" value='<?php echo $model->getData('userId');?>'/>
30
- </div>
31
- <div style="float: left; margin-left: 20px;">
32
- <input type="submit" class="form-button" value="Save" name="submit">
33
- </div>
34
- <div style="clear:both">
35
-
36
- </div>
37
-
38
- </fieldset>
39
- </form>
40
- </div>
41
-
42
- <div class='clear'></div>
43
- <div class="entry-edit">
44
- <div class="entry-edit-head collapseable">
45
- <a
46
- onclick="Fieldset.toggleCollapse('general_Dataregion', ''); return false;"
47
- href="#" id="general_Dataregion-head" class="">Data Export Setup</a>
48
- </div>
49
- <form action='' method='post'>
50
- <input type='hidden' name='action' value='dataexport'/>
51
- <input name="form_key" type="hidden"
52
- value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
53
- <fieldset id="general_Dataregion" class="config collapseable">
54
- <legend>Data Export Setup</legend>
55
- <?php
56
- $model = Mage::getModel('awext/awext')->load(1);
57
- ?>
58
- <div style="margin-bottom: 10px" class="introtext">
59
- 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>
60
- <br>
61
- 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.
62
- <br>
63
- 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>
64
-
65
- 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.
66
-
67
-
68
-
69
-
70
-
71
- </div>
72
- <h6>Product feed</h6>
73
- <div style="float:left">
74
- <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>
75
- <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>
76
- </b></i>
77
- </div>
78
-
79
- <br>
80
-
81
- <br>
82
-
83
- <div style="clear:both"></div>
84
- <hr>
85
-
86
- <div style="margin-top: 10px;">
87
- <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
88
- <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>
89
- </div>
90
- <div style="clear:both; margin-top: 5px;"></div>
91
- <div style="float:left">
92
- <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>
93
- </div>
94
- <div style="clear:both; margin-top: 5px;"></div>
95
- <br>
96
- <hr>
97
-
98
- <div style="margin-top: 10px;">
99
- <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.
100
- </p><div>
101
- <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>
102
- <div style="clear:both"></div>
103
- <br>
104
- <hr>
105
- <div style="clear: both; margin-top: 10px;"></div>
106
-
107
- <div style="float: left;">
108
- <input type="submit" name="submit" value="Update Settings" class="form-button">
109
- </div>
110
- <br>
111
- <div style="clear: both; margin-top: 10px;"></div>
112
-
113
- </div>
114
-
115
-
116
- </fieldset>
117
- </form>
118
- </div>
119
- <script language='javascript'>
120
- function editip(){
121
- document.getElementById("ipaddress").disabled = false;
122
- }
123
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/awext/recommendations.phtml DELETED
@@ -1,64 +0,0 @@
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
- <input type="hidden" name="action" value="recomendations">
20
- <input name="form_key" type="hidden"
21
- value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
22
- <fieldset class="config collapseable" id="general_recommend">
23
- <legend>Recomendations</legend>
24
- <?php
25
- $model = Mage::getModel('awext/awext')->load(1);
26
- ?>
27
- <div style="margin-bottom: 20px;" class="introtext">
28
- Personalised recommendations will be displaying unique, relevant content targeted to their needs and shopping habits.
29
- 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.
30
- <br>Get setup with personalised recommendations:
31
- <br>
32
- <ul style="list-style: none none none; margin-left: 20px;">
33
- <li>Encourage your users to continue shopping on your shop</li>
34
- <li>Customised algorithms to suit your customer experience strategy</li>
35
- <li>Use them everywhere you wish, both on your front page, product page, category pages or any where else you find it relevant</li>
36
- </ul>
37
-
38
- Our recommendations feature automatically analyses user behaviour to recommend products that customers are most likely to buy.
39
- <br>
40
- <br>
41
- 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>
42
- 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.
43
- <br>
44
- 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>
45
- <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.
46
- </i>
47
- </div>
48
- <div style="clear:both"></div>
49
- <div style="float: left">Enable upsell page</div>
50
- <input type="checkbox" style="margin-left: 10px;" <?php if($model->getData('enableUpsells')==1){echo "checked='checked'";} ?> value="1" name="addwishUpsells">
51
-
52
-
53
- <div style="clear:both; margin-top: 10px;"></div>
54
- <hr>
55
-
56
- <div style="float: left; margin-top: 10px;"><input type="submit" class="form-button" value="Update Settings" name="submit"></div>
57
-
58
-
59
- <div style="clear:both"></div>
60
-
61
-
62
- </fieldset>
63
- </form>
64
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/awext/search-config.phtml DELETED
@@ -1,57 +0,0 @@
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
- <div style="float: right; margin-right: 20px;">
27
- <input type="submit" class="form-button" value="Save" name="submit">
28
- </div>
29
- <table class="addwishgrid">
30
- <thead>
31
- <tr>
32
- <th>Attribute Name</th>
33
- <th>Attribute Code</th>
34
- <th>Attribute Type</th>
35
- <th>Include ?</th>
36
- </tr>
37
- </thead>
38
- <tbody>
39
- <?php
40
- $productAttrs = Mage::getResourceModel('catalog/product_attribute_collection');
41
- $model = Mage::getModel('awext/awext')->load(1);
42
- $selected_attributes=explode(",",$model->enabled_attributes);
43
- foreach ($productAttrs as $productAttr) {
44
- /** @var Mage_Catalog_Model_Resource_Eav_Attribute $productAttr */
45
- if($productAttr->getData('is_filterable')==1){
46
- if(in_array($productAttr->getAttributeCode(),$selected_attributes)){
47
- $checked='checked="checked"';
48
- }else{
49
- $checked='';
50
- }
51
- 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>";
52
- }
53
- }
54
- ?>
55
- </tbody>
56
- </table>
57
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/awext/search.phtml DELETED
@@ -1,6 +0,0 @@
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/frontend/base/default/layout/awext.xml DELETED
@@ -1,42 +0,0 @@
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 DELETED
@@ -1,15 +0,0 @@
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 DELETED
@@ -1,28 +0,0 @@
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 DELETED
@@ -1,30 +0,0 @@
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 DELETED
@@ -1,17 +0,0 @@
1
- <?php
2
- $model = Mage::getModel('awext/awext')->load(1);
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 DELETED
@@ -1,108 +0,0 @@
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 DELETED
File without changes
app/design/frontend/base/default/template/addwish/upsells-page.phtml DELETED
@@ -1,24 +0,0 @@
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 DELETED
@@ -1,12 +0,0 @@
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.12.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 multi-site support</summary>
10
- <description>New improved addwish extension with multi-site support</description>
11
- <notes>New improved addwish extension with multi-site support</notes>
12
  <authors><author><name>addwish</name><user>addwish</user><email>krj@addwish.com</email></author></authors>
13
- <date>2016-05-25</date>
14
- <time>09:18:05</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="363b3c47f302192e5aa815cde224ae10"/></dir><file name="Observer.php" hash="e85fea849acf03c9353e557588e3f21d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AwextController.php" hash="2424376fae3ec49abe9952d12484c009"/></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="f8711a6d3845f2c39698ca95064abb4c"/></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="4b3cd2d742068567c1c5c67fe349114d"/></dir><dir name="template"><dir name="awext"><file name="list.phtml" hash="bb61fbc456f4fc2ff550d0ffbd9e219e"/><file name="recommendations.phtml" hash="c6b1d8078020f427ce5a73e5566537d4"/><file name="search-config.phtml" hash="03ba55d93b39fb2bedc088ae06a4a884"/><file name="search.phtml" hash="bcf56fe0d8728a45ca5421a0d6273385"/></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="a631b2e39787aa89c76065e4177fe218"/><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>
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>
skin/adminhtml/default/default/css/addwish.css DELETED
@@ -1,7 +0,0 @@
1
-
2
- .introtext {
3
- margin-bottom: 43px;
4
- }
5
- #informative {
6
- list-style: outside none circle;
7
- }
 
 
 
 
 
 
 
skin/adminhtml/default/default/images/addwish/addwish.png DELETED
Binary file