Swym_Relay - Version 1.9.0

Version Notes

To install and configure the Swym Relay extension, please follow these steps:
1. Log into the Admin module and install the Swym Relay extension package via Magento Connect -> Magento Connect Manager.
2. Once the extension is installed, go to the Admin module and choose System -> Config. You should see a new section titled "SWYM" with "Swym Relay" under it.
3. If you get a 404 or Access denied error here, you'll need to log out of the Admin module and log back in
4. Please specify the config information for Swym Relay on this screen:
a. Enable - Choose yes, this will basically enable the Swym Relay tracker on your site
b. Display UI - Choosing Yes will cause Swym Relay UI to start showing up on your site. When we deploy in production, we will likely enable Swym Relay first and let the data gather for a week or two, and then turn on the UI (just so users have content showing up in their Relay)
c. Retailer Id - This will be an ID we provide that is unique for you.
d. PEM key - This will be a unique public key that is assigned to your account and will ensure the security of your calls. We will provide this key as well when you sign up for the service.
d. Title - This is an optional title you could choose to brand the Relay for your site. Please choose a name for the Relay UI module that aligns with your brand positioning. Note that the name will default to Notepad if nothing is specified.
e. Color - This is an optional hex code for the color you'd like for the Relay (example: #616161)
f. Icon - This is an optional image (40x40px) you want to use for the Swym Relay on your site, again to comply with your branding needs. If you leave this empty, we will use our default icon
g. Enable Swym Favorites - This provides an option to enable the Swym Relay wishlist on your site.
h. Favorites Label - If you choose to replace the default wishlist with the Swym Relay wishlist, this is an option to label the wishlist to comply with your brand guidelines

Download this release

Release Info

Developer Swym Corporation
Extension Swym_Relay
Version 1.9.0
Comparing to
See all releases


Version 1.9.0

app/code/local/Swym/Notepad/Block/Notepad.php ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Swym_Notepad_Block_Notepad extends Mage_Core_Block_Template{
3
+
4
+ public function __construct()
5
+ {
6
+
7
+ }
8
+
9
+ public function isNotepadEnabled()
10
+ {
11
+ $isEnabled=Mage::getStoreConfig('notepad/general/status', Mage::app()->getStore()->getId());
12
+ return $isEnabled;
13
+ }
14
+
15
+ public function canShowNotepad()
16
+ {
17
+ if( $this->isNotepadEnabled() ) {
18
+ $canShow= Mage::getStoreConfig('notepad/general/show', Mage::app()->getStore()->getId());
19
+ return $canShow;
20
+ } else {
21
+ return false;
22
+ }
23
+ }
24
+
25
+ public function getRetailerId()
26
+ {
27
+ $retailerId=Mage::getStoreConfig('notepad/general/retailer_id',Mage::app()->getStore()->getId());
28
+ return $retailerId;
29
+ }
30
+
31
+ public function getNotepadTitle()
32
+ {
33
+ $title=Mage::getStoreConfig('notepad/general/title',Mage::app()->getStore()->getId());
34
+ if($title=='') {
35
+ return 'Notepad';
36
+ } else {
37
+ return $title;
38
+ }
39
+ }
40
+ public function getWishlistTitle()
41
+ {
42
+ $title=Mage::getStoreConfig('notepad/general/wishlisttitle',Mage::app()->getStore()->getId());
43
+ if(trim($title)=='')
44
+ return 'Add To my Favorites';
45
+ return $title;
46
+ }
47
+ public function getProductView()
48
+ {
49
+ $controller=$this->getRequest()->getControllerName();;
50
+ $action=$this->getRequest()->getActionName();
51
+ if($controller=='product'&&$action=='view')
52
+ {
53
+ if($id=$this->getRequest()->getParam('id'))
54
+ {
55
+ $product=Mage::getModel('catalog/product')->load($id);
56
+ $image=Mage::helper('notepad')->getImageUrl($product);
57
+ if($product->getTypeId()=='simple')
58
+ {
59
+ $price=$product->getFinalPrice();
60
+ $oprice=$product->getPrice();
61
+ }
62
+ else
63
+ {
64
+ $oprice=$price=$this->getDisplayPrice($product);
65
+ }
66
+
67
+ $data=array(
68
+ 'du'=>$product->getProductUrl(),
69
+ 'dt'=>$product->getName(),
70
+ 'pr'=>$price,
71
+ 'op'=>$oprice,
72
+ 'epi'=>$product->getId(),
73
+ 'iu'=>$image,
74
+ );
75
+ return json_encode($data);
76
+ }
77
+ }
78
+
79
+ return false;
80
+
81
+ }
82
+ public function getDisplayPrice($product) {
83
+ if ($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE){
84
+ $_product_id = $product->getId();
85
+
86
+
87
+ $return_type = 'min';
88
+
89
+
90
+ $model_catalog_product = Mage::getModel('catalog/product'); // getting product model
91
+ $_product = $model_catalog_product->load( $_product_id );
92
+
93
+ $TypeInstance = $_product->getTypeInstance(true);
94
+ $Selections = $TypeInstance->getSelectionsCollection($OptionIds, $_product );
95
+ $Options = $TypeInstance->getOptionsByIds($OptionIds, $_product);
96
+ $bundleOptions = $Options->appendSelections($Selections, true);
97
+
98
+ $minmax_pricevalue = 0; // to sum them up from 0
99
+
100
+ foreach ($bundleOptions as $bundleOption) {
101
+ if ($bundleOption->getSelections()) {
102
+
103
+
104
+ $bundleSelections = $bundleOption->getSelections();
105
+
106
+ $pricevalues_array = array();
107
+ foreach ($bundleSelections as $bundleSelection) {
108
+
109
+ $pricevalues_array[] = $bundleSelection->getPrice();
110
+
111
+ }
112
+ if ( $return_type == 'max' ) {
113
+ rsort($pricevalues_array); // high to low
114
+ } else {
115
+ sort($pricevalues_array); // low to high
116
+ }
117
+
118
+ // sum up the highest possible or lowest possible price
119
+ $minmax_pricevalue += $pricevalues_array[0];
120
+
121
+
122
+ }
123
+ }
124
+ return $minmax_pricevalue;
125
+
126
+ }
127
+ elseif ($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE){
128
+ return $product->getFinalPrice();
129
+ }
130
+ }
131
+ public function getCategoryView()
132
+ {
133
+
134
+ $controller=$this->getRequest()->getControllerName();;
135
+ $action=$this->getRequest()->getActionName();
136
+ if($controller=='category'&&$action=='view')
137
+ {
138
+
139
+ if($id=$this->getRequest()->getParam('id'))
140
+ {
141
+
142
+ $category=Mage::getModel('catalog/category')->load($id);
143
+ if($category->getImageUrl())
144
+ {
145
+ $data=array(
146
+ 'du'=>$category->getUrl($category),
147
+ 'dt'=>$category->getName(),
148
+ 'et'=>2,
149
+ 'iu'=>$category->getImageUrl(),
150
+ );
151
+ }
152
+ else
153
+ {
154
+ $data=array(
155
+ 'du'=>$category->getUrl($category),
156
+ 'dt'=>$category->getName(),
157
+ 'et'=>2,
158
+
159
+
160
+ );
161
+ }
162
+ return json_encode($data);
163
+ }
164
+ }
165
+
166
+ return false;
167
+
168
+ }
169
+ public function getAddToCart()
170
+ {
171
+
172
+
173
+ if($data=Mage::getSingleton('core/session')->getData('notepadcart'))
174
+ {
175
+ Mage::getSingleton('core/session')->unsNotepadcart();
176
+ Mage::getModel('core/cookie')->delete('notepadcart');
177
+ return $data;
178
+ }
179
+
180
+ return false;
181
+
182
+ }
183
+ public function getReportPurchase()
184
+ {
185
+
186
+
187
+ if($data=Mage::getSingleton('core/session')->getData('reportpurchase'))
188
+ {
189
+ Mage::getSingleton('core/session')->unsReportpurchase();
190
+ return $data;
191
+ }
192
+
193
+ return false;
194
+
195
+ }
196
+ public function getPriceUpdateData()
197
+ {
198
+ if($data=Mage::getSingleton('admin/session')->getData('product_price_update'))
199
+ {
200
+ Mage::getSingleton('admin/session')->unsProduct_price_update();
201
+ return $data;
202
+ }
203
+
204
+ return false;
205
+ }
206
+ public function getPageView()
207
+ {
208
+ $controller=$this->getRequest()->getControllerName();
209
+ $action=$this->getRequest()->getActionName();
210
+ if($controller=='product'&&$action=='view')
211
+ {
212
+ $data=json_encode(array('pageType'=>1));
213
+ }
214
+ elseif($controller=='checkout'&&$action=='cart')
215
+ {
216
+ $data=json_encode(array('pageType'=>2));
217
+ }
218
+ elseif($controller=='category'&&$action=='view')
219
+ {
220
+ $data=json_encode(array('pageType'=>3));
221
+ }
222
+ elseif($controller=='checkout'&&$action=='onepage')
223
+ {
224
+ $data=json_encode(array('pageType'=>4));
225
+ }
226
+ else
227
+ {
228
+ $data=json_encode(array('pageType'=>99));
229
+ }
230
+ return $data;
231
+
232
+ }
233
+ public function getRemovedItems()
234
+ {
235
+ if($data=Mage::getSingleton('core/session')->getData('remove_cart_item'))
236
+ {
237
+ Mage::getSingleton('core/session')->unsRemove_cart_item();
238
+ return $data;
239
+ }
240
+ return false;
241
+
242
+ }
243
+ public function getAddToWishlist()
244
+ {
245
+
246
+
247
+ if($data=Mage::getSingleton('core/session')->getData('notepad_wishlist'))
248
+ {
249
+ Mage::getSingleton('core/session')->unsNotepad_wishlist();
250
+ Mage::getModel('core/cookie')->delete('notepad_wishlist');
251
+ return $data;
252
+ }
253
+
254
+ return false;
255
+
256
+ }
257
+
258
+ public function getAddCoupon()
259
+ {
260
+
261
+
262
+ if($data=Mage::getSingleton('core/session')->getData('coupon_code'))
263
+ {
264
+ Mage::getSingleton('core/session')->unsCoupon_code();
265
+ return $data;
266
+ }
267
+
268
+ return false;
269
+
270
+ }
271
+ /* protected function _toHtml()
272
+ {
273
+
274
+ return $html;
275
+ } */
276
+
277
+ public function isMobile()
278
+ {
279
+ $useragent=$_SERVER['HTTP_USER_AGENT'];
280
+ $mobi = FALSE;
281
+ if(preg_match('/android|ipad|avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i',substr($useragent,0,4))){
282
+ $mobi = TRUE;
283
+ }
284
+ return $mobi;
285
+ }
286
+ }
287
+
288
+
app/code/local/Swym/Notepad/Block/Product/Price.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Swym_Notepad_Block_Product_Price extends Mage_Catalog_Block_Product_Price
3
+ {
4
+ protected function _toHtml()
5
+ {
6
+ if (!$this->getProduct() || $this->getProduct()->getCanShowPrice() === false) {
7
+ return '';
8
+ }
9
+ $image=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' .$this->getProduct()->getImage();
10
+ $forwishlistHtml='<div ><input type="hidden" id="wishlist-content-price-'.$this->getProduct()->getId().'" value="'.$this->getProduct()->getFinalPrice().'" />
11
+ <input type="hidden" class="wishlist-content-id" id="wishlist-content-id-'.$this->getProduct()->getId().'" value="'.$this->getProduct()->getId().'"/>
12
+ <input type="hidden" id="wishlist-content-name-'.$this->getProduct()->getId().'" value="'.$this->getProduct()->getName().'"/>
13
+ <input type="hidden" id="wishlist-content-url-'.$this->getProduct()->getId().'" value="'.$this->getProduct()->getProductUrl().'"/>
14
+ <input type="hidden" id="wishlist-content-image-'.$this->getProduct()->getId().'" value="'.$image=Mage::helper('notepad')->getImageUrl($this->getProduct()).'"/>
15
+ </div>';
16
+ return parent::_toHtml().$forwishlistHtml;
17
+ }
18
+ }
app/code/local/Swym/Notepad/Helper/Data.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Swym_Notepad_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ /**
5
+ * Config paths for using throughout the code
6
+ */
7
+ const XML_PATH_ACCOUNT = 'notepad/general/swym_js';
8
+ const XML_PATH_RETAILER_ID = 'notepad/general/retailer_id';
9
+ const XML_PATH_STATUS = 'notepad/general/status';
10
+ /**
11
+ * Whether GA is ready to use
12
+ *
13
+ * @param mixed $store
14
+ * @return bool
15
+ */
16
+ public function getHtmlCode($store = null)
17
+ {
18
+ return Mage::getStoreConfig(self::XML_PATH_ACCOUNT, $store);
19
+ }
20
+
21
+ public function getImageUrl($product)
22
+ {
23
+ $product=Mage::getModel('catalog/product')->load($product->getId());
24
+ if($product->getImage()!='no_selection')
25
+ {
26
+
27
+ $image=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' .$product->getImage();
28
+ }
29
+ else
30
+ {
31
+ if(Mage::getStoreConfig("catalog/placeholder/image_placeholder")=='')
32
+ {
33
+ $image=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN).'frontend/base/default/images/catalog/product/placeholder/image.jpg';
34
+ }
35
+ else
36
+ {
37
+ $image=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'placeholder/' .Mage::getStoreConfig("catalog/placeholder/small_image_placeholder");
38
+ }
39
+ }
40
+ return $image;
41
+ }
42
+ public function canShowNotepad()
43
+ {
44
+
45
+
46
+ $isEnabled=Mage::getStoreConfig('notepad/general/status',Mage::app()->getStore()->getId());
47
+ $canShow=Mage::getStoreConfig('notepad/general/show',Mage::app()->getStore()->getId());
48
+ if($isEnabled&&$canShow)
49
+ {
50
+ return true;
51
+ }
52
+ return false;
53
+
54
+ }
55
+ }
56
+
app/code/local/Swym/Notepad/Model/Observer.php ADDED
@@ -0,0 +1,335 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Swym_Notepad_Model_Observer
3
+ {
4
+
5
+ public function addToCartAfter($observer)
6
+ {
7
+ /* print_r(Mage::app()->getRequest()->getParams());die; */
8
+
9
+ $product=$observer->getEvent()->getProduct();
10
+ $qty=Mage::app()->getRequest()->getParam('qty');
11
+ $variant=array();
12
+ $finalPrice=0;
13
+ $url='?';
14
+
15
+ if($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_GROUPED)
16
+ {
17
+ $finalPrice=0;
18
+ $oprice=0;
19
+ $options=Mage::app()->getRequest()->getParam('super_group');
20
+ foreach($options as $key=>$val)
21
+ {
22
+ $pro=Mage::getModel('catalog/product')->load($key);
23
+ $finalPrice+=$pro->getFinalPrice()*$val;
24
+ $oprice+=$pro->getPrice()*$val;
25
+ $url.='&super_group['.$key.']='.$val;
26
+ }
27
+
28
+ }
29
+ elseif($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE)
30
+ {
31
+ $oprice=$finalPrice=$product->getFinalPrice();
32
+ $options=Mage::app()->getRequest()->getParam('bundle_option');
33
+ foreach($options as $key=>$val)
34
+ {
35
+ $url.='&bundle_option['.$key.']='.$val;
36
+ }
37
+ $bundle_option_qty=Mage::app()->getRequest()->getParam('bundle_option_qty');
38
+ foreach($bundle_option_qty as $key=>$val)
39
+ {
40
+ $url.='&bundle_option_qty['.$key.']='.$val;
41
+ }
42
+ }
43
+ elseif($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE)
44
+ {
45
+ $produto_cor_options = $product->getTypeInstance(true)->getConfigurableAttributesAsArray($product);
46
+ $configOptions=array();
47
+ foreach($produto_cor_options as $options){
48
+ $atributo_cor = $options['values'];
49
+ foreach ($atributo_cor as $options2){
50
+ $configOptions[$options['attribute_id']][$options2['value_index']]=array(
51
+ 'attribute_label'=>$options['frontend_label'],
52
+ 'option_label'=>$options2['label'],
53
+ );
54
+ }
55
+ }
56
+ $super_attributes=Mage::app()->getRequest()->getParam('super_attribute');
57
+
58
+ foreach($super_attributes as $key=>$val)
59
+ {
60
+ $url.='&super_attribute['.$key.']='.$val;
61
+ $variant[$key]=array(
62
+ 'option_id'=>$val,
63
+ 'type'=>$configOptions[$key][$val]['attribute_label'],
64
+ 'label'=>$configOptions[$key][$val]['option_label']);
65
+
66
+ }
67
+ $finalPrice=$product->getFinalPrice();
68
+ $oprice=$product->getPrice();
69
+ }
70
+ else
71
+ {
72
+ $finalPrice=$product->getFinalPrice();
73
+ $oprice=$product->getPrice();
74
+ }
75
+ $image=Mage::helper('notepad')->getImageUrl($product);
76
+ if($allData=Mage::getSingleton('core/session')->getData('notepadcart'))
77
+ {
78
+
79
+ }
80
+ else
81
+ {
82
+ $allData=array();
83
+ }
84
+ $url=Mage::getUrl('notepad/index/cart',array('product'=>$product->getId())).$url;
85
+ $data=json_encode(array(
86
+ 'du'=>/* $product->getProductUrl() */$url,
87
+ 'dt'=>$product->getName(),
88
+ 'pr'=>$finalPrice,
89
+ 'op'=>$oprice,
90
+ 'variants'=>json_encode($variant),
91
+ 'epi'=>$product->getId(),
92
+ 'qty'=>$qty,
93
+ 'iu'=>$image,
94
+ ));
95
+ $allData[]=$data;
96
+ $cookie = Mage::getSingleton('core/cookie');
97
+ $cookie->set('notepadcart','notepadcart' ,time()+86400,'/');
98
+ Mage::getSingleton('core/session')->setData('notepadcart',$allData);
99
+
100
+ }
101
+ public function orderPlaceAfter($observer)
102
+ {
103
+ $order = $observer->getEvent()->getOrder();
104
+ if(Mage::registry('notepad_save_observer_executed')){
105
+ return $this; //this method has already been executed once in this request
106
+ }
107
+ $allData=array();
108
+ $items_processed=array();
109
+ foreach($order->getAllItems() as $item)
110
+ {
111
+ if ($item->getParentItem()) continue;
112
+ $product=$item->getProduct();
113
+
114
+ if($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE)
115
+ {
116
+
117
+ $produto_cor_options = $product->getTypeInstance(true)->getConfigurableAttributesAsArray($product);
118
+ $configOptions=array();
119
+
120
+ foreach($produto_cor_options as $options){
121
+ $atributo_cor = $options['values'];
122
+ foreach ($atributo_cor as $options2){
123
+ $configOptions[$options['attribute_id']][$options2['value_index']]=array(
124
+ 'attribute_label'=>$options['frontend_label'],
125
+ 'option_label'=>$options2['label'],
126
+ );
127
+ }
128
+ }
129
+ foreach($order->getAllItems() as $item1)
130
+ {
131
+ if($item1->getParentItem()&&!in_array($item1->getId(),$items_processed))
132
+ {
133
+
134
+ if ($item1->getParentItem()->getProduct()->getId()==$product->getId())
135
+ {
136
+
137
+ foreach($produto_cor_options as $super_attribute)
138
+ {
139
+ //$url.='&super_attribute['.$key.']='.$val;
140
+ /* $variant[$configOptions[$key][$val]['attribute_label']]=$configOptions[$key][$val]['option_label']; */
141
+
142
+ $key=$super_attribute['attribute_id'];
143
+ $val=Mage::getModel('catalog/product')->load($item1->getProduct()->getId())->getData($super_attribute['attribute_code']);
144
+ $variant[$key]=array(
145
+ 'option_id'=>$val,
146
+ 'type'=>$configOptions[$key][$val]['attribute_label'],
147
+ 'label'=>$configOptions[$key][$val]['option_label']);
148
+
149
+ }
150
+ $items_processed[]=$item1->getId();
151
+ break;
152
+ }
153
+ }
154
+ }
155
+
156
+ $finalPrice=$product->getFinalPrice();
157
+ $oprice=$product->getPrice();
158
+ $image=Mage::helper('notepad')->getImageUrl($product);
159
+ $data=json_encode(array(
160
+ 'du'=>$product->getProductUrl(),
161
+ 'dt'=>$product->getName(),
162
+ 'pr'=>$finalPrice,
163
+ 'op'=>$oprice,
164
+ 'variants'=>json_encode($variant),
165
+ 'epi'=>$product->getId(),
166
+ 'qty'=>$item->getQtyOrdered(),
167
+ 'et'=>6,
168
+ 'iu'=>$image,
169
+ ));
170
+ $allData[]=$data;
171
+ }
172
+ else
173
+ {
174
+ $finalPrice=$product->getFinalPrice();
175
+ $oprice=$product->getPrice();
176
+ $image=Mage::helper('notepad')->getImageUrl($product);
177
+ $data=json_encode(array(
178
+ 'du'=>$product->getProductUrl(),
179
+ 'dt'=>$product->getName(),
180
+ 'pr'=>$finalPrice,
181
+ 'op'=>$oprice,
182
+ 'epi'=>$product->getId(),
183
+ 'qty'=>$item->getQtyOrdered(),
184
+ 'et'=>6,
185
+ 'iu'=>$image,
186
+ ));
187
+ $allData[]=$data;
188
+ }
189
+
190
+ }
191
+ Mage::getSingleton('core/session')->setData('reportpurchase',$allData);
192
+ Mage::register('notepad_save_observer_executed',true);
193
+ }
194
+ public function removeItemFromCart($observer)
195
+ {
196
+
197
+ $product=$observer->getQuoteItem()->getProduct();
198
+ if($allData=Mage::getSingleton('core/session')->getData('remove_cart_item'))
199
+ {
200
+
201
+ }
202
+ else
203
+ {
204
+ $allData=array();
205
+ }
206
+ if($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE)
207
+ {
208
+
209
+ $produto_cor_options = $product->getTypeInstance(true)->getConfigurableAttributesAsArray($product);
210
+ $configOptions=array();
211
+
212
+ foreach($produto_cor_options as $options){
213
+ $atributo_cor = $options['values'];
214
+ foreach ($atributo_cor as $options2){
215
+ $configOptions[$options['attribute_id']][$options2['value_index']]=array(
216
+ 'attribute_label'=>$options['frontend_label'],
217
+ 'option_label'=>$options2['label'],
218
+ );
219
+ }
220
+ }
221
+ $variant=array();
222
+ foreach($produto_cor_options as $super_attribute)
223
+ {
224
+ $key=$super_attribute['attribute_id'];
225
+ $val='';
226
+ foreach($observer->getQuoteItem()->getChildren() as $item1)
227
+ $val=Mage::getModel('catalog/product')->load($item1->getProduct()->getId())->getData($super_attribute['attribute_code']);
228
+
229
+ $variant[$key]=array(
230
+ 'option_id'=>$val,
231
+ 'type'=>$configOptions[$key][$val]['attribute_label'],
232
+ 'label'=>$configOptions[$key][$val]['option_label']);
233
+
234
+ }
235
+ $finalPrice=$product->getFinalPrice();
236
+ $oprice=$product->getPrice();
237
+ $image=Mage::helper('notepad')->getImageUrl($product);
238
+ $data=json_encode(array(
239
+ 'du'=>$product->getProductUrl(),
240
+ 'dt'=>$product->getName(),
241
+ 'pr'=>$finalPrice,
242
+ 'op'=>$oprice,
243
+ 'variants'=>json_encode($variant),
244
+ 'epi'=>$product->getId(),
245
+ 'et'=>7,
246
+ 'iu'=>$image,
247
+ ));
248
+ $allData[]=$data;
249
+ }
250
+ else
251
+ {
252
+ $finalPrice=$product->getFinalPrice();
253
+ $oprice=$product->getPrice();
254
+ $image=Mage::helper('notepad')->getImageUrl($product);
255
+
256
+ $data=json_encode(array(
257
+ 'dt'=>$product->getName(),
258
+ 'pr'=>$finalPrice,
259
+ 'op'=>$oprice,
260
+ 'epi'=>$product->getId(),
261
+ 'et'=>7,
262
+ 'qty'=>$qty,
263
+ 'iu'=>$image,
264
+ ));
265
+ $allData[]=$data;
266
+ }
267
+ Mage::getSingleton('core/session')->setData('remove_cart_item',$allData);
268
+ }
269
+ public function addToWishlist($observer)
270
+ {
271
+ $product=$observer->getEvent()->getProduct();
272
+
273
+ $image=Mage::helper('notepad')->getImageUrl($product);
274
+ if($allData=Mage::getSingleton('core/session')->getData('notepad_wishlist'))
275
+ {
276
+
277
+ }
278
+ else
279
+ {
280
+ $allData=array();
281
+ }
282
+ $data=array(
283
+ 'du'=>$product->getProductUrl(),
284
+ 'dt'=>$product->getName(),
285
+ 'pr'=>$product->getPrice(),
286
+ 'epi'=>$product->getId(),
287
+ 'qty'=>1,
288
+ 'iu'=>$image,
289
+ );
290
+ $allData[]=$data;
291
+ $cookie = Mage::getSingleton('core/cookie');
292
+ $cookie->set('notepad_wishlist','notepad_wishlist' ,time()+86400,'/');
293
+ Mage::getSingleton('core/session')->setData('notepad_wishlist',$allData);
294
+
295
+ }
296
+ public function couponPost($observer)
297
+ {
298
+ $coupon=Mage::getModel('checkout/cart')->getQuote()->getCouponCode();
299
+ if($coupon!='')
300
+ {
301
+ if($allData=Mage::getSingleton('core/session')->getData('coupon_code'))
302
+ {
303
+
304
+ }
305
+ else
306
+ {
307
+ $allData=array();
308
+ }
309
+ $allData[]=json_encode(array('ccode'=>$coupon,'dt'=>'Coupon'));
310
+ $cookie = Mage::getSingleton('core/cookie');
311
+ $cookie->set('coupon_code','coupon_code' ,time()+86400,'/');
312
+ Mage::getSingleton('core/session')->setData('coupon_code',$allData);
313
+ }
314
+ }
315
+ public function productSaveBefore($observer)
316
+ {
317
+ $product = $observer->getProduct();
318
+ if($allData=Mage::getSingleton('admin/session')->getData('product_price_update'))
319
+ {
320
+
321
+ }
322
+ else
323
+ {
324
+ $allData=array();
325
+ }
326
+ if(Mage::getModel('catalog/product')->load($product->getId())->getPrice()!=$product->getPrice())
327
+ {
328
+ $allData[]=array('_id'=>$product->getId(),
329
+ 'pr'=>$product->getFinalPrice()
330
+ );
331
+ }
332
+ Mage::getSingleton('admin/session')->setData('product_price_update',json_encode($allData));
333
+ }
334
+
335
+ }
app/code/local/Swym/Notepad/Model/System/Wishlist.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Swym_Notepad_Model_System_Wishlist extends Mage_Core_Model_Config_Data
3
+ {
4
+
5
+ protected function _beforeSave()
6
+ {
7
+ $config = new Mage_Core_Model_Config();
8
+ if ($this->getValue()==1) {
9
+ $config->saveConfig('wishlist/general/active', 0, $scope='default', $scopeId=0);
10
+ }
11
+ else
12
+ {
13
+ $config->saveConfig('wishlist/general/active', 1, $scope='default', $scopeId=0);
14
+ }
15
+ }
16
+ }
app/code/local/Swym/Notepad/controllers/IndexController.php ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Swym_Notepad_IndexController extends Mage_Core_Controller_Front_Action{
3
+ public function IndexAction() {
4
+
5
+ $this->loadLayout();
6
+ $this->getLayout()->getBlock("head")->setTitle($this->__("Titlename"));
7
+ $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
8
+ $breadcrumbs->addCrumb("home", array(
9
+ "label" => $this->__("Home Page"),
10
+ "title" => $this->__("Home Page"),
11
+ "link" => Mage::getBaseUrl()
12
+ ));
13
+
14
+ $breadcrumbs->addCrumb("titlename", array(
15
+ "label" => $this->__("Titlename"),
16
+ "title" => $this->__("Titlename")
17
+ ));
18
+
19
+ $this->renderLayout();
20
+
21
+ }
22
+ /*******Function for getting updated price********/
23
+ public function priceUpdateAction() {
24
+ if($ids=$this->getRequest()->getParam('product_ids'))
25
+ {
26
+ $ids=explode(',',$ids);
27
+ }
28
+ $price=array();
29
+ foreach($ids as $id)
30
+ {
31
+ $product=Mage::getModel('catalog/product')->load($id);
32
+ if($product->getTypeId()=='simple')
33
+ {
34
+ $price[$product->getId()]=$product->getFinalPrice();
35
+ }
36
+ else
37
+ {
38
+ $price[$product->getId()]='none';
39
+ }
40
+ }
41
+ echo json_encode($price);
42
+ }
43
+ /********Function for getting js for add to cart by ajax********/
44
+ public function swymcalljsAction() {
45
+ if(Mage::getSingleton('core/session')->getData('notepad_wishlist')||
46
+ Mage::getSingleton('core/session')->getData('notepadcart'))
47
+ {
48
+ echo $this->getLayout()->createBlock('notepad/notepad')->setTemplate('notepad/swymcall.phtml')->toHtml();
49
+ return;
50
+ }
51
+ echo '';
52
+ }
53
+ /*******Function for authenticating loggedin users******/
54
+ public function authenticateAction(){
55
+ $email =$this->getRequest()->getParam('email');
56
+ $retailerId=Mage::getStoreConfig('notepad/general/retailer_id',Mage::app()->getStore()->getId());
57
+ $pub_key_string=Mage::getStoreConfig('notepad/general/swymkey',Mage::app()->getStore()->getId());
58
+ openssl_get_publickey($pub_key_string);
59
+ openssl_public_encrypt($email,$crypttext,$pub_key_string,OPENSSL_PKCS1_OAEP_PADDING);
60
+ //echo 'cryptText length before base64encode:'.strlen($crypttext).'</br>';
61
+ $url=$this->getRequest()->getParam('host').'/provider/validate';
62
+ $regid=$this->getRequest()->getParam('regId');
63
+ $crypttext=base64_encode($crypttext);
64
+ $postFields='pid='.$retailerId.'&e='.$crypttext.'&reg-id='.$regid;
65
+ $postFields='{"pid":"'.$retailerId.'","e":"'.$crypttext.'","reg-id":"'.$regid.'"}';
66
+
67
+ $ch = curl_init();
68
+ curl_setopt($ch, CURLOPT_URL,$url);
69
+ curl_setopt($ch, CURLOPT_POSTFIELDS,$postFields);
70
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type:application/json"));
71
+ curl_setopt($ch, CURLOPT_HEADER, 1);
72
+ curl_setopt($ch, CURLOPT_POST, 1);
73
+
74
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
75
+ $server_output = curl_exec ($ch);
76
+ $info = curl_getinfo($ch);
77
+ curl_close ($ch);
78
+ if($info['http_code']==200)
79
+ {
80
+ echo json_encode(array('success'=>'1'));
81
+ }
82
+ else
83
+ {
84
+ echo json_encode(array('success'=>'0'));
85
+ }
86
+
87
+ }
88
+ public function cartAction()
89
+ {
90
+ if($this->checkProductExistOrNot())
91
+ {
92
+ $this->_redirect('checkout/cart');
93
+ return;
94
+ }
95
+
96
+ $cart = Mage::getModel('checkout/cart');
97
+ $cart->init();
98
+ $product= Mage::getModel('catalog/product')->load($this->getRequest()->getParam('product'));
99
+ $params = array(
100
+ 'product' => $product->getId(),
101
+ 'super_attribute' => $this->getRequest()->getParam('super_attribute'),
102
+ 'qty' => 1,
103
+ );
104
+ if($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE)
105
+ {
106
+
107
+ $cart->addProduct($product,$params);
108
+ }
109
+ elseif($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE)
110
+ {
111
+ $cart->addProduct($product ,
112
+ array( 'product_id' => $productId,
113
+ 'qty' => 1,
114
+ 'bundle_option' => $this->getRequest()->getParam('bundle_option'),
115
+ ));
116
+ }
117
+ elseif($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_GROUPED)
118
+ {
119
+ $cart->addProduct($product ,
120
+ array( 'product_id' => $productId,
121
+ 'qty' => 1,
122
+ 'super_group' => $this->getRequest()->getParam('super_group'),
123
+ ));
124
+ }
125
+ else
126
+ {
127
+ $cart->addProduct($product ,
128
+ array( 'product_id' => $productId,
129
+ 'qty' => 1,
130
+ ));
131
+ }
132
+
133
+ $cart->save();
134
+ $this->_redirect('checkout/cart');
135
+ }
136
+ public function checkProductExistOrNot()
137
+ {
138
+ $product= Mage::getModel('catalog/product')->load($this->getRequest()->getParam('product'));
139
+ $quote = Mage::getSingleton('checkout/session')->getQuote();
140
+ $cartItems = $quote->getAllVisibleItems();
141
+
142
+ foreach ($cartItems as $item)
143
+ {
144
+ $options=$item->getOptions();
145
+ foreach($options as $op)
146
+ {
147
+ /* if($item->getParentItem())
148
+ echo $item->getParentItem()->getProduct()->getId().'</br>'; */
149
+ if($item->getProduct()->getId()==$product->getId())
150
+ {
151
+ if($op->getCode()=='info_buyRequest')
152
+ {
153
+ $result=$op->getData('value');
154
+ $var1 = unserialize($result);
155
+
156
+ if($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE)
157
+ {
158
+ $super_attribute=$this->getRequest()->getParam('super_attribute');
159
+ if($var1['super_attribute']==$super_attribute)
160
+ {
161
+
162
+ return true;
163
+ }
164
+ }
165
+ elseif($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE)
166
+ {
167
+ $bundle_option=$this->getRequest()->getParam('bundle_option');
168
+ if($var1['bundle_option']==$bundle_option)
169
+ {
170
+ return true;
171
+ }
172
+
173
+ }
174
+ elseif($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_GROUPED)
175
+ {
176
+ $super_group=$this->getRequest()->getParam('super_group');
177
+ if($var1['super_group']==$super_group)
178
+ {
179
+ return true;
180
+ }
181
+
182
+ }
183
+ else
184
+ {
185
+ return true;
186
+ }
187
+ }
188
+ }
189
+ }
190
+
191
+ }
192
+
193
+ return false;
194
+ }
195
+ }
app/code/local/Swym/Notepad/etc/adminhtml.xml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <admin>
6
+ <children>
7
+ <system>
8
+ <children>
9
+ <config>
10
+ <children>
11
+ <notepad translate="title" module="notepad">
12
+ <title>Notepad Section</title>
13
+ <sort_order>0</sort_order>
14
+ </notepad>
15
+ </children>
16
+ </config>
17
+ </children>
18
+ </system>
19
+ </children>
20
+ </admin>
21
+ </resources>
22
+ </acl>
23
+ </config>
app/code/local/Swym/Notepad/etc/config.xml ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Swym_Notepad>
5
+ <version>0.1.0</version>
6
+ </Swym_Notepad>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <notepad>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Swym_Notepad</module>
14
+ <frontName>notepad</frontName>
15
+ </args>
16
+ </notepad>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <notepad>
21
+ <file>notepad.xml</file>
22
+ </notepad>
23
+ </updates>
24
+ </layout>
25
+
26
+ </frontend>
27
+ <adminhtml>
28
+ <layout>
29
+ <updates>
30
+ <notepad>
31
+ <file>notepad.xml</file>
32
+ </notepad>
33
+ </updates>
34
+ </layout>
35
+ </adminhtml>
36
+ <global>
37
+ <models>
38
+ <notepad>
39
+ <class>Swym_Notepad_Model</class>
40
+ </notepad>
41
+
42
+ </models>
43
+ <resources>
44
+ <notepad_setup>
45
+ <setup>
46
+ <module>Swym_Notepad</module>
47
+ <class>Mage_Core_Model_Resource_Setup</class>
48
+ </setup>
49
+ </notepad_setup>
50
+ </resources>
51
+
52
+ <events>
53
+ <checkout_cart_product_add_after>
54
+ <observers>
55
+ <notepad_cart_add_product_complete>
56
+ <class>Swym_Notepad_Model_Observer</class>
57
+ <method>addToCartAfter</method>
58
+ </notepad_cart_add_product_complete>
59
+ </observers>
60
+ </checkout_cart_product_add_after>
61
+ <wishlist_add_product>
62
+ <observers>
63
+ <notepad_wishlist_add_product>
64
+ <class>Swym_Notepad_Model_Observer</class>
65
+ <method>addToWishlist</method>
66
+ </notepad_wishlist_add_product>
67
+ </observers>
68
+ </wishlist_add_product>
69
+ <controller_action_postdispatch_checkout_cart_couponPost>
70
+ <observers>
71
+ <notepad_wishlist_add_product>
72
+ <class>Swym_Notepad_Model_Observer</class>
73
+ <method>couponPost</method>
74
+ </notepad_wishlist_add_product>
75
+ </observers>
76
+ </controller_action_postdispatch_checkout_cart_couponPost>
77
+ <sales_order_save_after>
78
+ <observers>
79
+ <notepad_order_place>
80
+ <type>singleton</type>
81
+ <class>Swym_Notepad_Model_Observer</class>
82
+ <method>orderPlaceAfter</method>
83
+ </notepad_order_place>
84
+ </observers>
85
+ </sales_order_save_after>
86
+ <sales_quote_remove_item>
87
+ <observers>
88
+ <notepad_sales_quote_remove_item>
89
+ <type>singleton</type>
90
+ <class>Swym_Notepad_Model_Observer</class>
91
+ <method>removeItemFromCart</method>
92
+ </notepad_sales_quote_remove_item>
93
+ </observers>
94
+ </sales_quote_remove_item>
95
+ <catalog_product_save_before>
96
+ <observers>
97
+ <notepad_catalog_product_save_before>
98
+ <type>singleton</type>
99
+ <class>Swym_Notepad_Model_Observer</class>
100
+ <method>productSaveBefore</method>
101
+ </notepad_catalog_product_save_before>
102
+ </observers>
103
+ </catalog_product_save_before>
104
+ </events>
105
+ <helpers>
106
+ <notepad>
107
+ <class>Swym_Notepad_Helper</class>
108
+ </notepad>
109
+ </helpers>
110
+ <blocks>
111
+ <notepad>
112
+ <class>Swym_Notepad_Block</class>
113
+ </notepad>
114
+ <catalog>
115
+ <rewrite>
116
+ <product_price>Swym_Notepad_Block_Product_Price</product_price>
117
+ </rewrite>
118
+ </catalog>
119
+ </blocks>
120
+ </global>
121
+ </config>
app/code/local/Swym/Notepad/etc/system.xml ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <tabs>
4
+ <swym translate="label" module="notepad">
5
+ <label>Swym</label>
6
+ <sort_order>0</sort_order>
7
+ </swym>
8
+ </tabs>
9
+ <sections>
10
+ <notepad translate="label" module="notepad">
11
+ <label>Swym Relay</label>
12
+ <tab>swym</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>0</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
+ <groups>
19
+ <general translate="label">
20
+ <label>General</label>
21
+ <frontend_type>text</frontend_type>
22
+ <sort_order>0</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>1</show_in_store>
26
+ <fields>
27
+ <status translate="label">
28
+ <label>Enable</label>
29
+ <frontend_type>select</frontend_type>
30
+ <source_model>adminhtml/system_config_source_yesno</source_model>
31
+ <sort_order>0</sort_order>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>1</show_in_store>
35
+ <comment>Enable/Disable the Swym Relay extension</comment>
36
+ </status>
37
+ <show translate="label">
38
+ <label>Display UI</label>
39
+ <frontend_type>select</frontend_type>
40
+ <source_model>adminhtml/system_config_source_yesno</source_model>
41
+ <sort_order>10</sort_order>
42
+ <show_in_default>1</show_in_default>
43
+ <show_in_website>1</show_in_website>
44
+ <show_in_store>1</show_in_store>
45
+ <comment>Display the Swym Relay UI on your website</comment>
46
+ </show>
47
+ <retailer_id translate="label">
48
+ <label>Retailer Id</label>
49
+ <frontend_type>text</frontend_type>
50
+ <sort_order>20</sort_order>
51
+ <show_in_default>1</show_in_default>
52
+ <show_in_website>1</show_in_website>
53
+ <show_in_store>1</show_in_store>
54
+ <comment>Enter the Retailer Id provided by Swym</comment>
55
+ </retailer_id>
56
+ <swymkey translate="label">
57
+ <label>PEM key</label>
58
+ <frontend_type>textarea</frontend_type>
59
+ <sort_order>22</sort_order>
60
+ <show_in_default>1</show_in_default>
61
+ <show_in_website>1</show_in_website>
62
+ <show_in_store>1</show_in_store>
63
+ <comment>Please paste the entire content of the public key provided by Swym. Ensure that you also
64
+ include -----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY----- as well.</comment>
65
+ </swymkey>
66
+ <wishlist translate="label">
67
+ <label>Enable Swym Favorites</label>
68
+ <frontend_type>select</frontend_type>
69
+ <source_model>adminhtml/system_config_source_yesno</source_model>
70
+ <backend_model>notepad/system_wishlist</backend_model>
71
+ <sort_order>70</sort_order>
72
+ <show_in_default>1</show_in_default>
73
+ <show_in_website>1</show_in_website>
74
+ <show_in_store>1</show_in_store>
75
+ <comment>Swym Relay's Favoritesis a wishlist that works within Swym Relay. Enabling this container will disable the Magento wishlist feature automatically</comment>
76
+ <depends>
77
+ <status>1</status>
78
+ </depends>
79
+ </wishlist>
80
+ <wishlisttitle translate="label">
81
+ <label>Favorites's label</label>
82
+ <frontend_type>text</frontend_type>
83
+ <sort_order>80</sort_order>
84
+ <show_in_default>1</show_in_default>
85
+ <show_in_website>1</show_in_website>
86
+ <show_in_store>1</show_in_store>
87
+ <depends>
88
+ <status>1</status>
89
+ </depends>
90
+ <comment>Customize the label for Swym favorite's. Some ideas for the label: Add to my Bag, Add to wishlist, Favorites etc.</comment>
91
+ </wishlisttitle>
92
+
93
+ <title translate="label">
94
+ <label>Title</label>
95
+ <frontend_type>text</frontend_type>
96
+ <sort_order>30</sort_order>
97
+ <show_in_default>1</show_in_default>
98
+ <show_in_website>1</show_in_website>
99
+ <show_in_store>1</show_in_store>
100
+ <comment>Customize the title for the Swym Relay UI</comment>
101
+ </title>
102
+ <primary_color translate="label comment">
103
+ <label>Color</label>
104
+ <comment>HEX value (e.g. #000000)</comment>
105
+ <frontend_type>text</frontend_type>
106
+ <sort_order>50</sort_order>
107
+ <show_in_default>1</show_in_default>
108
+ <show_in_website>1</show_in_website>
109
+ <show_in_store>1</show_in_store>
110
+ <comment>Customize the primary color for the Swym Relay UI</comment>
111
+ </primary_color>
112
+ <icon translate="label comment">
113
+ <label>Icon</label>
114
+ <comment>Allowed file types: PNG, GIF, JPG, JPEG (40x40)</comment>
115
+ <frontend_type>image</frontend_type>
116
+ <backend_model>adminhtml/system_config_backend_image</backend_model>
117
+ <upload_dir config="system/filesystem/media" scope_info="1">notepad</upload_dir>
118
+ <base_url type="media" scope_info="1">notepad</base_url>
119
+ <sort_order>60</sort_order>
120
+ <show_in_default>1</show_in_default>
121
+ <show_in_website>1</show_in_website>
122
+ <show_in_store>1</show_in_store>
123
+ </icon>
124
+ </fields>
125
+ </general>
126
+ </groups>
127
+ </notepad>
128
+ </sections>
129
+ </config>
app/code/local/Swym/Notepad/sql/notepad_setup/install-0.1.0.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ /* @var $installer Mage_Core_Model_Resource_Setup */ //or whatever you configured
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->setConfigData('wishlist/general/active', 0, $scope='default', $scopeId=0);
8
+
9
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/notepad.xml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <layout>
2
+ <default>
3
+ <!-- <reference name="head">
4
+ <action method="addJs"><script>notepad/process.js</script></action>
5
+
6
+ <action method="addItem"><type>external_js</type><name>http://code.swym.it/code/swym.js</name><params/></action>
7
+ </reference>
8
+ -->
9
+ <reference name="content">
10
+ <block type="notepad/notepad" name="notepad" as="notepad" template="notepad/swymcall.phtml"/>
11
+ </reference>
12
+ </default>
13
+ </layout>
app/design/adminhtml/default/default/template/notepad/swymcall.phtml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if($this->isNotepadEnabled()){
2
+ $retailerId=$this->getRetailerId();
3
+ ?>
4
+ <script type="text/javascript" src="http://code.swym.it/code/swym.js"></script>
5
+ <script type="text/javascript">
6
+ if(typeof window._swat!='undefined')
7
+ window._swat.setRetailerId("<?php echo $retailerId; ?>");
8
+ </script>
9
+
10
+ <?php if($allData=$this->getPriceUpdateData()){
11
+ /* foreach($allData as $data) */
12
+ {
13
+ ?>
14
+ <script type="text/javascript">
15
+ if(typeof window._swat!='undefined')
16
+ {
17
+ window._swat.performPriceUpdate (<?php echo $allData ?>,function(){console.log('check');});
18
+ }
19
+ </script>
20
+ <?php }
21
+ } ?>
22
+ <?php } ?>
app/design/frontend/base/default/layout/notepad.xml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addJs" ifconfig="notepad/general/status" ><script>notepad/swymex.js</script></action>
6
+ <action method="addCss"><stylesheet>notepad/css/styles.css</stylesheet></action>
7
+
8
+ <block type="core/text" name="notepadjs">
9
+ <action method="setText">
10
+ <text>
11
+ <![CDATA[<script type="text/javascript" src="http://code.swym.it/code/swym.js"></script><script type="text/javascript"></script>]]>
12
+ </text>
13
+ </action>
14
+ </block>
15
+ <block type="core/text" name="renderjs">
16
+ <action method="setText">
17
+ <text>
18
+ <![CDATA[<script type="text/javascript" src="http://code.swym.it/code/render.js"></script><script type="text/javascript"></script>]]>
19
+ </text>
20
+ </action>
21
+ </block>
22
+ <block type="core/text" name="mustachejs">
23
+ <action method="setText">
24
+ <text>
25
+ <![CDATA[<script type="text/javascript" src="http://code.swym.it/code/mustache.js"></script><script type="text/javascript"></script>]]>
26
+ </text>
27
+ </action>
28
+ </block>
29
+ </reference>
30
+
31
+ <reference name="after_body_start">
32
+ <block type="notepad/notepad" name="notepad" as="notepad" template="notepad/notepad.phtml">
33
+ <block type="notepad/notepad" name="swym_call_js" as="swym_call_js" template="notepad/swymcall.phtml"/>
34
+ <block type="notepad/notepad" name="main_notepad" as="main_notepad" template="notepad/main_notepad.phtml"/>
35
+ </block>
36
+ </reference>
37
+ </default>
38
+ <notepad_index_index>
39
+ <reference name="root">
40
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
41
+ </reference>
42
+ <reference name="content">
43
+ <block type="notepad/index" name="notepad_index" template="notepad/index.phtml"/>
44
+ </reference>
45
+ </notepad_index_index>
46
+ </layout>
47
+
app/design/frontend/base/default/template/notepad/main_notepad.phtml ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script id="swym-fetch-template" type="x-tmpl-mustache">
2
+ <div class="swym-inner">
3
+ <div class="swym-image">
4
+ <a href="{{du}}">
5
+ <img src="{{iu}}" />
6
+ <div class="swym-viewed-icon swym-background-color {{deviceType}}">
7
+ <i class="swym-icon-sprite"></i>
8
+ <span>{{dateStr}}</span>
9
+ <span class="swym-background swym-background-color"></span>
10
+ </div>
11
+ </a>
12
+ </div>
13
+ <div class="swym-actions">
14
+ {{#inwishlist}}
15
+ <a href="#" class="swym-wishlist" alt="Add To Wishlist">
16
+ <i class="swym-icon-sprite"></i>
17
+ </a>
18
+ {{/inwishlist}}
19
+ <a href="javascript:void(0);" class="swym-remove" onclick="deleteItem('{{_id}}');" alt="Remove Item">
20
+ <i class="swym-icon-sprite"></i>
21
+ </a>
22
+ </div>
23
+ <div class="swym-information">
24
+ <div class="swym-title">
25
+ <a href="{{du}}">{{dt}}</a>
26
+ </div>
27
+ <div class="swym-price swym-text-color"><span class="swym-old">{{op}}</span>{{pr}}</div>
28
+ <div class="swym-viewed-label">{{dateStr}}</div>
29
+ {{#incart}}
30
+ <a href="{{du}}" class="swym-add-to-cart" id="swym-add-to-cart">
31
+ <i class="swym-icon-sprite"></i> In Your Cart
32
+ </a>
33
+ {{/incart}}
34
+ </div>
35
+ </div>
36
+ </script>
37
+ <script id="swym-email-template" type="x-tmpl-mustache">
38
+ <a href="javascript:void(0);" onClick="_changeTab('settings');">
39
+ <i class="swym-icon-sprite"></i>
40
+ <span>{{email}}</span>
41
+ </a>
42
+ </script>
43
+ <script id="swym-toast-template" type="x-tmpl-mustache">
44
+ <div id="swym-notification-header" class="swym-notification-header swym-background-color">
45
+ <i class="swym-icon swym-icon-sprite"></i>
46
+ <strong id="swym-notification-title" onclick="launchNotepadFromNotification();" class="swym-title">{{hdr}}</strong>
47
+ <a href="javascript:void(0);" onclick="_closeNotification();" class="swym-close">
48
+ <i class="swym-icon-sprite"></i> Close
49
+ </a>
50
+ </div>
51
+ <div class="swym-notification-content" id="swym-notification-content">
52
+ <div class="swym-item">
53
+ <div class="swym-inner">
54
+ <div class="swym-image">
55
+ <a href="{{du}}">
56
+ <img src="{{iu}}" />
57
+ </a>
58
+ </div>
59
+ <div class="swym-information">
60
+ <div class="swym-title">
61
+ <a href="{{du}}">{{dt}}</a>
62
+ </div>
63
+ <div class="swym-price">
64
+ <span class="swym-old">{{op}}</span> {{pr}}
65
+ </div>
66
+ <a href="javascript:void(0);" onclick="launchNotepadFromNotification();" class="swym-view-history">View Your Shopping History</a>
67
+ </div>
68
+ </div>
69
+ </div>
70
+ <div class="swym-powered-by">
71
+ Powered By Swym
72
+ </div>
73
+ </div>
74
+ </script>
75
+ <script id="swym-device-template" type="x-tmpl-mustache">
76
+ <div class="swym-inner">
77
+ <div class="swym-image">
78
+ <i class="{{deviceType}} swym-background-color"></i>
79
+ </div>
80
+ <div class="swym-information">
81
+ <div class="swym-title swym-text-color">{{dcat}}</div>
82
+ <div class="swym-last-accessed">Created On: {{dateStr}}</div>
83
+ </div>
84
+ </div>
85
+ </script>
86
+ <script id='swym-settings-auth-template' type="x-tmpl-mustache">
87
+ <div class="swym-auth" id="swym-auth">
88
+ <p>Fetch history from my other devices</p>
89
+ <form action="#" id="swym-email-auth-form">
90
+ <i class="swym-icon-sprite"></i>
91
+ <input type="email" name="swym-email-auth" id="swym-email-auth-input" class="swym-input" placeholder="Enter your email address" />
92
+ <button type="button" id="swym-email-auth-button" class="swym-button swym-background-color loader">Connect</button>
93
+ </form>
94
+ </div>
95
+ </script>
96
+ <script type="x-tmpl-mustache" id='swym-welcome-template'>
97
+ <strong class="swym-text-color">The {{nptitle}} is Your Shopping Assistant</strong>
98
+ <p>We will keep track of all your shopping activity making it easily accessible from all your devices. You won't have to lose time searching for that shirt you saw on your lunchbreak that you just can’t live without. </p>
99
+ <button type="button" onClick="_changeTab('items');" class="swym-button swym-background-color">Access {{nptitle}}</button>
100
+ <p>
101
+ <!-- <small><a class="swym-text-color" href="#">I don’t need a shopping assistant, please turn {{nptitle}} off</a></small> -->
102
+ </p>
103
+ </script>
104
+
105
+ <div id="swym-plugin">
106
+ <div id="swym-anchor">
107
+ <a class="swym-background-color" href="javascript:void(0);" onClick="_openModal();" id="notepad-anchor-title">
108
+ <i class="swym-icon-sprite swym-icon"></i></a>
109
+ </div>
110
+ <script type="text/javascript">
111
+ swymRenderNotepadAnchor();
112
+ </script>
113
+ <div id="swym-modal">
114
+ <div id="swym-modal-header" class="swym-modal-header swym-background-color">
115
+ <strong class="swym-title" id="notepad-title"></strong>
116
+ <span class="swym-tag">Your Personal Shopping Assistant</span>
117
+ <a href="javascript:void(0);" onClick="_closeModal();" class="swym-close">
118
+ <i class="swym-icon-sprite"></i> Close
119
+ </a>
120
+ </div>
121
+ <div id="swym-toolbar-top" class="swym-toolbar-top">
122
+ <ul class="swym-actions">
123
+ <li class="swym-arrow-left">
124
+ <a href="javascript:void(0);" onClick="searchClear();">
125
+ <i class="swym-icon-sprite"></i>
126
+ </a>
127
+ </li>
128
+ <li class="swym-settings">
129
+ <a href="javascript:void(0);" onClick="_changeTab('settings');">
130
+ <i class="swym-icon-sprite"></i>
131
+ </a>
132
+ </li>
133
+ <li class="swym-refresh">
134
+ <a href="javascript:void(0);" onClick="searchSubmit();">
135
+ <i class="swym-icon-sprite"></i>
136
+ </a>
137
+ </li>
138
+ <li class="swym-help">
139
+ <a href="javascript:void(0);" onClick="_changeTab('welcome');">
140
+ <i class="swym-icon-sprite"></i>
141
+ </a>
142
+ </li>
143
+ <li>
144
+ <span class="swym-separator"></span>
145
+ </li>
146
+ <li class="swym-user" id="swym-user"></li>
147
+ <li class="swym-search">
148
+ <a href="javascript:void(0);" onClick="toggleSearch();">
149
+ <i class="swym-icon-sprite"></i>
150
+ </a>
151
+ </li>
152
+ </ul>
153
+ <div id="swym-search-container" class="swym-search-container">
154
+ <form action="#" method="get" name="swymHistorySearch" onSubmit="searchSubmit(); return false;" autocomplete="off">
155
+ <input type="search" name="swym-search" class="swym-input" id="swymSearch" onkeydown="searchKeyDown();" placeholder="Search my notepad..." />
156
+ <button type="button" onClick="searchSwymNotepad(swymHistorySearch.swymSearch.value);">
157
+ <i class="swym-icon-sprite"></i> Search
158
+ </button>
159
+ </form>
160
+ </div>
161
+ </div>
162
+ <div id="swym-modal-content" class="swym-modal-content">
163
+ <div id="swym-settings-container" class="swym-settings-container">
164
+ <strong class="swym-heading" id="swym-devices-heading">Devices</strong>
165
+ <p>Devices where you recently accessed your shopping history</p>
166
+ <ul class="swym-device-grid" id="swym-device-grid"></ul>
167
+ <!--
168
+ <button type="button" class="swym-button swym-background-color">Clear notepad history</button>
169
+ -->
170
+ </div>
171
+ <div id="swym-items-container">
172
+ <ul id="swym-item-grid" class="swym-item-grid"></ul>
173
+ </div>
174
+ <div id="swym-welcome-container" class="swym-welcome-container">
175
+ </div>
176
+ </div>
177
+ </div>
178
+ <div id="swym-notification">
179
+ <div id="swym-notification-header" class="swym-notification-header swym-background-color">
180
+ <i class="swym-icon swym-icon-sprite"></i>
181
+ <strong id="swym-notification-title" onclick="launchNotepadFromNotification();" class="swym-title">A product you recently added to your shopping cart is now on sale.</strong>
182
+ <a href="javascript:void(0);" onclick="_closeNotification();" class="swym-close">
183
+ <i class="swym-icon-sprite"></i> Close
184
+ </a>
185
+ </div>
186
+ <div id="swym-notification-content" class="swym-notification-content">
187
+ <div class="swym-item">
188
+ <div class="swym-inner">
189
+ <div class="swym-image">
190
+ <a href="#">
191
+ </a>
192
+ </div>
193
+ <div class="swym-information">
194
+ <div class="swym-title swym-text-color">
195
+ <a href="#">Nolita Cami</a>
196
+ </div>
197
+ <div class="swym-price swym-text-color">
198
+ <span class="swym-old">$130.00</span> $150.00
199
+ </div>
200
+ <a href="javascript:void(0);" class="swym-view-history swym-text-color" onclick="launchNotepadFromNotification();">View Your Shopping History</a>
201
+ </div>
202
+ </div>
203
+ </div>
204
+ <div class="swym-powered-by">
205
+ Powered By Swym
206
+ </div>
207
+ </div>
208
+ </div>
209
+ <div id="swym-overlay" onClick="_closeModal();"></div>
210
+ </div>
211
+
212
+ <script type="text/javascript">
213
+ setupNotepadUX();
214
+ </script>
215
+
app/design/frontend/base/default/template/notepad/notepad.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if($this->isNotepadEnabled()){
2
+ $retailerId=$this->getRetailerId();
3
+ $notepadTitle=$this->getNotepadTitle();
4
+ ?>
5
+ <script type="text/javascript">
6
+ if(typeof window._swat!='undefined') {
7
+ window._swat.setRetailerId("<?php echo $retailerId; ?>");
8
+ window._swat.triggerNotify({"pageType" : 0 });
9
+ window._swat.setTitle("<?php echo $notepadTitle; ?>");
10
+ }
11
+ </script>
12
+ <?php if($this->canShowNotepad()): ?>
13
+ <?php $notepadColor = trim(str_replace('#', '', Mage::getStoreConfig('notepad/general/primary_color', Mage::app()->getStore()->getId()))); ?>
14
+ <?php $notepadIcon = Mage::getStoreConfig('notepad/general/icon', Mage::app()->getStore()->getId()); ?>
15
+ <style type="text/css">
16
+ <?php if(preg_match('/([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?\b/', $notepadColor)): ?>
17
+ .swym-background-color { background-color: #<?php echo $notepadColor; ?> !important; }
18
+ .swym-text-color { color: #<?php echo $notepadColor; ?> !important; }
19
+ <?php endif; ?>
20
+ <?php if($notepadIcon): ?>
21
+ .swym-icon {
22
+ background: url('<?php echo Mage::getBaseUrl('media') . 'notepad/' . $notepadIcon; ?>') !important;
23
+ background-size: 20px !important;
24
+ }
25
+ <?php endif; ?>
26
+ </style>
27
+ <?php echo $this->getChildHtml('main_notepad'); ?>
28
+ <?php endif; ?>
29
+
30
+ <div id="swym_call_js">
31
+ <?php
32
+ echo $this->getChildHtml('swym_call_js');
33
+ ?>
34
+ </div>
35
+ <?php } ?>
app/design/frontend/base/default/template/notepad/swymcall.phtml ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <input type="hidden" id="updateswymcallurl" value="<?php echo Mage::getUrl('notepad/index/swymcalljs') ?>">
2
+ <input type="hidden" id="authenticateloggedinuser" value="<?php echo Mage::getUrl('notepad/index/authenticate') ?>">
3
+ <?php
4
+ if($email=Mage::getSingleton('customer/session')->getCustomer()->getEmail())
5
+ {
6
+ ?>
7
+ <script type="text/javascript">
8
+ customerIsLoggedIn=true;
9
+ customerEmail='<?php echo $email ?>';
10
+ tryAuth();
11
+ </script>
12
+ <?php
13
+ }
14
+ ?>
15
+ <script type="text/javascript">
16
+ wishlistStatus='<?php echo Mage::getStoreConfig('notepad/general/wishlist',Mage::app()->getStore()->getId()); ?>';
17
+ wishlistTitle='<?php echo $this->getWishlistTitle(); ?>';
18
+ noteIsMobile='<?php echo $this->isMobile()?'1':'0'; ?>';
19
+ NotepadTitle='<?php echo Mage::getStoreConfig('notepad/general/title',Mage::app()->getStore()->getId()); ?>';
20
+ showNotepad='<?php echo Mage::getStoreConfig('notepad/general/show',Mage::app()->getStore()->getId()); ?>';
21
+ window._swat.triggerNotify(<?php echo $this->getPageView() ?>);
22
+ </script>
23
+ <script type="text/javascript">
24
+ window._swat.triggerNotify(<?php echo $this->getPageView() ?>);
25
+ </script>
26
+
27
+ <?php if($data=$this->getProductView()){
28
+
29
+ ?>
30
+ <script type="text/javascript">
31
+ window._swat.trackPageview(<?php echo $data ?>);
32
+ </script>
33
+ <?php } ?>
34
+ <?php if($data=$this->getCategoryView()){
35
+ ?>
36
+ <script type="text/javascript">
37
+ if(typeof window._swat!='undefined')
38
+ {
39
+ window._swat.trackPageview(<?php echo $data ?>);
40
+ window._swat.triggerNotify({"pageType" : 0 });
41
+ }
42
+
43
+ </script>
44
+ <?php } ?>
45
+ <?php if($allData=$this->getAddToCart()){
46
+ foreach($allData as $data)
47
+ {
48
+ ?>
49
+ <script type="text/javascript">
50
+ if(typeof window._swat!='undefined')
51
+ {
52
+ window._swat.addToCart(<?php echo $data ?>);
53
+ }
54
+ </script>
55
+ <?php }
56
+ } ?>
57
+
58
+ <?php if($allData=$this->getAddToWishlist()){
59
+ foreach($allData as $data)
60
+ {
61
+ ?>
62
+ <script type="text/javascript">
63
+ // et - event-type of 4 indicates a Wishlist
64
+ window._swat.set("et", "4");
65
+ // du - document uri, if not set will use the URI of the current page
66
+ window._swat.set("du","<?php echo $data['du'] ?>");
67
+ // dt - document title, if not set will use the title of the current page
68
+ window._swat.set("dt","<?php echo $data['dt'] ?>");
69
+ // pr - price (float value assumed to be in USD)
70
+ window._swat.set("pr","<?php echo $data['pr'] ?>");
71
+ // op - orignal price (float value assumed to be in USD)
72
+ window._swat.set("op","<?php echo $data['pr'] ?>");
73
+ // epi - product identifier
74
+ window._swat.set("epi","<?php echo $data['epi'] ?>");
75
+ // iu = image uri, optional
76
+ window._swat.set("iu","<?php echo $data['iu'] ?>");
77
+ // Send this event
78
+ window._swat.send();
79
+ </script>
80
+ <?php
81
+ }
82
+ } ?>
83
+ <?php if($coupons=$this->getAddCoupon()){
84
+ foreach($coupons as $coupon)
85
+ {
86
+ ?>
87
+ <script type="text/javascript">
88
+ window._swat.addToCoupon(<?php echo $coupon ?>,function(r) { console.log('add coupon'); }, { uri : 'https://www.google.com/search?q=reminder'})
89
+ </script>
90
+ <?php
91
+ }
92
+ }
93
+
94
+ ?>
95
+ <?php if($allData=$this->getReportPurchase()){
96
+ foreach($allData as $data)
97
+ {
98
+ ?>
99
+ <script type="text/javascript">
100
+ if(typeof window._swat!='undefined')
101
+ {
102
+ window._swat.reportPurchase(<?php echo $data ?>);
103
+ }
104
+ </script>
105
+ <?php }
106
+ } ?>
107
+ <?php if($allData=$this->getRemovedItems()){
108
+ foreach($allData as $data)
109
+ {
110
+ ?>
111
+ <script type="text/javascript">
112
+ if(typeof window._swat!='undefined')
113
+ {
114
+ window._swat.dropFromCart(<?php echo $data ?>);
115
+ }
116
+ </script>
117
+ <?php }
118
+ } ?>
119
+
120
+
app/etc/modules/Swym_Notepad.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Swym_Notepad>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ <version>0.1.0</version>
8
+ </Swym_Notepad>
9
+ </modules>
10
+ </config>
js/notepad/swymex.js ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var customerIsLoggedIn = false;
2
+ var customerEmail = '';
3
+ var wishlistTitle = '';
4
+ var wishlistStatus='';
5
+ try {
6
+ function sQuery(query) {
7
+ return document.querySelector(query);
8
+ }
9
+
10
+ function _authenticateLoggedInUser() {
11
+ var sw = window._swat;
12
+ var regid = sw.getSwymRegistrationId();
13
+ var hosturi = sw.getSwymHostUri();
14
+
15
+ if(!regid || !hosturi) {
16
+ console.log('skipping auth call due to invalid regId and/or hosturi');
17
+ return;
18
+ }
19
+ if(customerIsLoggedIn == false || customerEmail == '') {
20
+ console.log('skipping auth calls');
21
+ return;
22
+ }
23
+
24
+ var email = customerEmail;
25
+ var url=sQuery('#authenticateloggedinuser').value;
26
+ var xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() :
27
+ new ActiveXObject("Microsoft.XMLHTTP");
28
+ var response='';
29
+ xmlhttp.onreadystatechange = function() {
30
+ if (xmlhttp.readyState == 4) {
31
+ if (xmlhttp.status == 200) {
32
+ response=JSON.parse(xmlhttp.responseText);
33
+ sw.refreshViaProvider();
34
+ } else {
35
+ console.log('Err HTTP POST query to url ' + url + ' returned ' + xmlhttp.status);
36
+ }
37
+ }
38
+ }
39
+
40
+ xmlhttp.open("POST", url, true /*isAsync*/);
41
+ xmlhttp.setRequestHeader( "Content-type", "application/x-www-form-urlencoded");
42
+ xmlhttp.send("regId=" + regid + '&host=' + hosturi + '&email=' + email);
43
+ return response;
44
+ }
45
+
46
+ function tryAuth() {
47
+ var sw = window._swat;
48
+ if(!sw) {
49
+ console.log('sw not initialized!');
50
+ return;
51
+ }
52
+
53
+ if(!isSwymAuthn()) {
54
+ _authenticateLoggedInUser();
55
+ }
56
+ }
57
+
58
+ function getWishlistElements(content)
59
+ {
60
+
61
+ var wishlistProducts=new Object();
62
+ for(var index in content)
63
+ {
64
+ if(typeof content[index]=='object')
65
+ {
66
+ if(typeof content[index]['et']!='undefined')
67
+ {
68
+ if(typeof content[index]['epi']!='undefined' && content[index]['epi']!=null)
69
+ {
70
+ if(content[index]['et']==4) {
71
+ wishlistProducts[content[index]['epi']]=content[index]['epi'];
72
+ }
73
+
74
+ }
75
+
76
+ }
77
+
78
+ }
79
+ }
80
+
81
+ return wishlistProducts;
82
+ }
83
+ /*******Inject wishlist links*******/
84
+ function injectWishlistLinks()
85
+ {
86
+
87
+ if(wishlistStatus=='1'){
88
+
89
+ $wishlistElements=new Object;
90
+ window._swat.fetch(
91
+ function(r) {
92
+
93
+ $wishlistElements=getWishlistElements(r);
94
+ $linkContainers=document.getElementsByClassName('add-to-links');
95
+
96
+ for(var index in $linkContainers)
97
+ {
98
+
99
+ if(typeof $linkContainers[index]=='object')
100
+ {
101
+
102
+ $li=findParentElement($linkContainers[index],'LI');
103
+ if($li==null)
104
+ {
105
+
106
+ $form=findParentElement($linkContainers[index],'FORM');
107
+ if($form==null)
108
+ continue;
109
+ productId=$form.getElementsByClassName('wishlist-content-id')[0].value;
110
+ }
111
+ else
112
+ {
113
+ if($li.getElementsByClassName('wishlist-content-id')[0]!=null)
114
+ {
115
+ productId=$li.getElementsByClassName('wishlist-content-id')[0].value;
116
+ }
117
+ else
118
+ {
119
+ continue;
120
+ }
121
+ }
122
+
123
+ $wishlistElement=createWishlistElement(productId,$wishlistElements)
124
+ $linkContainers[index].appendChild($wishlistElement);
125
+ }
126
+
127
+ }
128
+ }
129
+ );
130
+
131
+ }
132
+
133
+ }
134
+ /*********Function for creating wishlist links ************/
135
+ function createWishlistElement(product,wishlistElements){
136
+
137
+ var li=createElement('li','','','');
138
+ var anchor=createElement('a','link-wishlist','','');
139
+ anchor.innerHTML=wishlistTitle;
140
+ anchor.href='javascript:void(0);';
141
+ anchor.setAttribute('product',product);
142
+ if(typeof wishlistElements[product]!='undefined')
143
+ {
144
+ anchor.className='link-wishlist disabled';
145
+
146
+ }
147
+ else
148
+ {
149
+
150
+ anchor.onclick=function(){
151
+
152
+ window._swat.addToWishList({ 'du' : sQuery('#wishlist-content-url-'+product).value,
153
+ 'dt' : sQuery('#wishlist-content-name-'+product).value,
154
+ 'pr' :sQuery('#wishlist-content-price-'+product).value,
155
+ 'op' :sQuery('#wishlist-content-price-'+product).value,
156
+ 'qty' : '1',
157
+ 'epi' : sQuery('#wishlist-content-id-'+product).value,
158
+ 'iu' :sQuery('#wishlist-content-image-'+product).value,
159
+
160
+ },
161
+ function(r) { console.log('add to wish done'); },
162
+ {});
163
+ this.className=this.className+' disabled';
164
+ this.onclick=function(){};
165
+
166
+ };
167
+ }
168
+ li.appendChild(anchor);
169
+ return li;
170
+ }
171
+ /**********function for creating element*************/
172
+ function createElement(ele,clas,id,text)
173
+ {
174
+ var element=document.createElement(ele);
175
+ element.className=clas;
176
+ if(id!='')
177
+ {
178
+ element.id=id;
179
+ }
180
+ if(text!='')
181
+ {
182
+ var t = document.createTextNode(text);
183
+ element.appendChild(t);
184
+ }
185
+ return element;
186
+ }
187
+ function findParentElement(elem,tag){
188
+ var parent = elem.parentNode;
189
+ if(parent && parent.tagName != tag){
190
+ parent = findParentElement(parent,tag);
191
+ }
192
+ return parent;
193
+ }
194
+ Event.observe(window, 'load', injectWishlistLinks);
195
+
196
+
197
+ } catch(e) {
198
+ console.log(e.message);
199
+ }
package.xml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Swym_Relay</name>
4
+ <version>1.9.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://swym.it/tos">Swym License</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Swym Relay helps retail brands enable a seamless shopping experience for their mobile customers </summary>
10
+ <description>E-commerce shopping experiences are now journeys. Your shoppers are traversing devices, sessions and channels constantly. And because they only log in about 10% of the time, their shopping activity rarely follows them. With Swym Relay, you can now help your customers keep track of their activity as they shop your website on any device. Swym provides a powerful shopping tool as part of your site that is always on, is in their control, and seamlessly available on every device.&#xD;
11
+ </description>
12
+ <notes>To install and configure the Swym Relay extension, please follow these steps:&#xD;
13
+ 1. Log into the Admin module and install the Swym Relay extension package via Magento Connect -&gt; Magento Connect Manager.&#xD;
14
+ 2. Once the extension is installed, go to the Admin module and choose System -&gt; Config. You should see a new section titled "SWYM" with "Swym Relay" under it.&#xD;
15
+ 3. If you get a 404 or Access denied error here, you'll need to log out of the Admin module and log back in&#xD;
16
+ 4. Please specify the config information for Swym Relay on this screen:&#xD;
17
+ a. Enable - Choose yes, this will basically enable the Swym Relay tracker on your site&#xD;
18
+ b. Display UI - Choosing Yes will cause Swym Relay UI to start showing up on your site. When we deploy in production, we will likely enable Swym Relay first and let the data gather for a week or two, and then turn on the UI (just so users have content showing up in their Relay)&#xD;
19
+ c. Retailer Id - This will be an ID we provide that is unique for you.&#xD;
20
+ d. PEM key - This will be a unique public key that is assigned to your account and will ensure the security of your calls. We will provide this key as well when you sign up for the service.&#xD;
21
+ d. Title - This is an optional title you could choose to brand the Relay for your site. Please choose a name for the Relay UI module that aligns with your brand positioning. Note that the name will default to Notepad if nothing is specified.&#xD;
22
+ e. Color - This is an optional hex code for the color you'd like for the Relay (example: #616161)&#xD;
23
+ f. Icon - This is an optional image (40x40px) you want to use for the Swym Relay on your site, again to comply with your branding needs. If you leave this empty, we will use our default icon&#xD;
24
+ g. Enable Swym Favorites - This provides an option to enable the Swym Relay wishlist on your site.&#xD;
25
+ h. Favorites Label - If you choose to replace the default wishlist with the Swym Relay wishlist, this is an option to label the wishlist to comply with your brand guidelines </notes>
26
+ <authors><author><name>Swym Corporation</name><user>swymadmin</user><email>admin@swymcorp.com</email></author></authors>
27
+ <date>2015-04-07</date>
28
+ <time>03:50:49</time>
29
+ <contents><target name="magelocal"><dir><dir name="Swym"><dir name="Notepad"><dir name="controllers"><file name="IndexController.php" hash="99208300e341d32a71db129d3cdb28aa"/></dir><dir name="etc"><file name="adminhtml.xml" hash="c5ef8ae8bc655ac5d1c06a6e9caf0406"/><file name="config.xml" hash="9c3a32631b4b4f11e073f1f7fc6d0fd9"/><file name="system.xml" hash="23ffdbdff906ba6dbf67f5dfa91fa92e"/></dir><dir name="Helper"><file name="Data.php" hash="c0dde7277a4e9879b29d40ea98036d14"/></dir><dir name="Model"><file name="Observer.php" hash="566d0fd78ef416093bda4ea7d0223ce3"/><dir name="System"><file name="Wishlist.php" hash="5f6853f8a0dea2f891f29d123e5335b2"/></dir></dir><dir name="sql"><dir name="notepad_setup"><file name="install-0.1.0.php" hash="08fc0c5c88dd43836340bf14a06dcfb4"/></dir></dir><dir name="Block"><dir name="Product"><file name="Price.php" hash="837798bc95ef9654519e0026c46eeb91"/></dir><file name="Notepad.php" hash="93cedf920d72cc4a0adb9076d71dd599"/></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="notepad"><file name="main_notepad.phtml" hash="57bff35d235b3ef06e0f2727770c97f9"/><file name="notepad.phtml" hash="83186e01d99989211f3e1f7d98149b74"/><file name="swymcall.phtml" hash="64ac05e2ebb1483608122f186d762ac9"/></dir></dir><dir name="layout"><file name="notepad.xml" hash="52fd18f3d4fe2a7ef301d8ec9c2222a7"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="notepad"><file name="swymcall.phtml" hash="f8b73f02bd37df4de75c714afbadcc01"/></dir></dir><dir name="layout"><file name="notepad.xml" hash="a8530ca6a88186eb7788e8d8e5cce18e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Swym_Notepad.xml" hash="5de597d1f75f666df3914f9796e62c48"/></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="notepad"><dir name="css"><file name="styles.css" hash="640fcd6c96cfd8169bf137ebc7eacca5"/></dir><dir name="images"><file name="swym-device-sprite.png" hash="39eef03c7abe4a6b41df9d1b87704a6f"/><file name="swym-icon-sprite.png" hash="d33274d51005d1eee90bcad794085e9e"/><file name="swym-welcome.jpg" hash="f0971aec0ebd296843862b6131021698"/></dir></dir></dir></dir></dir></dir></target><target name="mageweb"><dir><dir name="js"><dir name="notepad"><file name="swymex.js" hash="4a332450d0507252aaef4a96eb6c1a77"/></dir></dir></dir></target></contents>
30
+ <compatible/>
31
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
32
+ </package>
skin/frontend/base/default/notepad/css/styles.css ADDED
@@ -0,0 +1 @@
 
1
+ .swym-no-scroll{overflow:hidden}.swym-icon-sprite{background:url("../images/swym-icon-sprite.png") no-repeat 0 0 transparent;background-size:40px 370px}#swym-plugin{font-family:"Raleway",Verdana,Arial,sans-serif;font-size:14px;line-height:1.5em;color:#333;line-height:1;z-index:8000}#swym-plugin div,#swym-plugin span,#swym-plugin h1,#swym-plugin h2,#swym-plugin h3,#swym-plugin h4,#swym-plugin h5,#swym-plugin h6,#swym-plugin p,#swym-plugin a,#swym-plugin address,#swym-plugin em,#swym-plugin img,#swym-plugin strong,#swym-plugin b,#swym-plugin u,#swym-plugin i,#swym-plugin center,#swym-plugin dl,#swym-plugin dt,#swym-plugin dd,#swym-plugin ol,#swym-plugin ul,#swym-plugin li,#swym-plugin fieldset,#swym-plugin form,#swym-plugin label,#swym-plugin legend,#swym-plugin table,#swym-plugin tbody,#swym-plugin tfoot,#swym-plugin thead,#swym-plugin tr,#swym-plugin th,#swym-plugin td{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}#swym-plugin ol,#swym-plugin ul{list-style:none}#swym-plugin table{border-collapse:collapse;border-spacing:0}#swym-plugin a{color:#666}#swym-plugin a.disabled{cursor:not-allowed;opacity:0.6}#swym-plugin.show-modal #swym-modal{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0);opacity:1;visibility:visible}#swym-plugin.show-modal #swym-overlay{opacity:1;visibility:visible}#swym-plugin.show-notification #swym-notification{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0);opacity:1;visibility:visible}#swym-plugin.show-notification #swym-notification .swym-powered-by{-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px);opacity:1}#swym-plugin #swym-overlay{position:fixed;width:100%;height:100%;visibility:hidden;top:0;left:0;z-index:1001;opacity:0;background:rgba(0,0,0,0.6);-webkit-transition:all 0.3s;-moz-transition:all 0.3s;-ms-transition:all 0.3s;-o-transition:all 0.3s;transition:all 0.3s}#swym-plugin #swym-anchor{position:fixed;right:0px;bottom:50%;margin-top:-15px;opacity:0.7;z-index:100;-webkit-transition:all 0.3s;-moz-transition:all 0.3s;-ms-transition:all 0.3s;-o-transition:all 0.3s;transition:all 0.3s}#swym-plugin #swym-anchor a{display:block;padding:0 15px 0 36px;height:30px;display:block;background:#666;color:#fff;line-height:30px;text-align:center;font-size:12px;text-transform:uppercase;text-decoration:none;box-shadow:0 0 25px rgba(0,0,0,0.2)}#swym-plugin #swym-anchor i{display:block;position:absolute;width:20px;height:20px;left:8px;top:50%;margin-top:-10px;background-position:0 -320px}#swym-plugin #swym-anchor:hover{opacity:1}#swym-plugin #swym-modal{background:#fff;position:fixed;top:20px;bottom:20px;left:50%;margin-left:-375px;width:750px;min-width:290px;z-index:8012;box-shadow:0 0 25px rgba(0,0,0,0.2);visibility:hidden;backface-visibility:hidden;opacity:0;-webkit-transform:translateY(10%);-moz-transform:translateY(10%);-ms-transform:translateY(10%);-o-transform:translateY(10%);transform:translateY(10%);-webkit-transition:all 0.3s;-moz-transition:all 0.3s;-ms-transition:all 0.3s;-o-transition:all 0.3s;transition:all 0.3s}#swym-plugin #swym-modal p{margin-bottom:10px;line-height:1.4em}#swym-plugin #swym-modal input.swym-input{margin:0;border:none;font:inherit;background:#fff;width:100%;line-height:30px;height:30px;padding:0 15px;color:#999999;font-size:12px;border:1px solid #ddd}#swym-plugin #swym-modal input.swym-input:focus{outline:0}#swym-plugin #swym-modal input.swym-input::-webkit-input-placeholder,#swym-plugin #swym-modal input.swym-input:-moz-placeholder,#swym-plugin #swym-modal input.swym-input::-moz-placeholder,#swym-plugin #swym-modal input.swym-input:-ms-input-placeholder{color:#999999;font-style:italic}#swym-plugin #swym-modal button.swym-button{margin:0;border:none;font:inherit;line-height:normal;height:30px;display:block;background-color:#666;color:#fff;padding:0 35px;text-transform:uppercase;font-size:12px;text-align:center;overflow:hidden}#swym-plugin #swym-modal button.swym-button.loader{-webkit-transition:color 0.2s ease-in-out,padding 0.2s ease-in-out;-moz-transition:color 0.2s ease-in-out,padding 0.2s ease-in-out;-ms-transition:color 0.2s ease-in-out,padding 0.2s ease-in-out;-o-transition:color 0.2s ease-in-out,padding 0.2s ease-in-out;transition:color 0.2s ease-in-out,padding 0.2s ease-in-out}#swym-plugin #swym-modal button.swym-button.loader:before{display:block;position:absolute;left:50%;top:-50%;margin-top:-8px;margin-left:-8px;z-index:10;content:'';overflow:hidden;width:16px;height:16px;border:4px solid #fff;border-right-color:transparent;border-radius:16px;opacity:0;-webkit-transition:top 0.2s ease-in-out,opacity 0.2s ease-in-out;-moz-transition:top 0.2s ease-in-out,opacity 0.2s ease-in-out;-ms-transition:top 0.2s ease-in-out,opacity 0.2s ease-in-out;-o-transition:top 0.2s ease-in-out,opacity 0.2s ease-in-out;transition:top 0.2s ease-in-out,opacity 0.2s ease-in-out}#swym-plugin #swym-modal button.swym-button.loader.loading{color:transparent;cursor:wait;padding-top:30px}#swym-plugin #swym-modal button.swym-button.loader.loading:before{top:50%;opacity:1;-webkit-animation:loading-spinner 1250ms infinite linear}#swym-plugin #swym-modal.show-welcome #swym-welcome-container{display:block}#swym-plugin #swym-modal.show-welcome #swym-toolbar-top{display:none}#swym-plugin #swym-modal.show-welcome #swym-items-container{display:none}#swym-plugin #swym-modal.show-settings .swym-toolbar-top .swym-actions li.swym-settings{display:none}#swym-plugin #swym-modal.show-settings .swym-toolbar-top .swym-actions li.swym-arrow-left{display:block}#swym-plugin #swym-modal.show-settings #swym-settings-container{display:block}#swym-plugin #swym-modal.show-settings #swym-items-container{display:none}#swym-plugin #swym-modal.show-search .swym-toolbar-top .swym-actions li.swym-settings{display:none}#swym-plugin #swym-modal.show-search .swym-toolbar-top .swym-actions li.swym-arrow-left{display:block}#swym-plugin #swym-modal .swym-modal-header{background-color:#666;height:70px;color:#fff;padding:15px 80px 15px 25px;position:relative}#swym-plugin #swym-modal .swym-modal-header .swym-title{display:block;font-size:20px;margin-bottom:8px}#swym-plugin #swym-modal .swym-modal-header .swym-tag{display:block;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#swym-plugin #swym-modal .swym-modal-header .swym-close{position:absolute;height:30px;width:30px;right:25px;top:50%;text-indent:-9999px;margin-top:-15px}#swym-plugin #swym-modal .swym-modal-header .swym-close i{display:block;position:absolute;width:30px;height:30px;left:50%;top:50%;margin-top:-15px;margin-left:-15px;background-position:0 -340px}#swym-plugin #swym-modal .swym-toolbar-top{position:relative}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions{height:50px;background:#f4f4f4;padding:10px 20px;border-bottom:1px solid #cccccc}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions li{float:left}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions li.swym-settings i{background-position:0 -60px}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions li.swym-refresh i{background-position:0 -160px}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions li.swym-arrow-left{display:none}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions li.swym-arrow-left i{background-position:0 -120px}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions li.swym-help i{background-position:0 -100px}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions li.swym-user i{background-position:0 -80px}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions li.swym-search{display:none}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions li.swym-search i{background-position:0 -40px}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions .swym-separator{background:#999999;height:20px;width:1px;display:block;margin:5px 5px}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions a{display:block;padding:0 0 0 30px;position:relative;line-height:30px;height:30px;color:#4d4d4d;font-size:13px}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions a span{padding-left:4px}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions i{display:block;position:absolute;width:20px;height:20px;margin-top:-10px;left:5px;top:50%}#swym-plugin #swym-modal .swym-toolbar-top .swym-search-container{position:absolute;width:40%;right:25px;top:10px}#swym-plugin #swym-modal .swym-toolbar-top .swym-search-container input.swym-input{padding:0 45px 0 15px}#swym-plugin #swym-modal .swym-toolbar-top .swym-search-container button{background:transparent;margin:0;padding:0;border:none;font:inherit;line-height:normal;text-indent:-9999px;width:30px;height:30px;display:block;position:absolute;top:0;right:0}#swym-plugin #swym-modal .swym-toolbar-top .swym-search-container button i{display:block;position:absolute;width:20px;height:20px;margin-top:-10px;left:5px;top:50%;background-position:0 -40px}#swym-plugin #swym-modal .swym-modal-content{position:relative;background:#fff;height:700px;overflow-y:scroll}#swym-plugin #swym-modal .swym-modal-content::-webkit-scrollbar-track{background-color:#F5F5F5;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.3)}#swym-plugin #swym-modal .swym-modal-content::-webkit-scrollbar{width:8px;background-color:#F5F5F5}#swym-plugin #swym-modal .swym-modal-content::-webkit-scrollbar-thumb{background-color:#555}#swym-plugin #swym-modal .swym-settings-container{display:none;padding:30px}#swym-plugin #swym-modal .swym-settings-container .swym-heading{display:block;font-weight:bold;font-size:18px;color:#4d4d4d;margin-bottom:10px}#swym-plugin #swym-modal .swym-settings-container .swym-auth{border:1px solid #ccc;background-color:#f4f4f4;padding:20px;margin-bottom:20px;margin-top:20px;position:relative;max-width:450px}#swym-plugin #swym-modal .swym-settings-container .swym-auth:before,#swym-plugin #swym-modal .swym-settings-container .swym-auth:after{bottom:100%;border:solid transparent;content:'';height:0;width:0;position:absolute;pointer-events:none;left:50px;z-index:101}#swym-plugin #swym-modal .swym-settings-container .swym-auth:before{border-bottom-color:#ccc;border-width:10px;top:-20px}#swym-plugin #swym-modal .swym-settings-container .swym-auth:after{border-bottom-color:#f4f4f4;border-width:10px;top:-19px}#swym-plugin #swym-modal .swym-settings-container .swym-auth form{padding-right:130px;position:relative}#swym-plugin #swym-modal .swym-settings-container .swym-auth input.swym-input{border-right-width:0}#swym-plugin #swym-modal .swym-settings-container .swym-auth button.swym-button{position:absolute;top:0;right:0;width:130px}#swym-plugin #swym-modal .swym-welcome-container{display:none;text-align:center;padding:20px 20px 0}#swym-plugin #swym-modal .swym-welcome-container strong{font-size:20px;color:#666;display:block;margin-bottom:20px;line-height:1.4em}#swym-plugin #swym-modal .swym-welcome-container p{max-width:500px;margin:0 auto}#swym-plugin #swym-modal .swym-welcome-container button.swym-button{margin:30px auto}#swym-plugin #swym-modal .swym-device-grid{margin-bottom:20px;*zoom:1}#swym-plugin #swym-modal .swym-device-grid:before,#swym-plugin #swym-modal .swym-device-grid:after{display:table;content:"";line-height:0}#swym-plugin #swym-modal .swym-device-grid:after{clear:both}#swym-plugin #swym-modal .swym-device-grid .swym-device{width:170px;height:125px;float:left;text-align:center}#swym-plugin #swym-modal .swym-device-grid .swym-device.current .swym-image i{background-color:#666}#swym-plugin #swym-modal .swym-device-grid .swym-inner{padding:10px}#swym-plugin #swym-modal .swym-device-grid .swym-image{margin-bottom:10px;position:relative}#swym-plugin #swym-modal .swym-device-grid .swym-image i{display:block;margin:0 auto;width:64px;height:64px;background:url("../images/swym-device-sprite.png") no-repeat 0 0 #999;background-size:64px 192px}#swym-plugin #swym-modal .swym-device-grid .swym-image i.mobile{background-position:0 0}#swym-plugin #swym-modal .swym-device-grid .swym-image i.tablet{background-position:0 -64px}#swym-plugin #swym-modal .swym-device-grid .swym-image i.desktop{background-position:0 -128px}#swym-plugin #swym-modal .swym-device-grid .swym-title{color:#666;font-size:14px;line-height:16px;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#swym-plugin #swym-modal .swym-device-grid .swym-last-accessed{color:#4d4d4d;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#swym-plugin #swym-modal .swym-item-grid{padding-top:25px;width:720px;margin:0 auto;*zoom:1}#swym-plugin #swym-modal .swym-item-grid:before,#swym-plugin #swym-modal .swym-item-grid:after{display:table;content:"";line-height:0}#swym-plugin #swym-modal .swym-item-grid:after{clear:both}#swym-plugin #swym-modal .swym-item-grid .swym-item{width:160px;height:224px;margin:0 10px 15px;float:left;position:relative}#swym-plugin #swym-modal .swym-item-grid .swym-image{border:1px solid #999999;height:160px;width:160px;overflow:hidden;margin-bottom:10px;position:relative}#swym-plugin #swym-modal .swym-item-grid .swym-image a{display:block}#swym-plugin #swym-modal .swym-item-grid .swym-image img{max-width:100%}#swym-plugin #swym-modal .swym-item-grid .swym-actions i{display:block;position:absolute;width:20px;height:20px;margin-left:-10px;margin-top:-10px;left:50%;top:50%}#swym-plugin #swym-modal .swym-item-grid .swym-actions a{display:block;width:40px;height:40px;position:absolute;z-index:5;top:0;text-indent:-9999px}#swym-plugin #swym-modal .swym-item-grid .swym-actions a.swym-wishlist{left:0px;top:0px}#swym-plugin #swym-modal .swym-item-grid .swym-actions a.swym-wishlist i{background-position:-20px -20px}#swym-plugin #swym-modal .swym-item-grid .swym-actions a.swym-remove{right:-20px;top:-20px}#swym-plugin #swym-modal .swym-item-grid .swym-actions a.swym-remove i{background-position:0 0}#swym-plugin #swym-modal .swym-item-grid .swym-viewed-icon{color:#fff;display:block;background-color:#666;background:rgba(255,255,255,0);padding:0 8px 0 36px;position:absolute;height:30px;line-height:30px;left:0;right:0;bottom:0}#swym-plugin #swym-modal .swym-item-grid .swym-viewed-icon>*{position:relative;z-index:1}#swym-plugin #swym-modal .swym-item-grid .swym-viewed-icon i{display:block;position:absolute;width:20px;height:20px;margin-top:-10px;left:8px;top:50%;background-position:0 -180px}#swym-plugin #swym-modal .swym-item-grid .swym-viewed-icon.mobile i{background-position:0 -180px}#swym-plugin #swym-modal .swym-item-grid .swym-viewed-icon.tablet i{background-position:0 -200px}#swym-plugin #swym-modal .swym-item-grid .swym-viewed-icon.desktop i{background-position:0 -220px}#swym-plugin #swym-modal .swym-item-grid .swym-viewed-icon .swym-background{position:absolute;top:0;bottom:0;left:0;right:0;background:#666;opacity:0.9;z-index:0}#swym-plugin #swym-modal .swym-item-grid .swym-viewed-label{display:none}#swym-plugin #swym-modal .swym-item-grid .swym-information{padding-right:30px;position:relative}#swym-plugin #swym-modal .swym-item-grid .swym-title{color:#636363;max-height:32px;overflow:hidden;font-size:13px;line-height:16px;margin-bottom:4px}#swym-plugin #swym-modal .swym-item-grid .swym-title a{color:#999}#swym-plugin #swym-modal .swym-item-grid .swym-price{color:#666;font-size:14px;line-height:16px}#swym-plugin #swym-modal .swym-item-grid .swym-price .swym-old{color:#999;font-size:11px;text-decoration:line-through}#swym-plugin #swym-modal .swym-item-grid .swym-add-to-cart{position:absolute;top:0;right:0;display:block;text-indent:-9999px;padding:10px 0;width:24px;height:20px}#swym-plugin #swym-modal .swym-item-grid .swym-add-to-cart i{display:block;position:absolute;width:24px;height:20px;background-position:0 -140px}#swym-plugin #swym-notification{background:#fff;position:fixed;bottom:20px;right:0;width:300px;min-width:300px;z-index:8014;box-shadow:0 0 25px rgba(0,0,0,0.2);visibility:hidden;backface-visibility:hidden;-webkit-transform:translateX(320px);-moz-transform:translateX(320px);-ms-transform:translateX(320px);-o-transform:translateX(320px);transform:translateX(320px);-webkit-transition:all 0.3s;-moz-transition:all 0.3s;-ms-transition:all 0.3s;-o-transition:all 0.3s;transition:all 0.3s}#swym-plugin #swym-notification .swym-notification-header{background-color:#666;height:40px;color:#fff;position:relative;cursor:pointer}#swym-plugin #swym-notification .swym-notification-header .swym-icon{display:block;position:absolute;width:20px;height:20px;left:10px;top:50%;margin-top:-10px;background-position:0 -280px}#swym-plugin #swym-notification .swym-notification-header .swym-icon.swym-cart{background-position:0 -300px}#swym-plugin #swym-notification .swym-notification-header .swym-icon.swym-sale{background-position:0 -240px}#swym-plugin #swym-notification .swym-notification-header .swym-icon.swym-viewed{background-position:0 -260px}#swym-plugin #swym-notification .swym-notification-header .swym-icon.swym-info{background-position:0 -280px}#swym-plugin #swym-notification .swym-notification-header .swym-title{display:block;font-size:12px;line-height:1.2em;padding:6px 40px 6px 40px;z-index:1;position:relative}#swym-plugin #swym-notification .swym-notification-header .swym-close{position:absolute;height:40px;width:40px;right:0px;top:50%;margin-top:-20px;z-index:2;text-indent:-9999px}#swym-plugin #swym-notification .swym-notification-header .swym-close i{display:block;position:absolute;width:20px;height:20px;left:50%;top:50%;margin-top:-10px;margin-left:-10px;background-position:-20px 0}#swym-plugin #swym-notification .swym-item{font-size:14px;padding:10px}#swym-plugin #swym-notification .swym-item:hover .swym-title{color:#4d4d4f}#swym-plugin #swym-notification .swym-item:hover .swym-title a{color:#4d4d4f}#swym-plugin #swym-notification .swym-item:hover .swym-actions a{top:0}#swym-plugin #swym-notification .swym-item:hover .swym-viewed-icon{bottom:0}#swym-plugin #swym-notification .swym-item .swym-inner{margin-left:80px}#swym-plugin #swym-notification .swym-item .swym-image{border:1px solid #999999;height:70px;width:70px;overflow:hidden;float:left;margin-left:-80px}#swym-plugin #swym-notification .swym-item .swym-image a{display:block}#swym-plugin #swym-notification .swym-item .swym-image img{max-width:100%}#swym-plugin #swym-notification .swym-item .swym-information{min-height:70px}#swym-plugin #swym-notification .swym-item .swym-title{letter-spacing:0.08em;color:#666;display:block;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#swym-plugin #swym-notification .swym-item .swym-title a{color:#666}#swym-plugin #swym-notification .swym-item .swym-price{color:#666}#swym-plugin #swym-notification .swym-item .swym-price .swym-old{color:#999;font-size:11px;text-decoration:line-through}#swym-plugin #swym-notification .swym-item .swym-view-history{font-size:12px;position:absolute;right:10px;bottom:10px;display:block;z-index:1}#swym-plugin #swym-notification .swym-powered-by{font-size:9px;padding:0 0 10px 10px;color:#a6a8ab;opacity:0;-webkit-transform:translateY(10px);-moz-transform:translateY(10px);-ms-transform:translateY(10px);-o-transform:translateY(10px);transform:translateY(10px);-webkit-transition:all 0.3s 0.3s;-moz-transition:all 0.3s 0.3s;-ms-transition:all 0.3s 0.3s;-o-transition:all 0.3s 0.3s;transition:all 0.3s 0.3s}@media all and (min-height: 700px){#swym-plugin #swym-modal{top:50%;margin-top:-325px;height:650px;bottom:auto}#swym-plugin #swym-modal .swym-welcome-container{padding:175px 20px 0}#swym-plugin #swym-modal .swym-welcome-container:before,#swym-plugin #swym-modal .swym-welcome-container:after{display:block;content:'';position:absolute;left:0;height:100px;right:0;background:url("../images/swym-welcome.jpg");z-index:2}#swym-plugin #swym-modal .swym-welcome-container:before{top:0;background-position:50% 0}#swym-plugin #swym-modal .swym-welcome-container:after{bottom:0;background-position:50% -100%}}@media all and (max-width: 820px){#swym-plugin #swym-modal{margin-left:-290px;width:580px}#swym-plugin #swym-modal .swym-toolbar-top .swym-search-container{width:200px}#swym-plugin #swym-modal .swym-item-grid{width:540px}}@media all and (min-width: 651px){#swym-plugin.swym-no-touch #swym-modal .swym-item-grid .swym-item:hover .swym-actions a.swym-remove{top:-20px;opacity:1}#swym-plugin.swym-no-touch #swym-modal .swym-item-grid .swym-item:hover .swym-viewed-icon{bottom:0}#swym-plugin.swym-no-touch #swym-modal .swym-item-grid .swym-viewed-icon{bottom:-30px;-webkit-transition:bottom 0.2s cubic-bezier(0.55, 0, 0.1, 1);-moz-transition:bottom 0.2s cubic-bezier(0.55, 0, 0.1, 1);-ms-transition:bottom 0.2s cubic-bezier(0.55, 0, 0.1, 1);-o-transition:bottom 0.2s cubic-bezier(0.55, 0, 0.1, 1);transition:bottom 0.2s cubic-bezier(0.55, 0, 0.1, 1)}#swym-plugin.swym-no-touch #swym-modal .swym-item-grid .swym-actions a.swym-remove{top:-15px;opacity:0;-webkit-transition:all 0.2s cubic-bezier(0.55, 0, 0.1, 1);-moz-transition:all 0.2s cubic-bezier(0.55, 0, 0.1, 1);-ms-transition:all 0.2s cubic-bezier(0.55, 0, 0.1, 1);-o-transition:all 0.2s cubic-bezier(0.55, 0, 0.1, 1);transition:all 0.2s cubic-bezier(0.55, 0, 0.1, 1)}}@media all and (max-width: 650px){#swym-plugin.show #swym-modal{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}#swym-plugin #swym-modal{margin-left:0;width:auto;margin-top:0;left:0px;right:0px;top:0px;bottom:0px;height:auto;opacity:1;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}#swym-plugin #swym-modal .swym-modal-header{height:50px;padding-left:15px}#swym-plugin #swym-modal .swym-modal-header .swym-title{margin-bottom:0}#swym-plugin #swym-modal .swym-modal-header .swym-tag{display:none}#swym-plugin #swym-modal .swym-modal-header .swym-close{right:15px}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions{padding:10px 10px;position:relative;z-index:11}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions li.swym-search{display:block;float:right}#swym-plugin #swym-modal .swym-toolbar-top .swym-search-container{width:auto;top:0;left:0;right:0;height:50px;background:#f4f4f4;padding:10px 15px;border-bottom:1px solid #cccccc;z-index:10;-webkit-transition:top 0.2s cubic-bezier(0.55, 0, 0.1, 1);-moz-transition:top 0.2s cubic-bezier(0.55, 0, 0.1, 1);-ms-transition:top 0.2s cubic-bezier(0.55, 0, 0.1, 1);-o-transition:top 0.2s cubic-bezier(0.55, 0, 0.1, 1);transition:top 0.2s cubic-bezier(0.55, 0, 0.1, 1)}#swym-plugin #swym-modal .swym-toolbar-top .swym-search-container form{position:relative}#swym-plugin #swym-modal .swym-toolbar-top .swym-search-container input.swym-input{padding-left:38px}#swym-plugin #swym-modal .swym-toolbar-top .swym-search-container button{right:auto;left:0;top:0}#swym-plugin #swym-modal .swym-toolbar-top .swym-search-container.active{top:100%}#swym-plugin #swym-modal .swym-settings-container{padding:20px}#swym-plugin #swym-modal .swym-settings-container .swym-auth{padding:10px;margin-bottom:20px;margin-top:20px;position:relative;max-width:450px}#swym-plugin #swym-modal .swym-settings-container .swym-auth form{padding-right:0;position:relative}#swym-plugin #swym-modal .swym-settings-container .swym-auth input.swym-input{border-right-width:1px}#swym-plugin #swym-modal .swym-settings-container .swym-auth button.swym-button{position:relative;margin-top:10px;width:100%}#swym-plugin #swym-modal .swym-welcome-container{padding-top:20px}#swym-plugin #swym-modal .swym-welcome-container:before,#swym-plugin #swym-modal .swym-welcome-container:after{display:none}#swym-plugin #swym-modal .swym-device-grid .swym-device{width:50%;text-align:left;height:80px}#swym-plugin #swym-modal .swym-device-grid .swym-inner{padding:5px 10px;margin-left:74px}#swym-plugin #swym-modal .swym-device-grid .swym-information{padding:16px 0px}#swym-plugin #swym-modal .swym-device-grid .swym-image{float:left;margin-left:-74px;margin-bottom:0;height:64px;width:64px}#swym-plugin #swym-modal .swym-item-grid{width:auto;padding:15px}#swym-plugin #swym-modal .swym-item-grid .swym-item{height:100px;width:50%;margin:0 0 15px 0;font-size:14px}#swym-plugin #swym-modal .swym-item-grid .swym-inner{margin-left:110px}#swym-plugin #swym-modal .swym-item-grid .swym-image{float:left;margin-left:-110px;margin-bottom:0;height:100px;width:100px}#swym-plugin #swym-modal .swym-item-grid .swym-actions a.swym-remove{top:-10px;right:0px;opacity:1}#swym-plugin #swym-modal .swym-item-grid .swym-viewed-icon{display:none}#swym-plugin #swym-modal .swym-item-grid .swym-viewed-label{display:block;color:#999999;font-size:12px}#swym-plugin #swym-modal .swym-item-grid .swym-information{min-height:100px;padding:0 0 24px}#swym-plugin #swym-modal .swym-item-grid .swym-title{padding-right:35px}#swym-plugin #swym-modal .swym-item-grid .swym-add-to-cart{position:absolute;top:auto;right:auto;bottom:0;left:0;text-indent:0;padding:0 0 0 30px;font-size:14px;line-height:20px;color:#999999;width:auto}#swym-plugin #swym-modal .swym-item-grid .swym-add-to-cart i{width:28px;height:20px;margin-top:-10px;top:50%;left:0}}@media all and (max-width: 570px){#swym-plugin #swym-anchor{right:10px;bottom:10px;opacity:1}#swym-plugin #swym-anchor a{width:40px;height:40px;display:block;text-indent:-9999px;padding-left:15px}#swym-plugin #swym-anchor i{left:50%;margin-left:-10px}#swym-plugin #swym-modal{left:0px;right:0px;top:0px;bottom:0px}#swym-plugin #swym-modal .swym-toolbar-top .swym-actions a{max-width:165px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#swym-plugin #swym-modal .swym-device-grid .swym-device{width:auto;float:none}#swym-plugin #swym-modal .swym-item-grid .swym-item{float:none;width:auto}#swym-plugin #swym-modal .swym-item-grid .swym-actions a.swym-remove{top:-10px;right:-10px}#swym-plugin #swym-notification{left:10px;right:10px;bottom:10px;width:auto}#swym-plugin #swym-notification .swym-notification-content{overflow:hidden;height:0;opacity:0;-webkit-transition:height 0.3s,opacity 0.3s 0.2s;-moz-transition:height 0.3s,opacity 0.3s 0.2s;-ms-transition:height 0.3s,opacity 0.3s 0.2s;-o-transition:height 0.3s,opacity 0.3s 0.2s;transition:height 0.3s,opacity 0.3s 0.2s}#swym-plugin #swym-notification.expanded .swym-notification-content{height:110px;opacity:1}}@-webkit-keyframes loading-spinner{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}
skin/frontend/base/default/notepad/images/swym-device-sprite.png ADDED
Binary file
skin/frontend/base/default/notepad/images/swym-icon-sprite.png ADDED
Binary file
skin/frontend/base/default/notepad/images/swym-welcome.jpg ADDED
Binary file