Multidots_Quickcart - Version 1.0.1

Version Notes

This extension allows you to skip checkout page and the customer can buy product quickly by quick cart button.

Download this release

Release Info

Developer Multidots
Extension Multidots_Quickcart
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/community/Multidots/Quickcart/Block/Quickcart.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Filename : Index Block.php
5
+ * Author : Multidots
6
+ * Date : 27/06/2016
7
+ */
8
+
9
+ class Multidots_Quickcart_Block_Quickcart extends Mage_Core_Block_Template {
10
+
11
+ }
app/code/community/Multidots/Quickcart/Helper/Data.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Filename : Data.php
5
+ * Author : Multidots
6
+ * Date : 27/06/2016
7
+ * */
8
+
9
+ class Multidots_Quickcart_Helper_Data extends Mage_Core_Helper_Abstract {
10
+
11
+ /**
12
+ * It check either extension enabled or not
13
+ * */
14
+ public function isEnable() {
15
+ return Mage::getStoreConfig('quickcartlist/general/boolean');
16
+ }
17
+
18
+ /**
19
+ * it get the redirect setting from admin configuration and work accordingly
20
+ * */
21
+ public function isRedirection() {
22
+ return Mage::getStoreConfig('quickcartlist/general/redirection');
23
+ }
24
+
25
+ /**
26
+ * it will return the button title of quick cart as per the admin set it from admin configuration
27
+ * */
28
+ public function getButtonTitle() {
29
+ $quick_cart_button_title = Mage::getStoreConfig('quickcartlist/general/button_name');
30
+ if(empty($quick_cart_button_title))
31
+ {
32
+ return 'Quick Cart';
33
+ }else{
34
+ return Mage::getStoreConfig('quickcartlist/general/button_name');
35
+ }
36
+ }
37
+
38
+ }
app/code/community/Multidots/Quickcart/controllers/IndexController.php ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /* * *
4
+ * Filename : IndexController.php
5
+ * $status : This variable is check the module is on/off.
6
+ * $pageRedirect : This variable is give offer to user want to redirct after click on buynow or not.
7
+ * $params : This variable get the all information about the product.
8
+ * $productUrl : This variable get is use to redirect on previous page when try become false.
9
+ * $cart : This varible define or initialize the cart and update the card.
10
+ * Author : Multidots
11
+ * Date : 27/06/2016
12
+ * ** */
13
+
14
+ class Multidots_Quickcart_IndexController extends Mage_Core_Controller_Front_Action {
15
+
16
+ /**
17
+ * load product object and return product information for further usag
18
+ * $productId : get product id as a param
19
+ */
20
+ protected function loadProduct($productId) {
21
+ if ($productId) {
22
+ $product = Mage::getModel('catalog/product')
23
+ ->setStoreId(Mage::app()->getStore()->getId())
24
+ ->load($productId);
25
+ if ($product->getId()) {
26
+ return $product;
27
+ }
28
+ }
29
+ return false;
30
+ }
31
+
32
+ /**
33
+ * It is return current checkout session.
34
+ *
35
+ */
36
+ protected function _getSession() {
37
+ return Mage::getSingleton('checkout/session');
38
+ }
39
+
40
+ /**
41
+ * Set back redirect url to response
42
+ *
43
+ * @return Mage_Checkout_CartController
44
+ * @throws Mage_Exception
45
+ */
46
+ protected function _goBack() {
47
+ $returnUrl = $this->getRequest()->getParam('return_url');
48
+ if ($returnUrl) {
49
+
50
+ if (!$this->_isUrlInternal($returnUrl)) {
51
+ throw new Mage_Exception('External urls redirect to "' . $returnUrl . '" denied!');
52
+ }
53
+
54
+ $this->_getSession()->getMessages(true);
55
+ $this->getResponse()->setRedirect($returnUrl);
56
+ } elseif (!Mage::getStoreConfig('checkout/cart/redirect_to_cart') && !$this->getRequest()->getParam('in_cart') && $backUrl = $this->_getRefererUrl()
57
+ ) {
58
+ $this->getResponse()->setRedirect($backUrl);
59
+ } else {
60
+ if (($this->getRequest()->getActionName() == 'add') && !$this->getRequest()->getParam('in_cart')) {
61
+ $this->_getSession()->setContinueShoppingUrl($this->_getRefererUrl());
62
+ }
63
+ $this->_redirect('checkout/cart');
64
+ }
65
+ return $this;
66
+ }
67
+
68
+ /**
69
+ * Add product in cart and redirect to checkout page
70
+ *
71
+ */
72
+ public function ProductAction() {
73
+ $status = Mage::helper('quickcart/data')->isEnable();
74
+ $pageRedirect = Mage::helper('quickcart/data')->isRedirection();
75
+ if ($status == 1) {
76
+ $params = $this->getRequest()->getParams();
77
+ if ($params) {
78
+ try {
79
+ $magentoVersion = Mage::getVersion();
80
+ if (version_compare($magentoVersion, '1.8', '>=')) {
81
+ if (!$this->_validateFormKey()) {
82
+ $this->_goBack();
83
+ return;
84
+ }
85
+ }
86
+ if (isset($params['qty'])) {
87
+ $filter = new Zend_Filter_LocalizedToNormalized(
88
+ array('locale' => Mage::app()->getLocale()->getLocaleCode())
89
+ );
90
+ $_params['qty'] = $filter->filter($params['qty']);
91
+ }
92
+ $product = $this->loadProduct($params['product']);
93
+ /**
94
+ * Check product availability
95
+ */
96
+ if (!$product) {
97
+ Mage::app()->getFrontController()->getResponse()->setRedirect($productUrl)->sendResponse();
98
+ return;
99
+ }
100
+ $productUrl = $product->getProductUrl();
101
+ $cart = Mage::getModel('checkout/cart')->init();
102
+
103
+ /**
104
+ * Add product in cart with custom options
105
+ */
106
+ $cart->addProduct($product, $params);
107
+ $cart->save();
108
+ $this->_getSession()->setCartWasUpdated(true);
109
+
110
+ Mage::dispatchEvent('checkout_cart_add_product_complete', array('product' => $product, 'request' => $this->getRequest(), 'response' => $this->getResponse())
111
+ );
112
+ if ($pageRedirect == 1) {
113
+ Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl('checkout/onepage'))->sendResponse();
114
+ } else {
115
+ Mage::app()->getFrontController()->getResponse()->setRedirect($productUrl)->sendResponse();
116
+ }
117
+ } catch (Mage_Core_Exception $e) {
118
+ if ($this->_getSession()->getUseNotice(true)) {
119
+ $this->_getSession()->addNotice(Mage::helper('core')->escapeHtml($e->getMessage()));
120
+ } else {
121
+ $messages = array_unique(explode("\n", $e->getMessage()));
122
+ foreach ($messages as $message) {
123
+ $this->_getSession()->addError(Mage::helper('core')->escapeHtml($message));
124
+ }
125
+ }
126
+ $url = $this->_getSession()->getRedirectUrl(true);
127
+ if ($url) {
128
+ $this->getResponse()->setRedirect($url);
129
+ } else {
130
+ $this->_redirectReferer(Mage::helper('checkout/cart')->getCartUrl());
131
+ }
132
+ } catch (Mage_Core_Exception $e) {
133
+ $this->_getSession()->addException($e, $this->__('Cannot add the item to shopping cart.'));
134
+ Mage::logException($e);
135
+ $this->_goBack();
136
+ }
137
+ }
138
+ }
139
+ }
140
+
141
+ protected function _isAllowed() {
142
+ return true;
143
+ }
144
+
145
+ }
app/code/community/Multidots/Quickcart/etc/adminhtml.xml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ * This structure define the new quickcart extension tab in admin configuration.
4
+ * Filename : AdminHtml.xml
5
+ * Author : Multidots
6
+ * Date : 27/06/2016
7
+ -->
8
+ <config>
9
+ <acl>
10
+ <resources>
11
+ <admin>
12
+ <children>
13
+ <system>
14
+ <children>
15
+ <config>
16
+ <children>
17
+ <quickcartlist>
18
+ <title>quick cart list</title> <!-- Used in resources tree -->
19
+ </quickcartlist>
20
+ </children>
21
+ </config>
22
+ </children>
23
+ </system>
24
+ </children>
25
+ </admin>
26
+ </resources>
27
+ </acl>
28
+ </config>
app/code/community/Multidots/Quickcart/etc/config.xml ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ * This file specify the paths of module.
4
+ * <modules> : This tag specify the module.
5
+ * <frontend> : This tag display the blog/file in a fronend side.
6
+ * <modules> : This tag specify the module.
7
+ * <modules> : This tag specify the module.
8
+ * <layout> : This tag specify the frontend design side quickcart.xml file.
9
+ * <translate> : This tag specify the language csv file path for langage transaltion using diferent store.
10
+ * <global> : This tag specift the path of bock and helper class.
11
+ * <default> : This tag specify the default value for the button title textbox.
12
+ * Filename : config.xml
13
+ * Author : Multidots
14
+ * Date : 27/06/2016
15
+ -->
16
+ <config>
17
+ <modules>
18
+ <Multidots_Quickcart>
19
+ <version>1.0.1</version>
20
+ </Multidots_Quickcart>
21
+ </modules>
22
+ <frontend>
23
+ <routers>
24
+ <quickcart>
25
+ <use>standard</use>
26
+ <args>
27
+ <module>Multidots_Quickcart</module>
28
+ <frontName>quickcart</frontName>
29
+ </args>
30
+ </quickcart>
31
+ </routers>
32
+ <layout>
33
+ <updates>
34
+ <quickcart>
35
+ <file>quickcart.xml</file>
36
+ </quickcart>
37
+ </updates>
38
+ </layout>
39
+ <translate>
40
+ <modules>
41
+ <quickcart>
42
+ <files>
43
+ <default>Multidots_Quickcart.csv</default>
44
+ </files>
45
+ </quickcart>
46
+ </modules>
47
+ </translate>
48
+ </frontend>
49
+ <global>
50
+ <helpers>
51
+ <quickcart>
52
+ <class>Multidots_Quickcart_Helper</class>
53
+ </quickcart>
54
+ </helpers>
55
+ <blocks>
56
+ <quickcart>
57
+ <class>Multidots_Quickcart_Block</class>
58
+ </quickcart>
59
+ </blocks>
60
+ </global>
61
+ <admin>
62
+ <routers>
63
+ <quickcart>
64
+ <use>admin</use>
65
+ <args>
66
+ <module>Multidots_Quickcart</module>
67
+ <frontName>admin_quickcart</frontName>
68
+ </args>
69
+ </quickcart>
70
+ </routers>
71
+ </admin>
72
+ <default>
73
+ <quickcart>
74
+ <general>
75
+ <text_field>Quickcart</text_field>
76
+ </general>
77
+ </quickcart>
78
+ </default>
79
+ </config>
app/code/community/Multidots/Quickcart/etc/system.xml ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ * <section> : this tag specify the particular section for perform an action.
4
+ * <groups> : this tag define the tabs for the sections like a general tab.
5
+ * Filename : system.xml
6
+ * Author : Multidots
7
+ * Date : 27/06/2016
8
+ -->
9
+ <config>
10
+ <tabs>
11
+ <myconf translate="label">
12
+ <label>Multidots</label>
13
+ <sort_order>1</sort_order>
14
+ </myconf>
15
+ </tabs>
16
+ <sections>
17
+ <quickcartlist translate="label" module="adminhtml">
18
+ <label>Quick Cart</label>
19
+ <tab>myconf</tab>
20
+ <sort_order>10</sort_order>
21
+ <show_in_default>1</show_in_default>
22
+ <show_in_website>1</show_in_website>
23
+ <show_in_store>1</show_in_store>
24
+ <groups>
25
+ <general translate="label comment">
26
+ <label>General</label>
27
+ <isenabled>1</isenabled>
28
+ <sort_order>50</sort_order>
29
+ <show_in_default>1</show_in_default>
30
+ <show_in_website>1</show_in_website>
31
+ <show_in_store>1</show_in_store>
32
+ <fields>
33
+ <boolean translate="label comment">
34
+ <label>Enable Button</label>
35
+ <comment>Select YES for enable module otherwise NO </comment>
36
+ <frontend_type>select</frontend_type>
37
+ <source_model>adminhtml/system_config_source_yesno</source_model>
38
+ <sort_order>61</sort_order>
39
+ <show_in_default>1</show_in_default>
40
+ <show_in_website>1</show_in_website>
41
+ <show_in_store>1</show_in_store>
42
+ </boolean>
43
+ <button_name translate="Button Name">
44
+ <label>Set Button Title</label>
45
+ <comment>Set button title here for disaply text</comment>
46
+ <frontend_type>text</frontend_type>
47
+ <sort_order>62</sort_order>
48
+ <show_in_default>1</show_in_default>
49
+ <show_in_website>1</show_in_website>
50
+ <show_in_store>1</show_in_store>
51
+ </button_name>
52
+ <redirection translate="Redirection Option">
53
+ <label>Set Redirection is</label>
54
+ <comment>Select Enable for redirect on checkout page otherwise Disable </comment>
55
+ <frontend_type>select</frontend_type>
56
+ <sort_order>63</sort_order>
57
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
58
+ <show_in_default>1</show_in_default>
59
+ <show_in_website>1</show_in_website>
60
+ <show_in_store>1</show_in_store>
61
+ </redirection>
62
+ </fields>
63
+ </general>
64
+ </groups>
65
+ </quickcartlist>
66
+ </sections>
67
+ </config>
app/design/frontend/base/default/layout/quickcart.xml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--
2
+ Author : Multidots
3
+ Date : 27/06/2016
4
+ FileName : quickcart.xml
5
+ Reference : Here this file reference two files
6
+ 1. template/quickcart.phtml for display button
7
+ 2. template/Quickcart/js.phtml for Js Support
8
+ -->
9
+ <?xml version="1.0"?>
10
+ <layout version="1.0.0">
11
+ <default>
12
+ <reference name="head">
13
+ <action method="addItem">
14
+ <type>skin_js</type>
15
+ <name>Multidots/Quickcart/msrp.js</name>
16
+ </action>
17
+ </reference>
18
+ </default>
19
+ <catalog_product_view>
20
+ <reference name="product.info.addtocart">
21
+ <block type="quickcart/quickcart" name="quickcart_quickcart" template="quickcart/quickcart.phtml"/>
22
+ </reference>
23
+ <reference name="before_body_end">
24
+ <block type="quickcart/quickcart" name="quickcart_quickcart" template="quickcart/js.phtml"/>
25
+ </reference>
26
+ </catalog_product_view>
27
+ </layout>
28
+
app/design/frontend/base/default/template/quickcart/js.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script type="text/javascript">
2
+ /***
3
+ * Filename : js.phtml
4
+ * Author : Multidots
5
+ * Date : 27/06/2016
6
+ * submitConfe : initilize the form action with this variable.
7
+ */
8
+ productAddToCartForm.submitConfe = function(button, url) {
9
+ if (this.validator.validate()) {
10
+ var form = this.form;
11
+ var oldUrl = form.action;
12
+
13
+ if (url) {
14
+ form.action = url;
15
+ }
16
+ var e = null;
17
+ try {
18
+ this.form.submit();
19
+ } catch (e) {
20
+ }
21
+ this.form.action = oldUrl;
22
+ if (e) {
23
+ throw e;
24
+ }
25
+
26
+ if (button && button != 'undefined') {
27
+ button.disabled = true;
28
+ }
29
+ }
30
+ }.bind(productAddToCartForm);
31
+ </script>
app/design/frontend/base/default/template/quickcart/quickcart.phtml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* * *
3
+ * $status - it is check the module is enable or not.
4
+ * $buttonTitle - This variable is get the button title from admin configuration.
5
+ * $product->getTypeId() - This variable is check the product type is simple or not.
6
+ * Filename : quickview.phtml
7
+ * Author : Multidots
8
+ * Date : 27/06/2016
9
+ */
10
+ ?>
11
+ <?php $status = Mage::helper('quickcart/data')->isEnable(); ?>
12
+ <?php $buttonTitle = Mage::helper('quickcart/data')->getButtonTitle(); ?>
13
+ <?php if ($status == true): ?>
14
+ <?php $product = Mage::registry('current_product'); ?>
15
+ <?php if ($product->getTypeId() == 'simple') : ?>
16
+ <button onclick="productAddToCartForm.submitConfe(this, '<?php echo $this->getUrl('quickcart/index/Product') ?>')" class="button btn-cart" title=" <?php echo $this->__($buttonTitle); ?>" type="button"><span><span> <?php echo $this->__($buttonTitle); ?></span></span></button>
17
+ <?php endif; ?>
18
+ <?php endif; ?>
app/etc/modules/Multidots_Quickcart.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Multidots_Quickcart>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <version>1.0.1</version>
8
+ </Multidots_Quickcart>
9
+ </modules>
10
+ </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Multidots_Quickcart</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="https://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>This extension allows you to skip checkout page and the customer can buy product quickly by quick cart button.</description>
11
  <notes>This extension allows you to skip checkout page and the customer can buy product quickly by quick cart button.</notes>
12
  <authors><author><name>Multidots</name><user>Multidots</user><email>magento@multidots.in</email></author></authors>
13
- <date>2016-07-26</date>
14
- <time>20:37:01</time>
15
- <contents></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Multidots_Quickcart</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="https://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
10
  <description>This extension allows you to skip checkout page and the customer can buy product quickly by quick cart button.</description>
11
  <notes>This extension allows you to skip checkout page and the customer can buy product quickly by quick cart button.</notes>
12
  <authors><author><name>Multidots</name><user>Multidots</user><email>magento@multidots.in</email></author></authors>
13
+ <date>2016-08-02</date>
14
+ <time>12:12:53</time>
15
+ <contents><target name="magecommunity"><dir name="Multidots"><dir name="Quickcart"><dir name="Block"><file name="Quickcart.php" hash="a7b7a8d49b5bb591b695c774bb880b36"/></dir><dir name="Helper"><file name="Data.php" hash="489b69b380c3fac4a474ded1169153e3"/></dir><dir name="controllers"><file name="IndexController.php" hash="1cf794f723db8215edd2744f0b88b59f"/></dir><dir name="etc"><file name="adminhtml.xml" hash="5b11d20dcc1decb67ab6957d41f21643"/><file name="config.xml" hash="14c6163d8c7728789ce629d9920e5cc5"/><file name="system.xml" hash="669d5831f5b2d79d1bacc0d49f88a64c"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="quickcart"><file name="js.phtml" hash="a58feb248e1484e853c874bd8743aeff"/><file name="quickcart.phtml" hash="eef496a930210595c8c1c8445d042e61"/></dir></dir><dir name="layout"><file name="quickcart.xml" hash="089a6c86e19103c8a43318e6630ad309"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="Multidots"><dir><dir name="Quickcart"><file name="msrp.js" hash="3c14f88cffaa31b65c6f8993540084f7"/><file name="quickcartcss.css" hash="e42b0adb1e070594006d2580bb6e649c"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Multidots_Quickcart.xml" hash="83909944ec44a1c2edd18af0ac63c91a"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
skin/frontend/base/default/Multidots/Quickcart/msrp.js ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Magento
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the Academic Free License (AFL 3.0)
7
+ * that is bundled with this package in the file LICENSE_AFL.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/afl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to license@magento.com so we can send you a copy immediately.
13
+ *
14
+ * DISCLAIMER
15
+ *
16
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
17
+ * versions in the future. If you wish to customize Magento for your
18
+ * needs please refer to http://www.magento.com for more information.
19
+ *
20
+ * @category design
21
+ * @package base_default
22
+ * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
23
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
24
+ */
25
+
26
+ if (!window.Catalog) {
27
+ window.Catalog = {};
28
+ }
29
+
30
+ Catalog.Map = {
31
+ bindProductForm: function() {
32
+ if (('undefined' != typeof productAddToCartForm) && productAddToCartForm) {
33
+ productAddToCartFormOld = productAddToCartForm;
34
+ productAddToCartForm = new VarienForm('product_addtocart_form_from_popup');
35
+ productAddToCartForm.submitLight = productAddToCartFormOld.submitLight;
36
+ productAddToCartForm.submitConfe = productAddToCartFormOld.submitConfe;
37
+ } else if (!$('product_addtocart_form_from_popup')) {
38
+ return false;
39
+ } else if ('undefined' == typeof productAddToCartForm) {
40
+ productAddToCartForm = new VarienForm('product_addtocart_form_from_popup');
41
+ }
42
+
43
+ productAddToCartForm.submit = function(button, url) {
44
+ if (('undefined' != typeof productAddToCartFormOld) && productAddToCartFormOld) {
45
+ if (Catalog.Map.active) {
46
+ Catalog.Map.hideHelp();
47
+ }
48
+ if (productAddToCartForm.qty && $('qty')) {
49
+ $('qty').value = productAddToCartForm.qty;
50
+ }
51
+ parentResult = productAddToCartFormOld.submit();
52
+ return false;
53
+ }
54
+ if (window.opener) {
55
+ var parentButton = button;
56
+ new Ajax.Request(this.form.action, {
57
+ parameters: {isAjax: 1, method: 'GET'},
58
+ onSuccess: function(transport) {
59
+ window.opener.focus();
60
+ if (parentButton && parentButton.href) {
61
+ setPLocation(parentButton.href, true);
62
+ Catalog.Map.hideHelp();
63
+ }
64
+ }
65
+ });
66
+ return;
67
+ }
68
+ if (this.validator.validate()) {
69
+ var form = this.form;
70
+ var oldUrl = form.action;
71
+
72
+ if (url) {
73
+ form.action = url;
74
+ }
75
+ if (!form.getAttribute('action')) {
76
+ form.action = productAddToCartForm.action;
77
+ }
78
+ try {
79
+ this.form.submit();
80
+ } catch (e) {
81
+ this.form.action = oldUrl;
82
+ throw e;
83
+ }
84
+ this.form.action = oldUrl;
85
+
86
+ if (button && button != 'undefined') {
87
+ button.disabled = true;
88
+ }
89
+ }
90
+ };
91
+ }
92
+ };
93
+
94
+ Event.observe(window, 'resize', function(event) {
95
+ if (Catalog.Map.active) {
96
+ Catalog.Map.showHelp(event);
97
+ }
98
+ })
99
+
100
+
skin/frontend/base/default/Multidots/Quickcart/quickcartcss.css ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ /* * *
2
+ * Filename : quickcartcss.css
3
+ * Author : Multidots
4
+ * Date : 27/06/2016
5
+ * ** */
6
+
7
+ .product-view .add-to-cart-buttons .button {margin-left: 0;}
8
+ .product-view .add-to-box .btn-cart {margin-right:10px;}