Version Notes
CP_Rushorder
Download this release
Release Info
Developer | Commerce Pundit |
Extension | CP_Rushorder |
Version | 0.1.5 |
Comparing to | |
See all releases |
Version 0.1.5
- app/code/community/CP/Rushorder/Block/Adminhtml/Sales/Order/Create/Totals/Rushorder.php +29 -0
- app/code/community/CP/Rushorder/Block/Checkout/Totals/Rushorder.php +29 -0
- app/code/community/CP/Rushorder/Block/Sales/Order/Rushorder.php +69 -0
- app/code/community/CP/Rushorder/Helper/Data.php +25 -0
- app/code/community/CP/Rushorder/Model/Observer.php +72 -0
- app/code/community/CP/Rushorder/Model/Rushorder.php +37 -0
- app/code/community/CP/Rushorder/Model/Sales/Order/Total/Creditmemo/Rushorder.php +62 -0
- app/code/community/CP/Rushorder/Model/Sales/Order/Total/Invoice/Rushorder.php +55 -0
- app/code/community/CP/Rushorder/Model/Sales/Quote/Address/Total/Rushorder.php +74 -0
- app/code/community/CP/Rushorder/controllers/IndexController.php +43 -0
- app/code/community/CP/Rushorder/controllers/OnepageController.php +67 -0
- app/code/community/CP/Rushorder/etc/adminhtml.xml +44 -0
- app/code/community/CP/Rushorder/etc/config.xml +178 -0
- app/code/community/CP/Rushorder/etc/system.xml +84 -0
- app/code/community/CP/Rushorder/sql/rushorder_setup/mysql4-install-0.1.0.php +31 -0
- app/code/community/CP/Rushorder/sql/rushorder_setup/mysql4-upgrade-0.1.0-0.1.1.php +31 -0
- app/code/community/CP/Rushorder/sql/rushorder_setup/mysql4-upgrade-0.1.1-0.1.2.php +31 -0
- app/code/community/CP/Rushorder/sql/rushorder_setup/mysql4-upgrade-0.1.2-0.1.3.php +31 -0
- app/code/community/CP/Rushorder/sql/rushorder_setup/mysql4-upgrade-0.1.3-0.1.4.php +33 -0
- app/code/community/CP/Rushorder/sql/rushorder_setup/mysql4-upgrade-0.1.4-0.1.5.php +20 -0
- app/design/adminhtml/default/default/layout/rushorder.xml +72 -0
- app/design/adminhtml/default/default/template/rushorder/sales/order/refunded.phtml +41 -0
- app/design/adminhtml/default/default/template/rushorder/sales/order/total.phtml +29 -0
- app/design/frontend/default/default/layout/rushorder.xml +96 -0
- app/design/frontend/default/default/template/rushorder/checkout/cart.phtml +132 -0
- app/design/frontend/default/default/template/rushorder/checkout/cart/noItems.phtml +10 -0
- app/design/frontend/default/default/template/rushorder/checkout/cart/rushorder-cart.phtml +41 -0
- app/design/frontend/default/default/template/rushorder/checkout/onepage/progress/shipping_method.phtml +37 -0
- app/design/frontend/default/default/template/rushorder/checkout/onepage/shipping_method/additional.phtml +9 -0
- app/design/frontend/rwd/default/layout/rushorder.xml +96 -0
- app/design/frontend/rwd/default/template/rushorder/checkout/cart.phtml +145 -0
- app/design/frontend/rwd/default/template/rushorder/checkout/cart/noItems.phtml +10 -0
- app/design/frontend/rwd/default/template/rushorder/checkout/cart/rushorder-cart.phtml +41 -0
- app/design/frontend/rwd/default/template/rushorder/checkout/onepage/progress/shipping_method.phtml +37 -0
- app/design/frontend/rwd/default/template/rushorder/checkout/onepage/shipping_method/additional.phtml +9 -0
- app/etc/modules/CP_Rushorder.xml +34 -0
- package.xml +18 -0
app/code/community/CP/Rushorder/Block/Adminhtml/Sales/Order/Create/Totals/Rushorder.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class CP_Rushorder_Block_Adminhtml_Sales_Order_Create_Totals_Rushorder extends Mage_Adminhtml_Block_Sales_Order_Create_Totals_Default
|
23 |
+
{
|
24 |
+
/**
|
25 |
+
* Use your own template if necessary
|
26 |
+
* See "sales/order/create/totals/default.phtml" for model
|
27 |
+
*/
|
28 |
+
// protected $_template = 'rushorder/sales/order/create/totals/rushorder.phtml';
|
29 |
+
}
|
app/code/community/CP/Rushorder/Block/Checkout/Totals/Rushorder.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class CP_Rushorder_Block_Checkout_Totals_Rushorder extends Mage_Checkout_Block_Total_Default
|
23 |
+
{
|
24 |
+
/**
|
25 |
+
* Use your own template if necessary
|
26 |
+
* See "checkout/total/default.phtml" for model
|
27 |
+
*/
|
28 |
+
// protected $_template = 'rushorder/checkout/total/rushorder.phtml';
|
29 |
+
}
|
app/code/community/CP/Rushorder/Block/Sales/Order/Rushorder.php
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class CP_Rushorder_Block_Sales_Order_Rushorder extends Mage_Core_Block_Template
|
23 |
+
{
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Get order store object
|
27 |
+
*
|
28 |
+
* @return Mage_Sales_Model_Order
|
29 |
+
*/
|
30 |
+
public function getOrder()
|
31 |
+
{
|
32 |
+
return $this->getParentBlock()->getOrder();
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Get totals source object
|
37 |
+
*
|
38 |
+
* @return Mage_Sales_Model_Order
|
39 |
+
*/
|
40 |
+
public function getSource()
|
41 |
+
{
|
42 |
+
return $this->getParentBlock()->getSource();
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Initialize rushorder totals
|
47 |
+
*
|
48 |
+
* @return CP_Rushorder_Block_Sales_Order_Rushorder
|
49 |
+
*/
|
50 |
+
public function initTotals()
|
51 |
+
{
|
52 |
+
if(Mage::getSingleton('core/session')->getRushorderapply() == 'rapply') {
|
53 |
+
|
54 |
+
if ((float) $this->getOrder()->getBaseRushorderAmount()) {
|
55 |
+
$source = $this->getSource();
|
56 |
+
$value = $source->getRushorderAmount();
|
57 |
+
|
58 |
+
$this->getParentBlock()->addTotal(new Varien_Object(array(
|
59 |
+
'code' => 'rushorder',
|
60 |
+
'strong' => false,
|
61 |
+
'label' => Mage::getStoreConfig('rushorder/configuration/title'),
|
62 |
+
'value' => $value
|
63 |
+
)));
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
return $this;
|
68 |
+
}
|
69 |
+
}
|
app/code/community/CP/Rushorder/Helper/Data.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class CP_Rushorder_Helper_Data extends Mage_Core_Helper_Abstract
|
23 |
+
{
|
24 |
+
|
25 |
+
}
|
app/code/community/CP/Rushorder/Model/Observer.php
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class CP_Rushorder_Model_Observer
|
23 |
+
{
|
24 |
+
|
25 |
+
public function invoiceSaveAfter(Varien_Event_Observer $observer)
|
26 |
+
{
|
27 |
+
$invoice = $observer->getEvent()->getInvoice();
|
28 |
+
|
29 |
+
if ($invoice->getBaseFeeAmount()) {
|
30 |
+
$order = $invoice->getOrder();
|
31 |
+
$order->setFeeAmountInvoiced($order->getFeeAmountInvoiced() + $invoice->getFeeAmount());
|
32 |
+
$order->setBaseFeeAmountInvoiced($order->getBaseFeeAmountInvoiced() + $invoice->getBaseFeeAmount());
|
33 |
+
}
|
34 |
+
|
35 |
+
return $this;
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Set rushorder amount refunded to the order
|
40 |
+
*
|
41 |
+
* @param Varien_Event_Observer $observer
|
42 |
+
* @return CP_Rushorder_Model_Observer
|
43 |
+
*/
|
44 |
+
public function creditmemoSaveAfter(Varien_Event_Observer $observer)
|
45 |
+
{
|
46 |
+
$creditmemo = $observer->getEvent()->getCreditmemo();
|
47 |
+
|
48 |
+
if ($creditmemo->getFeeAmount()) {
|
49 |
+
$order = $creditmemo->getOrder();
|
50 |
+
$order->setFeeAmountRefunded($order->getFeeAmountRefunded() + $creditmemo->getFeeAmount());
|
51 |
+
$order->setBaseFeeAmountRefunded($order->getBaseFeeAmountRefunded() + $creditmemo->getBaseFeeAmount());
|
52 |
+
}
|
53 |
+
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Update PayPal Total
|
59 |
+
*
|
60 |
+
* @param Varien_Event_Observer $observer
|
61 |
+
* @return CP_Rushorder_Model_Observer
|
62 |
+
*/
|
63 |
+
public function updatePaypalTotal(Varien_Event_Observer $observer)
|
64 |
+
{
|
65 |
+
$cart = $observer->getEvent()->getPaypalCart();
|
66 |
+
|
67 |
+
$cart->updateTotal(Mage_Paypal_Model_Cart::TOTAL_SUBTOTAL, $cart->getSalesEntity()->getFeeAmount());
|
68 |
+
|
69 |
+
return $this;
|
70 |
+
}
|
71 |
+
|
72 |
+
}
|
app/code/community/CP/Rushorder/Model/Rushorder.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class CP_Rushorder_Model_Rushorder extends Varien_Object
|
23 |
+
{
|
24 |
+
|
25 |
+
public static function getRushorder()
|
26 |
+
{
|
27 |
+
// We have return system rush order rushorders
|
28 |
+
return Mage::getStoreConfig('rushorder/configuration/amount');
|
29 |
+
}
|
30 |
+
|
31 |
+
public static function canApply($address)
|
32 |
+
{
|
33 |
+
// Put here your business logic to check if rushorder should be applied or not
|
34 |
+
return true;
|
35 |
+
}
|
36 |
+
|
37 |
+
}
|
app/code/community/CP/Rushorder/Model/Sales/Order/Total/Creditmemo/Rushorder.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class CP_Rushorder_Model_Sales_Order_Total_Creditmemo_Rushorder extends Mage_Sales_Model_Order_Creditmemo_Total_Abstract
|
23 |
+
{
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Collect credit memo total
|
27 |
+
*
|
28 |
+
* @param Mage_Sales_Model_Order_Creditmemo $creditmemo
|
29 |
+
* @return CP_Rushorder_Model_Sales_Order_Total_Creditmemo_Rushorder
|
30 |
+
*/
|
31 |
+
public function collect(Mage_Sales_Model_Order_Creditmemo $creditmemo)
|
32 |
+
{
|
33 |
+
$order = $creditmemo->getOrder();
|
34 |
+
|
35 |
+
if($order->getRushorderAmountInvoiced() > 0) {
|
36 |
+
|
37 |
+
$rushorderAmountLeft = $order->getRushorderAmountInvoiced() - $order->getRushorderAmountRefunded();
|
38 |
+
$baserushorderAmountLeft = $order->getBaseRushorderAmountInvoiced() - $order->getBaseRushorderAmountRefunded();
|
39 |
+
|
40 |
+
if ($baserushorderAmountLeft > 0) {
|
41 |
+
$creditmemo->setGrandTotal($creditmemo->getGrandTotal() + $rushorderAmountLeft);
|
42 |
+
$creditmemo->setBaseGrandTotal($creditmemo->getBaseGrandTotal() + $baserushorderAmountLeft);
|
43 |
+
$creditmemo->setRushorderAmount($rushorderAmountLeft);
|
44 |
+
$creditmemo->setBaseRushorderAmount($baserushorderAmountLeft);
|
45 |
+
}
|
46 |
+
|
47 |
+
} else {
|
48 |
+
|
49 |
+
$rushorderAmount = $order->getRushorderAmountInvoiced();
|
50 |
+
$baserushorderAmount = $order->getBaseRushorderAmountInvoiced();
|
51 |
+
|
52 |
+
$creditmemo->setGrandTotal($creditmemo->getGrandTotal() + $rushorderAmount);
|
53 |
+
$creditmemo->setBaseGrandTotal($creditmemo->getBaseGrandTotal() + $baserushorderAmount);
|
54 |
+
$creditmemo->setRushorderAmount($rushorderAmount);
|
55 |
+
$creditmemo->setBaseRushorderAmount($baserushorderAmount);
|
56 |
+
|
57 |
+
}
|
58 |
+
|
59 |
+
return $this;
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
app/code/community/CP/Rushorder/Model/Sales/Order/Total/Invoice/Rushorder.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class CP_Rushorder_Model_Sales_Order_Total_Invoice_Rushorder extends Mage_Sales_Model_Order_Invoice_Total_Abstract
|
23 |
+
{
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Collect invoice total
|
27 |
+
*
|
28 |
+
* @param Mage_Sales_Model_Order_Invoice $invoice
|
29 |
+
* @return CP_Rushorder_Model_Sales_Order_Total_Invoice_Rushorder
|
30 |
+
*/
|
31 |
+
public function collect(Mage_Sales_Model_Order_Invoice $invoice)
|
32 |
+
{
|
33 |
+
$order = $invoice->getOrder();
|
34 |
+
|
35 |
+
$rushorderAmountLeft = $order->getRushorderAmount() - $order->getRushorderAmountInvoiced();
|
36 |
+
$baseRushorderAmountLeft = $order->getBaseRushorderAmount() - $order->getBaseRushorderAmountInvoiced();
|
37 |
+
|
38 |
+
if (abs($baseRushorderAmountLeft) < $invoice->getBaseGrandTotal()) {
|
39 |
+
$invoice->setGrandTotal($invoice->getGrandTotal() + $rushorderAmountLeft);
|
40 |
+
$invoice->setBaseGrandTotal($invoice->getBaseGrandTotal() + $baseRushorderAmountLeft);
|
41 |
+
} else {
|
42 |
+
$rushorderAmountLeft = $invoice->getGrandTotal() * -1;
|
43 |
+
$baseRushorderAmountLeft = $invoice->getBaseGrandTotal() * -1;
|
44 |
+
|
45 |
+
$invoice->setGrandTotal(0);
|
46 |
+
$invoice->setBaseGrandTotal(0);
|
47 |
+
}
|
48 |
+
|
49 |
+
$invoice->setRushorderAmount($rushorderAmountLeft);
|
50 |
+
$invoice->setBaseRushorderAmount($baseRushorderAmountLeft);
|
51 |
+
|
52 |
+
return $this;
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
app/code/community/CP/Rushorder/Model/Sales/Quote/Address/Total/Rushorder.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class CP_Rushorder_Model_Sales_Quote_Address_Total_Rushorder extends Mage_Sales_Model_Quote_Address_Total_Abstract
|
23 |
+
{
|
24 |
+
|
25 |
+
protected $_code = 'rushorder';
|
26 |
+
|
27 |
+
public function collect(Mage_Sales_Model_Quote_Address $address)
|
28 |
+
{
|
29 |
+
parent::collect($address);
|
30 |
+
|
31 |
+
$this->_setAmount(0);
|
32 |
+
$this->_setBaseAmount(0);
|
33 |
+
|
34 |
+
$items = $this->_getAddressItems($address);
|
35 |
+
if (!count($items)) {
|
36 |
+
return $this;
|
37 |
+
}
|
38 |
+
|
39 |
+
$quote = $address->getQuote();
|
40 |
+
if(Mage::getSingleton('core/session')->getRushorderapply() == 'rapply') {
|
41 |
+
|
42 |
+
if (CP_Rushorder_Model_Rushorder::canApply($address)) {
|
43 |
+
$exist_amount = $quote->getRushorderAmount();
|
44 |
+
$rushorder = CP_Rushorder_Model_Rushorder::getRushorder();
|
45 |
+
$balance = $rushorder - $exist_amount;
|
46 |
+
|
47 |
+
$address->setRushorderAmount($balance);
|
48 |
+
$address->setBaseRushorderAmount($balance);
|
49 |
+
|
50 |
+
$quote->setRushorderAmount($balance);
|
51 |
+
|
52 |
+
$address->setGrandTotal($address->getGrandTotal() + $address->getRushorderAmount());
|
53 |
+
$address->setBaseGrandTotal($address->getBaseGrandTotal() + $address->getBaseRushorderAmount());
|
54 |
+
}
|
55 |
+
|
56 |
+
}
|
57 |
+
|
58 |
+
return $this;
|
59 |
+
}
|
60 |
+
|
61 |
+
public function fetch(Mage_Sales_Model_Quote_Address $address)
|
62 |
+
{
|
63 |
+
$amount = $address->getRushorderAmount();
|
64 |
+
if(Mage::getSingleton('core/session')->getRushorderapply() == 'rapply') {
|
65 |
+
$address->addTotal(array(
|
66 |
+
'code' => $this->getCode(),
|
67 |
+
'title' => Mage::getStoreConfig('rushorder/configuration/title'),
|
68 |
+
'value' => $amount
|
69 |
+
));
|
70 |
+
}
|
71 |
+
return $this;
|
72 |
+
}
|
73 |
+
|
74 |
+
}
|
app/code/community/CP/Rushorder/controllers/IndexController.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class CP_Rushorder_IndexController extends Mage_Core_Controller_Front_Action
|
23 |
+
{
|
24 |
+
public function applyrushorderAction()
|
25 |
+
{
|
26 |
+
if (isset($_POST['applyrushorder'])) {
|
27 |
+
|
28 |
+
if (isset($_POST['rushorderapply'])) {
|
29 |
+
Mage::getSingleton('core/session')->setRushorderapply('rapply');
|
30 |
+
Mage::getSingleton('core/session')->addSuccess('Rush order has been apply.');
|
31 |
+
} else {
|
32 |
+
Mage::getSingleton('core/session')->addSuccess(Mage::helper('fee')->__('Please select checkbox before apply rush order.'));
|
33 |
+
}
|
34 |
+
|
35 |
+
} else {
|
36 |
+
|
37 |
+
// Reset button event
|
38 |
+
Mage::getSingleton('core/session')->setRushorderapply('');
|
39 |
+
Mage::getSingleton('core/session')->addSuccess('Rush order has been reset.');
|
40 |
+
}
|
41 |
+
$this->_redirectUrl(Mage::helper('checkout/cart')->getCartUrl());
|
42 |
+
}
|
43 |
+
}
|
app/code/community/CP/Rushorder/controllers/OnepageController.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
require_once 'Mage/Checkout/controllers/OnepageController.php';
|
23 |
+
|
24 |
+
class CP_Rushorder_OnepageController extends Mage_Checkout_OnepageController
|
25 |
+
{
|
26 |
+
|
27 |
+
public function saveShippingMethodAction()
|
28 |
+
{
|
29 |
+
if ($this->_expireAjax()) {
|
30 |
+
return;
|
31 |
+
}
|
32 |
+
if ($this->getRequest()->isPost()) {
|
33 |
+
|
34 |
+
// add rushorder amount to grand total if user select checkbox.
|
35 |
+
|
36 |
+
if (isset($_POST['shipping_rushorder'])) {
|
37 |
+
Mage::getSingleton('core/session')->setRushorderapply('rapply');
|
38 |
+
} else {
|
39 |
+
Mage::getSingleton('core/session')->setRushorderapply('');
|
40 |
+
}
|
41 |
+
|
42 |
+
// end
|
43 |
+
|
44 |
+
$data = $this->getRequest()->getPost('shipping_method', '');
|
45 |
+
$result = $this->getOnepage()->saveShippingMethod($data);
|
46 |
+
// $result will contain error data if shipping method is empty
|
47 |
+
if (!$result) {
|
48 |
+
Mage::dispatchEvent(
|
49 |
+
'checkout_controller_onepage_save_shipping_method',
|
50 |
+
array(
|
51 |
+
'request' => $this->getRequest(),
|
52 |
+
'quote' => $this->getOnepage()->getQuote()));
|
53 |
+
$this->getOnepage()->getQuote()->collectTotals();
|
54 |
+
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
55 |
+
|
56 |
+
$result['goto_section'] = 'payment';
|
57 |
+
$result['update_section'] = array(
|
58 |
+
'name' => 'payment-method',
|
59 |
+
'html' => $this->_getPaymentMethodsHtml()
|
60 |
+
);
|
61 |
+
}
|
62 |
+
$this->getOnepage()->getQuote()->collectTotals()->save();
|
63 |
+
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
}
|
app/code/community/CP/Rushorder/etc/adminhtml.xml
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Commerce Pundit Technologies
|
17 |
+
* @package CP_Rushorder
|
18 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
19 |
+
* @author <<Niranjan Gondaliya>>
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
|
24 |
+
<config>
|
25 |
+
<acl>
|
26 |
+
<resources>
|
27 |
+
<admin>
|
28 |
+
<children>
|
29 |
+
<system>
|
30 |
+
<children>
|
31 |
+
<config>
|
32 |
+
<children>
|
33 |
+
<rushorder translate="title" module="rushorder">
|
34 |
+
<title>Rushorder Section</title>
|
35 |
+
</rushorder>
|
36 |
+
</children>
|
37 |
+
</config>
|
38 |
+
</children>
|
39 |
+
</system>
|
40 |
+
</children>
|
41 |
+
</admin>
|
42 |
+
</resources>
|
43 |
+
</acl>
|
44 |
+
</config>
|
app/code/community/CP/Rushorder/etc/config.xml
ADDED
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Commerce Pundit Technologies
|
17 |
+
* @package CP_Rushorder
|
18 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
19 |
+
* @author <<Niranjan Gondaliya>>
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
<config>
|
24 |
+
<modules>
|
25 |
+
<CP_Rushorder>
|
26 |
+
<version>0.1.5</version>
|
27 |
+
</CP_Rushorder>
|
28 |
+
</modules>
|
29 |
+
<global>
|
30 |
+
<sales>
|
31 |
+
<quote>
|
32 |
+
<totals>
|
33 |
+
<rushorder>
|
34 |
+
<class>rushorder/sales_quote_address_total_rushorder</class>
|
35 |
+
<renderer>rushorder/checkout_totals_rushorder</renderer>
|
36 |
+
<admin_renderer>rushorder/adminhtml_sales_order_create_totals_rushorder</admin_renderer>
|
37 |
+
</rushorder>
|
38 |
+
</totals>
|
39 |
+
</quote>
|
40 |
+
<order_invoice>
|
41 |
+
<totals>
|
42 |
+
<rushorder>
|
43 |
+
<class>rushorder/sales_order_total_invoice_rushorder</class>
|
44 |
+
</rushorder>
|
45 |
+
</totals>
|
46 |
+
</order_invoice>
|
47 |
+
<order_creditmemo>
|
48 |
+
<totals>
|
49 |
+
<rushorder>
|
50 |
+
<class>rushorder/sales_order_total_creditmemo_rushorder</class>
|
51 |
+
</rushorder>
|
52 |
+
</totals>
|
53 |
+
</order_creditmemo>
|
54 |
+
</sales>
|
55 |
+
<events>
|
56 |
+
<paypal_prepare_line_items>
|
57 |
+
<observers>
|
58 |
+
<paypal_prepare_line_items>
|
59 |
+
<class>rushorder/observer</class>
|
60 |
+
<method>updatePaypalTotal</method>
|
61 |
+
</paypal_prepare_line_items>
|
62 |
+
</observers>
|
63 |
+
</paypal_prepare_line_items>
|
64 |
+
<sales_order_invoice_save_after>
|
65 |
+
<observers>
|
66 |
+
<sales_order_invoice_save_after>
|
67 |
+
<class>rushorder/observer</class>
|
68 |
+
<method>invoiceSaveAfter</method>
|
69 |
+
</sales_order_invoice_save_after>
|
70 |
+
</observers>
|
71 |
+
</sales_order_invoice_save_after>
|
72 |
+
<sales_order_creditmemo_save_after>
|
73 |
+
<observers>
|
74 |
+
<sales_order_creditmemo_save_after>
|
75 |
+
<class>rushorder/observer</class>
|
76 |
+
<method>creditmemoSaveAfter</method>
|
77 |
+
</sales_order_creditmemo_save_after>
|
78 |
+
</observers>
|
79 |
+
</sales_order_creditmemo_save_after>
|
80 |
+
</events>
|
81 |
+
<fieldsets>
|
82 |
+
<sales_convert_quote_address>
|
83 |
+
<rushorder_amount>
|
84 |
+
<to_order>*</to_order>
|
85 |
+
</rushorder_amount>
|
86 |
+
<base_rushorder_amount>
|
87 |
+
<to_order>*</to_order>
|
88 |
+
</base_rushorder_amount>
|
89 |
+
</sales_convert_quote_address>
|
90 |
+
</fieldsets>
|
91 |
+
<pdf>
|
92 |
+
<totals>
|
93 |
+
<rushorder translate="title">
|
94 |
+
<title>Rushorder</title>
|
95 |
+
<source_field>rushorder_amount</source_field>
|
96 |
+
<font_size>7</font_size>
|
97 |
+
<display_zero>0</display_zero>
|
98 |
+
<sort_order>650</sort_order>
|
99 |
+
<amount_prefix></amount_prefix>
|
100 |
+
</rushorder>
|
101 |
+
</totals>
|
102 |
+
</pdf>
|
103 |
+
<resources>
|
104 |
+
<rushorder_setup>
|
105 |
+
<setup>
|
106 |
+
<module>CP_Rushorder</module>
|
107 |
+
</setup>
|
108 |
+
<connection>
|
109 |
+
<use>core_setup</use>
|
110 |
+
</connection>
|
111 |
+
</rushorder_setup>
|
112 |
+
</resources>
|
113 |
+
<models>
|
114 |
+
<rushorder>
|
115 |
+
<class>CP_Rushorder_Model</class>
|
116 |
+
</rushorder>
|
117 |
+
</models>
|
118 |
+
<blocks>
|
119 |
+
<rushorder>
|
120 |
+
<class>CP_Rushorder_Block</class>
|
121 |
+
</rushorder>
|
122 |
+
</blocks>
|
123 |
+
<helpers>
|
124 |
+
<rushorder>
|
125 |
+
<class>CP_Rushorder_Helper</class>
|
126 |
+
</rushorder>
|
127 |
+
</helpers>
|
128 |
+
</global>
|
129 |
+
<frontend>
|
130 |
+
<routers>
|
131 |
+
<rushorder>
|
132 |
+
<use>standard</use>
|
133 |
+
<args>
|
134 |
+
<module>CP_Rushorder</module>
|
135 |
+
<frontName>rushorder</frontName>
|
136 |
+
</args>
|
137 |
+
</rushorder>
|
138 |
+
|
139 |
+
<checkout>
|
140 |
+
<args>
|
141 |
+
<modules>
|
142 |
+
<CP_Rushorder before="Mage_Checkout">CP_Rushorder</CP_Rushorder>
|
143 |
+
</modules>
|
144 |
+
</args>
|
145 |
+
</checkout>
|
146 |
+
</routers>
|
147 |
+
<layout>
|
148 |
+
<updates>
|
149 |
+
<rushorder>
|
150 |
+
<file>rushorder.xml</file>
|
151 |
+
</rushorder>
|
152 |
+
</updates>
|
153 |
+
</layout>
|
154 |
+
</frontend>
|
155 |
+
<adminhtml>
|
156 |
+
<layout>
|
157 |
+
<updates>
|
158 |
+
<rushorder>
|
159 |
+
<file>rushorder.xml</file>
|
160 |
+
</rushorder>
|
161 |
+
</updates>
|
162 |
+
</layout>
|
163 |
+
</adminhtml>
|
164 |
+
<default>
|
165 |
+
<sales>
|
166 |
+
<totals_sort>
|
167 |
+
<rushorder>15</rushorder>
|
168 |
+
</totals_sort>
|
169 |
+
</sales>
|
170 |
+
<rushorder>
|
171 |
+
<configuration>
|
172 |
+
<title>Rush order</title>
|
173 |
+
<cartdesc>Rush order</cartdesc>
|
174 |
+
<amount>30</amount>
|
175 |
+
</configuration>
|
176 |
+
</rushorder>
|
177 |
+
</default>
|
178 |
+
</config>
|
app/code/community/CP/Rushorder/etc/system.xml
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Commerce Pundit Technologies
|
17 |
+
* @package CP_Rushorder
|
18 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
19 |
+
* @author <<Niranjan Gondaliya>>
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
|
24 |
+
<config>
|
25 |
+
<tabs>
|
26 |
+
<rushorder translate="label" module="rushorder">
|
27 |
+
<label>Rush Order</label>
|
28 |
+
<sort_order>123</sort_order>
|
29 |
+
</rushorder>
|
30 |
+
</tabs>
|
31 |
+
<sections>
|
32 |
+
<rushorder translate="label" module="rushorder">
|
33 |
+
<label>Rush Order</label>
|
34 |
+
<tab>rushorder</tab>
|
35 |
+
<frontend_type>text</frontend_type>
|
36 |
+
<sort_order>100</sort_order>
|
37 |
+
<show_in_default>1</show_in_default>
|
38 |
+
<show_in_website>1</show_in_website>
|
39 |
+
<show_in_store>1</show_in_store>
|
40 |
+
<groups>
|
41 |
+
<configuration translate="label">
|
42 |
+
<label>Rush Order Configuration</label>
|
43 |
+
<frontend_type>text</frontend_type>
|
44 |
+
<sort_order>1</sort_order>
|
45 |
+
<show_in_default>1</show_in_default>
|
46 |
+
<show_in_website>1</show_in_website>
|
47 |
+
<show_in_store>1</show_in_store>
|
48 |
+
<fields>
|
49 |
+
<title translate="label comment">
|
50 |
+
<label>Title</label>
|
51 |
+
<class>required-entry</class>
|
52 |
+
<comment>This is title display in checkout page as well as order page of admin side.</comment>
|
53 |
+
<frontend_type>text</frontend_type>
|
54 |
+
<sort_order>2</sort_order>
|
55 |
+
<show_in_default>1</show_in_default>
|
56 |
+
<show_in_website>1</show_in_website>
|
57 |
+
<show_in_store>1</show_in_store>
|
58 |
+
</title>
|
59 |
+
<cartdesc translate="label comment">
|
60 |
+
<label>Description</label>
|
61 |
+
<class>required-entry</class>
|
62 |
+
<comment>This description will display in cart page.</comment>
|
63 |
+
<frontend_type>textarea</frontend_type>
|
64 |
+
<sort_order>2</sort_order>
|
65 |
+
<show_in_default>1</show_in_default>
|
66 |
+
<show_in_website>1</show_in_website>
|
67 |
+
<show_in_store>1</show_in_store>
|
68 |
+
</cartdesc>
|
69 |
+
<amount translate="label comment">
|
70 |
+
<label>Rush order charge</label>
|
71 |
+
<class>required-entry</class>
|
72 |
+
<comment>Additional amount of rush order.</comment>
|
73 |
+
<frontend_type>text</frontend_type>
|
74 |
+
<sort_order>3</sort_order>
|
75 |
+
<show_in_default>1</show_in_default>
|
76 |
+
<show_in_website>1</show_in_website>
|
77 |
+
<show_in_store>1</show_in_store>
|
78 |
+
</amount>
|
79 |
+
</fields>
|
80 |
+
</configuration>
|
81 |
+
</groups>
|
82 |
+
</rushorder>
|
83 |
+
</sections>
|
84 |
+
</config>
|
app/code/community/CP/Rushorder/sql/rushorder_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
$installer = $this;
|
23 |
+
|
24 |
+
$installer->startSetup();
|
25 |
+
|
26 |
+
$installer->run("
|
27 |
+
ALTER TABLE `".$this->getTable('sales/order')."` ADD `rushorder_amount` DECIMAL( 10, 2 ) NOT NULL;
|
28 |
+
ALTER TABLE `".$this->getTable('sales/order')."` ADD `base_rushorder_amount` DECIMAL( 10, 2 ) NOT NULL;
|
29 |
+
");
|
30 |
+
|
31 |
+
$installer->endSetup();
|
app/code/community/CP/Rushorder/sql/rushorder_setup/mysql4-upgrade-0.1.0-0.1.1.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
$installer = $this;
|
23 |
+
|
24 |
+
$installer->startSetup();
|
25 |
+
|
26 |
+
$installer->run("
|
27 |
+
ALTER TABLE `".$this->getTable('sales/quote_address')."` ADD `rushorder_amount` DECIMAL( 10, 2 ) NOT NULL;
|
28 |
+
ALTER TABLE `".$this->getTable('sales/quote_address')."` ADD `base_rushorder_amount` DECIMAL( 10, 2 ) NOT NULL;
|
29 |
+
");
|
30 |
+
|
31 |
+
$installer->endSetup();
|
app/code/community/CP/Rushorder/sql/rushorder_setup/mysql4-upgrade-0.1.1-0.1.2.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
$installer = $this;
|
23 |
+
|
24 |
+
$installer->startSetup();
|
25 |
+
|
26 |
+
$installer->run("
|
27 |
+
ALTER TABLE `".$this->getTable('sales/order')."` ADD `rushorder_amount_invoiced` DECIMAL( 10, 2 ) NOT NULL;
|
28 |
+
ALTER TABLE `".$this->getTable('sales/order')."` ADD `base_rushorder_amount_invoiced` DECIMAL( 10, 2 ) NOT NULL;
|
29 |
+
");
|
30 |
+
|
31 |
+
$installer->endSetup();
|
app/code/community/CP/Rushorder/sql/rushorder_setup/mysql4-upgrade-0.1.2-0.1.3.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
$installer = $this;
|
23 |
+
|
24 |
+
$installer->startSetup();
|
25 |
+
|
26 |
+
$installer->run("
|
27 |
+
ALTER TABLE `".$this->getTable('sales/invoice')."` ADD `rushorder_amount` DECIMAL( 10, 2 ) NOT NULL;
|
28 |
+
ALTER TABLE `".$this->getTable('sales/invoice')."` ADD `base_rushorder_amount` DECIMAL( 10, 2 ) NOT NULL;
|
29 |
+
");
|
30 |
+
|
31 |
+
$installer->endSetup();
|
app/code/community/CP/Rushorder/sql/rushorder_setup/mysql4-upgrade-0.1.3-0.1.4.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
$installer = $this;
|
23 |
+
|
24 |
+
$installer->startSetup();
|
25 |
+
|
26 |
+
$installer->run("
|
27 |
+
ALTER TABLE `".$this->getTable('sales/order')."` ADD `rushorder_amount_refunded` DECIMAL( 10, 2 ) NOT NULL;
|
28 |
+
ALTER TABLE `".$this->getTable('sales/order')."` ADD `base_rushorder_amount_refunded` DECIMAL( 10, 2 ) NOT NULL;
|
29 |
+
ALTER TABLE `".$this->getTable('sales/creditmemo')."` ADD `rushorder_amount` DECIMAL( 10, 2 ) NOT NULL;
|
30 |
+
ALTER TABLE `".$this->getTable('sales/creditmemo')."` ADD `base_rushorder_amount` DECIMAL( 10, 2 ) NOT NULL;
|
31 |
+
");
|
32 |
+
|
33 |
+
$installer->endSetup();
|
app/code/community/CP/Rushorder/sql/rushorder_setup/mysql4-upgrade-0.1.4-0.1.5.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
app/design/adminhtml/default/default/layout/rushorder.xml
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Commerce Pundit Technologies
|
17 |
+
* @package CP_Rushorder
|
18 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
19 |
+
* @author <<Niranjan Gondaliya>>
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
|
24 |
+
<layout version="0.1.0">
|
25 |
+
<adminhtml_sales_order_view>
|
26 |
+
<reference name="order_totals">
|
27 |
+
<block type="adminhtml/sales_order_totals_item" name="rushorder" template="rushorder/sales/order/total.phtml" />
|
28 |
+
<block type="adminhtml/sales_order_totals_item" name="rushorder.refunded" template="rushorder/sales/order/refunded.phtml">
|
29 |
+
<action method="setDisplayArea"><area>footer</area></action>
|
30 |
+
<action method="setAfterCondition"><condition>last</condition></action>
|
31 |
+
</block>
|
32 |
+
</reference>
|
33 |
+
</adminhtml_sales_order_view>
|
34 |
+
|
35 |
+
<adminhtml_sales_order_invoice_new>
|
36 |
+
<reference name="invoice_totals">
|
37 |
+
<block type="adminhtml/sales_order_totals_item" name="rushorder" template="rushorder/sales/order/total.phtml" />
|
38 |
+
</reference>
|
39 |
+
</adminhtml_sales_order_invoice_new>
|
40 |
+
|
41 |
+
<adminhtml_sales_order_invoice_updateqty>
|
42 |
+
<reference name="invoice_totals">
|
43 |
+
<block type="adminhtml/sales_order_totals_item" name="rushorder" template="rushorder/sales/order/total.phtml" />
|
44 |
+
</reference>
|
45 |
+
</adminhtml_sales_order_invoice_updateqty>
|
46 |
+
|
47 |
+
<adminhtml_sales_order_invoice_view>
|
48 |
+
<reference name="invoice_totals">
|
49 |
+
<block type="adminhtml/sales_order_totals_item" name="rushorder" template="rushorder/sales/order/total.phtml" />
|
50 |
+
</reference>
|
51 |
+
</adminhtml_sales_order_invoice_view>
|
52 |
+
|
53 |
+
<adminhtml_sales_order_creditmemo_new>
|
54 |
+
<reference name="creditmemo_totals">
|
55 |
+
<block type="adminhtml/sales_order_totals_item" name="rushorder" template="rushorder/sales/order/total.phtml" />
|
56 |
+
</reference>
|
57 |
+
</adminhtml_sales_order_creditmemo_new>
|
58 |
+
|
59 |
+
<adminhtml_sales_order_creditmemo_updateqty>
|
60 |
+
<reference name="creditmemo_totals">
|
61 |
+
<block type="adminhtml/sales_order_totals_item" name="rushorder" template="rushorder/sales/order/total.phtml" />
|
62 |
+
</reference>
|
63 |
+
</adminhtml_sales_order_creditmemo_updateqty>
|
64 |
+
|
65 |
+
<adminhtml_sales_order_creditmemo_view>
|
66 |
+
<reference name="creditmemo_totals">
|
67 |
+
<block type="adminhtml/sales_order_totals_item" name="rushorder.refunded" template="rushorder/sales/order/refunded.phtml">
|
68 |
+
<action method="setDisplayArea"><area>footer</area></action>
|
69 |
+
</block>
|
70 |
+
</reference>
|
71 |
+
</adminhtml_sales_order_creditmemo_view>
|
72 |
+
</layout>
|
app/design/adminhtml/default/default/template/rushorder/sales/order/refunded.phtml
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
<?php if($this->getSource() instanceof Mage_Sales_Model_Order): ?>
|
23 |
+
|
24 |
+
<?php if ((float)$this->getSource()->getRushorderAmountRefunded() > 0): ?>
|
25 |
+
<tr>
|
26 |
+
<td class="label"><strong><?php echo Mage::helper('rushorder')->__('Rush order amount refunded to customer') ?></strong></td>
|
27 |
+
<td><strong><?php echo $this->getSource()->getRushorderAmountRefunded(); ?></strong></td>
|
28 |
+
</tr>
|
29 |
+
<?php endif; ?>
|
30 |
+
|
31 |
+
<?php else: ?>
|
32 |
+
|
33 |
+
<?php if ((float)$this->getSource()->getRushorderAmount()): ?>
|
34 |
+
<tr>
|
35 |
+
<td class="label"><strong><?php echo Mage::helper('rushorder')->__('Rush order amount refunded') ?></strong></td>
|
36 |
+
<td><strong><?php echo $this->getSource()->getRushorderAmount(); ?></strong></td>
|
37 |
+
</tr>
|
38 |
+
<?php endif; ?>
|
39 |
+
|
40 |
+
<?php endif; ?>
|
41 |
+
|
app/design/adminhtml/default/default/template/rushorder/sales/order/total.phtml
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Commerce Pundit Technologies
|
16 |
+
* @package CP_Rushorder
|
17 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
18 |
+
* @author <<Niranjan Gondaliya>>
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
<?php $this->setPriceDataObject($this->getSource()) ?>
|
22 |
+
<?php if ((float) $this->getSource()->getRushorderAmount()): ?>
|
23 |
+
<tr>
|
24 |
+
<td class="label"><?php echo Mage::getStoreConfig('rushorder/configuration/title'); ?></td>
|
25 |
+
<td>
|
26 |
+
<?php echo $this->displayPrices($this->getSource()->getBaseRushorderAmount(), $this->getSource()->getRushorderAmount()); ?>
|
27 |
+
</td>
|
28 |
+
</tr>
|
29 |
+
<?php endif; ?>
|
app/design/frontend/default/default/layout/rushorder.xml
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<layout version="0.1.0">
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Commerce Pundit Technologies
|
17 |
+
* @package CP_Rushorder
|
18 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
19 |
+
* @author <<Niranjan Gondaliya>>
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
|
24 |
+
<sales_order_view>
|
25 |
+
<reference name="order_totals">
|
26 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
27 |
+
</reference>
|
28 |
+
</sales_order_view>
|
29 |
+
<sales_order_print>
|
30 |
+
<reference name="order_totals">
|
31 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
32 |
+
</reference>
|
33 |
+
</sales_order_print>
|
34 |
+
<sales_email_order_items>
|
35 |
+
<reference name="order_totals">
|
36 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
37 |
+
</reference>
|
38 |
+
</sales_email_order_items>
|
39 |
+
|
40 |
+
<sales_order_invoice>
|
41 |
+
<reference name="invoice_totals">
|
42 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
43 |
+
</reference>
|
44 |
+
</sales_order_invoice>
|
45 |
+
<sales_order_printinvoice>
|
46 |
+
<reference name="invoice_totals">
|
47 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
48 |
+
</reference>
|
49 |
+
</sales_order_printinvoice>
|
50 |
+
<sales_email_order_invoice_items>
|
51 |
+
<reference name="invoice_totals">
|
52 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
53 |
+
</reference>
|
54 |
+
</sales_email_order_invoice_items>
|
55 |
+
|
56 |
+
<sales_order_creditmemo>
|
57 |
+
<reference name="creditmemo_totals">
|
58 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
59 |
+
</reference>
|
60 |
+
</sales_order_creditmemo>
|
61 |
+
<sales_order_printcreditmemo>
|
62 |
+
<reference name="creditmemo_totals">
|
63 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
64 |
+
</reference>
|
65 |
+
</sales_order_printcreditmemo>
|
66 |
+
<sales_email_order_creditmemo_items>
|
67 |
+
<reference name="creditmemo_totals">
|
68 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
69 |
+
</reference>
|
70 |
+
</sales_email_order_creditmemo_items>
|
71 |
+
|
72 |
+
<checkout_cart_index>
|
73 |
+
<reference name="checkout.cart">
|
74 |
+
<action method="setCartTemplate"><value>rushorder/checkout/cart.phtml</value></action>
|
75 |
+
<action method="setEmptyTemplate"><value>rushorder/checkout/cart/noItems.phtml</value></action>
|
76 |
+
<action method="chooseTemplate"/>
|
77 |
+
<block type="core/template" name="rushorder.cart" as="rushorder_cart" template="rushorder/checkout/cart/rushorder-cart.phtml"/>
|
78 |
+
</reference>
|
79 |
+
</checkout_cart_index>
|
80 |
+
|
81 |
+
<checkout_onepage_additional>
|
82 |
+
<reference name="root">
|
83 |
+
<action method="setTemplate">
|
84 |
+
<template>rushorder/checkout/onepage/shipping_method/additional.phtml</template>
|
85 |
+
</action>
|
86 |
+
</reference>
|
87 |
+
</checkout_onepage_additional>
|
88 |
+
|
89 |
+
<!-- <checkout_onepage_progress_shipping_method>
|
90 |
+
<reference name="root">
|
91 |
+
<action method="setTemplate">
|
92 |
+
<template>rushorder/checkout/onepage/progress/shipping_method.phtml</template>
|
93 |
+
</action>
|
94 |
+
</reference>
|
95 |
+
</checkout_onepage_progress_shipping_method> -->
|
96 |
+
</layout>
|
app/design/frontend/default/default/template/rushorder/checkout/cart.phtml
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="cart">
|
2 |
+
<div class="page-title title-buttons">
|
3 |
+
<h1><?php echo $this->__('Shopping Cart') ?></h1>
|
4 |
+
<?php if(!$this->hasError()): ?>
|
5 |
+
<ul class="checkout-types">
|
6 |
+
<?php foreach ($this->getMethods('top_methods') as $method): ?>
|
7 |
+
<?php if ($methodHtml = $this->getMethodHtml($method)): ?>
|
8 |
+
<li><?php echo $methodHtml; ?></li>
|
9 |
+
<?php endif; ?>
|
10 |
+
<?php endforeach; ?>
|
11 |
+
</ul>
|
12 |
+
<?php endif; ?>
|
13 |
+
</div>
|
14 |
+
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
15 |
+
<?php echo $this->getChildHtml('form_before') ?>
|
16 |
+
<form action="<?php echo $this->getFormActionUrl() ?>" method="post">
|
17 |
+
<?php echo $this->getBlockHtml('formkey'); ?>
|
18 |
+
<fieldset>
|
19 |
+
<table id="shopping-cart-table" class="data-table cart-table">
|
20 |
+
<col width="1" />
|
21 |
+
<col />
|
22 |
+
<col width="1" />
|
23 |
+
<?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
|
24 |
+
<col width="1" />
|
25 |
+
<?php endif ?>
|
26 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
27 |
+
<col width="1" />
|
28 |
+
<?php endif; ?>
|
29 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
30 |
+
<col width="1" />
|
31 |
+
<?php endif; ?>
|
32 |
+
<col width="1" />
|
33 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
34 |
+
<col width="1" />
|
35 |
+
<?php endif; ?>
|
36 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
37 |
+
<col width="1" />
|
38 |
+
<?php endif; ?>
|
39 |
+
<col width="1" />
|
40 |
+
|
41 |
+
<?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
|
42 |
+
<thead>
|
43 |
+
<tr>
|
44 |
+
<th rowspan="<?php echo $mergedCells; ?>"> </th>
|
45 |
+
<th rowspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo $this->__('Product Name') ?></span></th>
|
46 |
+
<th rowspan="<?php echo $mergedCells; ?>"></th>
|
47 |
+
<?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
|
48 |
+
<th rowspan="<?php echo $mergedCells; ?>" class="a-center"><span class="nobr"><?php echo $this->__('Move to Wishlist') ?></span></th>
|
49 |
+
<?php endif ?>
|
50 |
+
<th class="a-center" colspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo $this->__('Unit Price') ?></span></th>
|
51 |
+
<th rowspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Qty') ?></th>
|
52 |
+
<th class="a-center" colspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Subtotal') ?></th>
|
53 |
+
<th rowspan="<?php echo $mergedCells; ?>" class="a-center"> </th>
|
54 |
+
</tr>
|
55 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
56 |
+
<tr>
|
57 |
+
<th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
58 |
+
<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
59 |
+
<th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
60 |
+
<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
61 |
+
</tr>
|
62 |
+
<?php endif; ?>
|
63 |
+
</thead>
|
64 |
+
<tfoot>
|
65 |
+
<tr>
|
66 |
+
<td colspan="50" class="a-right">
|
67 |
+
<?php if($this->getContinueShoppingUrl()): ?>
|
68 |
+
<button type="button" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Continue Shopping')) ?>" class="button btn-continue" onclick="setLocation('<?php echo Mage::helper('core')->quoteEscape($this->getContinueShoppingUrl()) ?>')"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
|
69 |
+
<?php endif; ?>
|
70 |
+
<button type="submit" name="update_cart_action" value="update_qty" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Update Shopping Cart')); ?>" class="button btn-update"><span><span><?php echo $this->__('Update Shopping Cart'); ?></span></span></button>
|
71 |
+
<button type="submit" name="update_cart_action" value="empty_cart" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Clear Shopping Cart')); ?>" class="button btn-empty" id="empty_cart_button"><span><span><?php echo $this->__('Clear Shopping Cart'); ?></span></span></button>
|
72 |
+
<!--[if lt IE 8]>
|
73 |
+
<input type="hidden" id="update_cart_action_container" />
|
74 |
+
<script type="text/javascript">
|
75 |
+
//<![CDATA[
|
76 |
+
Event.observe(window, 'load', function()
|
77 |
+
{
|
78 |
+
// Internet Explorer (lt 8) does not support value attribute in button elements
|
79 |
+
$emptyCartButton = $('empty_cart_button');
|
80 |
+
$cartActionContainer = $('update_cart_action_container');
|
81 |
+
if ($emptyCartButton && $cartActionContainer) {
|
82 |
+
Event.observe($emptyCartButton, 'click', function()
|
83 |
+
{
|
84 |
+
$emptyCartButton.setAttribute('name', 'update_cart_action_temp');
|
85 |
+
$cartActionContainer.setAttribute('name', 'update_cart_action');
|
86 |
+
$cartActionContainer.setValue('empty_cart');
|
87 |
+
});
|
88 |
+
}
|
89 |
+
|
90 |
+
});
|
91 |
+
//]]>
|
92 |
+
</script>
|
93 |
+
<![endif]-->
|
94 |
+
</td>
|
95 |
+
</tr>
|
96 |
+
</tfoot>
|
97 |
+
<tbody>
|
98 |
+
<?php foreach($this->getItems() as $_item): ?>
|
99 |
+
<?php echo $this->getItemHtml($_item) ?>
|
100 |
+
<?php endforeach ?>
|
101 |
+
</tbody>
|
102 |
+
</table>
|
103 |
+
<script type="text/javascript">decorateTable('shopping-cart-table')</script>
|
104 |
+
</fieldset>
|
105 |
+
</form>
|
106 |
+
<div class="cart-collaterals">
|
107 |
+
<div class="col2-set">
|
108 |
+
<div class="col-1">
|
109 |
+
<?php echo $this->getChildHtml('crosssell') ?>
|
110 |
+
</div>
|
111 |
+
<div class="col-2">
|
112 |
+
<?php /* Extensions placeholder */ ?>
|
113 |
+
<?php echo $this->getChildHtml('checkout.cart.extra') ?>
|
114 |
+
<?php echo $this->getChildHtml('coupon') ?>
|
115 |
+
<?php if (!$this->getIsVirtual()): echo $this->getChildHtml('rushorder_cart'); endif; ?>
|
116 |
+
<?php if (!$this->getIsVirtual()): echo $this->getChildHtml('shipping'); endif; ?>
|
117 |
+
</div>
|
118 |
+
</div>
|
119 |
+
<div class="totals">
|
120 |
+
<?php echo $this->getChildHtml('totals'); ?>
|
121 |
+
<?php if(!$this->hasError()): ?>
|
122 |
+
<ul class="checkout-types">
|
123 |
+
<?php foreach ($this->getMethods('methods') as $method): ?>
|
124 |
+
<?php if ($methodHtml = $this->getMethodHtml($method)): ?>
|
125 |
+
<li><?php echo $methodHtml; ?></li>
|
126 |
+
<?php endif; ?>
|
127 |
+
<?php endforeach; ?>
|
128 |
+
</ul>
|
129 |
+
<?php endif; ?>
|
130 |
+
</div>
|
131 |
+
</div>
|
132 |
+
</div>
|
app/design/frontend/default/default/template/rushorder/checkout/cart/noItems.phtml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="page-title">
|
2 |
+
<h1><?php echo $this->__('Shopping Cart is Empty') ?></h1>
|
3 |
+
</div>
|
4 |
+
<div class="cart-empty">
|
5 |
+
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
6 |
+
<?php echo $this->getChildHtml('checkout_cart_empty_widget'); ?>
|
7 |
+
<p><?php echo $this->__('You have no items in your shopping cart.') ?></p>
|
8 |
+
<p><?php echo $this->__('Click <a href="%s">here</a> to continue shopping.', Mage::helper('core')->quoteEscape($this->getContinueShoppingUrl())) ?></p>
|
9 |
+
<?php echo $this->getChildHtml('shopping.cart.table.after'); ?>
|
10 |
+
</div>
|
app/design/frontend/default/default/template/rushorder/checkout/cart/rushorder-cart.phtml
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="rushorder-cart">
|
2 |
+
<form id="rushorderForm" action="<?php echo $this->getUrl('rushorder/index/applyrushorder'); ?>" method="post">
|
3 |
+
<div class="discount">
|
4 |
+
<h2><?php echo $this->__('Rush order') ?></h2>
|
5 |
+
<div class="discount-form">
|
6 |
+
<label for="coupon_code"><?php echo Mage::getStoreConfig('rushorder/configuration/cartdesc'); ?></label>
|
7 |
+
<div class="input-box">
|
8 |
+
<?php if(Mage::getSingleton('core/session')->getRushorderapply() == 'rapply') { ?>
|
9 |
+
<input type="checkbox" checked class="rushorderchk required-entry" style="margin-right: 3px;" name="rushorderapply" value="1"> <?php echo Mage::getStoreConfig('rushorder/configuration/title'); ?><br>
|
10 |
+
<?php } else { ?>
|
11 |
+
<input type="checkbox" id="rushorderapply" class="rushorderchk required-entry" style="margin-right: 3px;" name="rushorderapply" value="1"> <?php echo Mage::getStoreConfig('rushorder/configuration/title'); ?><br>
|
12 |
+
<?php } ?>
|
13 |
+
<div id="rushorderapplyval" style="display: none;" class="validation-advice">This is a required field.</div>
|
14 |
+
|
15 |
+
</div>
|
16 |
+
<div class="buttons-set">
|
17 |
+
<button type="submit" name="applyrushorder" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Apply')) ?>" class="button" onclick="return validationchk()" value="<?php echo Mage::helper('core')->quoteEscape($this->__('Apply')) ?>"><span><span><?php echo $this->__('Apply') ?></span></span></button>
|
18 |
+
|
19 |
+
<button type="submit" name="resetrushorder" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Reset')) ?>" class="button" value="<?php echo Mage::helper('core')->quoteEscape($this->__('Reset')) ?>"><span><span><?php echo $this->__('Reset') ?></span></span></button>
|
20 |
+
</div>
|
21 |
+
</div>
|
22 |
+
</div>
|
23 |
+
</form>
|
24 |
+
</div>
|
25 |
+
|
26 |
+
<script type="text/javascript">
|
27 |
+
|
28 |
+
// Custom validation for checkbox in cart page
|
29 |
+
|
30 |
+
function validationchk(){
|
31 |
+
var remember = document.getElementById('rushorderapply');
|
32 |
+
if (remember.checked){
|
33 |
+
// check box is checked
|
34 |
+
return true;
|
35 |
+
}else{
|
36 |
+
// check box is not checked
|
37 |
+
document.getElementById('rushorderapplyval').style.display = "block";
|
38 |
+
return false;
|
39 |
+
}
|
40 |
+
}
|
41 |
+
</script>
|
app/design/frontend/default/default/template/rushorder/checkout/onepage/progress/shipping_method.phtml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ($this->getCheckout()->getStepData('shipping_method', 'complete')): ?>
|
2 |
+
<dt class="complete">
|
3 |
+
<?php echo $this->__('Shipping Method') ?> <span class="changelink"><span class="separator">|</span> <a
|
4 |
+
href="#shipping_method"
|
5 |
+
onclick="checkout.changeSection('opc-shipping_method'); return false;"><?php echo $this->__('Change') ?></a></span>
|
6 |
+
</dt>
|
7 |
+
<dd class="complete">
|
8 |
+
<?php if ($this->getShippingMethod()): ?>
|
9 |
+
<?php echo $this->getShippingDescription() ?>
|
10 |
+
|
11 |
+
<?php $_excl = $this->getShippingPriceExclTax(); ?>
|
12 |
+
<?php $_incl = $this->getShippingPriceInclTax(); ?>
|
13 |
+
<?php if ($this->helper('tax')->displayShippingPriceIncludingTax()): ?>
|
14 |
+
<?php echo $_incl; ?>
|
15 |
+
<?php else: ?>
|
16 |
+
<?php echo $_excl; ?>
|
17 |
+
<?php endif; ?>
|
18 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
19 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
20 |
+
<?php endif; ?>
|
21 |
+
<?php else: ?>
|
22 |
+
<?php echo $this->__('Shipping method has not been selected yet') ?>
|
23 |
+
<?php endif; ?>
|
24 |
+
</dd>
|
25 |
+
<!-- Rushorder Text -->
|
26 |
+
<?php if(Mage::getSingleton('core/session')->getRushOrder() && $this->getShippingMethod()): ?>
|
27 |
+
<?php $helper = Mage::helper('rushorder'); ?>
|
28 |
+
<span class="rushorder-amount"><strong><?php echo $helper->getRushOrderTitle(); ?></strong> - <?php echo $helper->getRushOrderPricehtml(); ?>
|
29 |
+
<?php endif; ?>
|
30 |
+
<!-- Rushorder Text -->
|
31 |
+
<?php else: ?>
|
32 |
+
<dt>
|
33 |
+
<?php echo $this->__('Shipping Method') ?>
|
34 |
+
</dt>
|
35 |
+
<?php endif; ?>
|
36 |
+
|
37 |
+
|
app/design/frontend/default/default/template/rushorder/checkout/onepage/shipping_method/additional.phtml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if (!$this->getQuote()->isVirtual()): ?>
|
2 |
+
<?php echo $this->helper('giftmessage/message')->getInline('onepage_checkout', $this->getQuote(), $this->getDontDisplayContainer()) ?>
|
3 |
+
<?php endif; ?>
|
4 |
+
<!-- Rushorder Enabled -->
|
5 |
+
<?php if(Mage::getSingleton('core/session')->getRushorderapply() == 'rapply') { ?>
|
6 |
+
<input type="checkbox" checked name="shipping_rushorder" class="additional-amount-box" value="1"/> <?php echo Mage::getStoreConfig('rushorder/configuration/title'); ?>
|
7 |
+
<?php } else { ?>
|
8 |
+
<input type="checkbox" name="shipping_rushorder" class="additional-amount-box" value="1"/> <?php echo Mage::getStoreConfig('rushorder/configuration/title'); ?>
|
9 |
+
<?php } ?>
|
app/design/frontend/rwd/default/layout/rushorder.xml
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<layout version="0.1.0">
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Commerce Pundit Technologies
|
17 |
+
* @package CP_Rushorder
|
18 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
19 |
+
* @author <<Niranjan Gondaliya>>
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
|
24 |
+
<sales_order_view>
|
25 |
+
<reference name="order_totals">
|
26 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
27 |
+
</reference>
|
28 |
+
</sales_order_view>
|
29 |
+
<sales_order_print>
|
30 |
+
<reference name="order_totals">
|
31 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
32 |
+
</reference>
|
33 |
+
</sales_order_print>
|
34 |
+
<sales_email_order_items>
|
35 |
+
<reference name="order_totals">
|
36 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
37 |
+
</reference>
|
38 |
+
</sales_email_order_items>
|
39 |
+
|
40 |
+
<sales_order_invoice>
|
41 |
+
<reference name="invoice_totals">
|
42 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
43 |
+
</reference>
|
44 |
+
</sales_order_invoice>
|
45 |
+
<sales_order_printinvoice>
|
46 |
+
<reference name="invoice_totals">
|
47 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
48 |
+
</reference>
|
49 |
+
</sales_order_printinvoice>
|
50 |
+
<sales_email_order_invoice_items>
|
51 |
+
<reference name="invoice_totals">
|
52 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
53 |
+
</reference>
|
54 |
+
</sales_email_order_invoice_items>
|
55 |
+
|
56 |
+
<sales_order_creditmemo>
|
57 |
+
<reference name="creditmemo_totals">
|
58 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
59 |
+
</reference>
|
60 |
+
</sales_order_creditmemo>
|
61 |
+
<sales_order_printcreditmemo>
|
62 |
+
<reference name="creditmemo_totals">
|
63 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
64 |
+
</reference>
|
65 |
+
</sales_order_printcreditmemo>
|
66 |
+
<sales_email_order_creditmemo_items>
|
67 |
+
<reference name="creditmemo_totals">
|
68 |
+
<block type="rushorder/sales_order_rushorder" name="rushorder" />
|
69 |
+
</reference>
|
70 |
+
</sales_email_order_creditmemo_items>
|
71 |
+
|
72 |
+
<checkout_cart_index>
|
73 |
+
<reference name="checkout.cart">
|
74 |
+
<action method="setCartTemplate"><value>rushorder/checkout/cart.phtml</value></action>
|
75 |
+
<action method="setEmptyTemplate"><value>rushorder/checkout/cart/noItems.phtml</value></action>
|
76 |
+
<action method="chooseTemplate"/>
|
77 |
+
<block type="core/template" name="rushorder.cart" as="rushorder_cart" template="rushorder/checkout/cart/rushorder-cart.phtml"/>
|
78 |
+
</reference>
|
79 |
+
</checkout_cart_index>
|
80 |
+
|
81 |
+
<checkout_onepage_additional>
|
82 |
+
<reference name="root">
|
83 |
+
<action method="setTemplate">
|
84 |
+
<template>rushorder/checkout/onepage/shipping_method/additional.phtml</template>
|
85 |
+
</action>
|
86 |
+
</reference>
|
87 |
+
</checkout_onepage_additional>
|
88 |
+
|
89 |
+
<!-- <checkout_onepage_progress_shipping_method>
|
90 |
+
<reference name="root">
|
91 |
+
<action method="setTemplate">
|
92 |
+
<template>rushorder/checkout/onepage/progress/shipping_method.phtml</template>
|
93 |
+
</action>
|
94 |
+
</reference>
|
95 |
+
</checkout_onepage_progress_shipping_method> -->
|
96 |
+
</layout>
|
app/design/frontend/rwd/default/template/rushorder/checkout/cart.phtml
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $_priceDisplay = ($this->helper('tax')->displayCartBothPrices()) ? 'display-both-prices' : 'display-single-price'; ?>
|
2 |
+
<div class="cart <?php echo $_priceDisplay; ?>">
|
3 |
+
<div class="page-title title-buttons">
|
4 |
+
<h1><?php echo $this->__('Shopping Cart') ?></h1>
|
5 |
+
<?php if(!$this->hasError()): ?>
|
6 |
+
<ul class="checkout-types top">
|
7 |
+
<?php foreach ($this->getMethods('top_methods') as $method): ?>
|
8 |
+
<?php if ($methodHtml = $this->getMethodHtml($method)): ?>
|
9 |
+
<li><?php echo $methodHtml; ?></li>
|
10 |
+
<?php endif; ?>
|
11 |
+
<?php endforeach; ?>
|
12 |
+
</ul>
|
13 |
+
<?php endif; ?>
|
14 |
+
</div>
|
15 |
+
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
16 |
+
<?php echo $this->getChildHtml('form_before') ?>
|
17 |
+
<form action="<?php echo $this->getFormActionUrl() ?>" method="post">
|
18 |
+
<?php echo $this->getBlockHtml('formkey'); ?>
|
19 |
+
<table id="shopping-cart-table" class="cart-table data-table">
|
20 |
+
<col width="1" />
|
21 |
+
<col width="1" />
|
22 |
+
<col width="1" />
|
23 |
+
<col width="1" />
|
24 |
+
<col width="1" />
|
25 |
+
<col width="1" />
|
26 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
27 |
+
<col width="1" />
|
28 |
+
<col width="1" />
|
29 |
+
<?php endif; ?>
|
30 |
+
|
31 |
+
<?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
|
32 |
+
<thead>
|
33 |
+
<tr>
|
34 |
+
<th rowspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo $this->__('Product') ?></span></th>
|
35 |
+
|
36 |
+
<th rowspan="<?php echo $mergedCells; ?>"> </th>
|
37 |
+
|
38 |
+
<th class="a-center cart-price-head" colspan="<?php echo $mergedCells; ?>">
|
39 |
+
<!-- <div class="cart-price-placeholder">-->
|
40 |
+
<span class="nobr"><?php echo $this->__('Price') ?></span>
|
41 |
+
<!-- </div>-->
|
42 |
+
</th>
|
43 |
+
|
44 |
+
<th rowspan="<?php echo $mergedCells; ?>" class="a-center">
|
45 |
+
<?php echo $this->__('Qty') ?>
|
46 |
+
|
47 |
+
<?php /*if ($this->helper('wishlist')->isAllowInCart()) : ?>
|
48 |
+
<span class="nobr"><?php echo $this->__('Move to Wishlist') ?></span>
|
49 |
+
<?php endif*/ ?>
|
50 |
+
|
51 |
+
</th>
|
52 |
+
|
53 |
+
<th class="a-center cart-total-head" colspan="<?php echo $mergedCells; ?>">
|
54 |
+
<!-- <div class="cart-total-placeholder">-->
|
55 |
+
<?php echo $this->__('Subtotal') ?>
|
56 |
+
<!-- </div>-->
|
57 |
+
</th>
|
58 |
+
|
59 |
+
<th class="a-center" rowspan="<?php echo $mergedCells; ?>"> </th>
|
60 |
+
|
61 |
+
</tr>
|
62 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
63 |
+
<tr>
|
64 |
+
<th class="a-center cart-price-head"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
65 |
+
<th class="a-center cart-price-head"><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
66 |
+
<th class="a-center cart-total-head"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
67 |
+
<th class="a-center cart-total-head"><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
68 |
+
</tr>
|
69 |
+
<?php endif; ?>
|
70 |
+
</thead>
|
71 |
+
<tfoot>
|
72 |
+
<tr>
|
73 |
+
<td colspan="50" class="a-right cart-footer-actions">
|
74 |
+
|
75 |
+
<!-- Make this button the first responder rather than empty cart -->
|
76 |
+
<button type="submit" style="visibility:hidden;" data-cart-item-update name="update_cart_action" value="update_qty" title="<?php echo $this->quoteEscape($this->__('Update Shopping Cart')); ?>" class="button2 btn-update"><span><span><?php echo $this->__('Update Shopping Cart'); ?></span></span></button>
|
77 |
+
|
78 |
+
<button type="submit" name="update_cart_action" data-cart-empty value="empty_cart" title="<?php echo $this->quoteEscape($this->__('Empty Cart')); ?>" class="button2 btn-empty" id="empty_cart_button"><span><span><?php echo $this->__('Empty Cart'); ?></span></span></button>
|
79 |
+
|
80 |
+
<button type="submit" name="update_cart_action" data-cart-item-update value="update_qty" title="<?php echo $this->quoteEscape($this->__('Update Shopping Cart')); ?>" class="button2 btn-update"><span><span><?php echo $this->__('Update Shopping Cart'); ?></span></span></button>
|
81 |
+
|
82 |
+
<span class="or">-<?php echo $this->__('or'); ?>-</span>
|
83 |
+
|
84 |
+
<?php if($this->getContinueShoppingUrl()): ?>
|
85 |
+
<button type="button" title="<?php echo $this->quoteEscape($this->__('Continue Shopping')) ?>" class="button2 btn-continue" onclick="setLocation('<?php echo Mage::helper('core')->quoteEscape($this->getContinueShoppingUrl()) ?>')"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
|
86 |
+
<?php endif; ?>
|
87 |
+
<!--[if lt IE 8]>
|
88 |
+
<input type="hidden" id="update_cart_action_container" data-cart-item-update />
|
89 |
+
<script type="text/javascript">
|
90 |
+
//<![CDATA[
|
91 |
+
Event.observe(window, 'load', function()
|
92 |
+
{
|
93 |
+
// Internet Explorer (lt 8) does not support value attribute in button elements
|
94 |
+
$emptyCartButton = $('empty_cart_button');
|
95 |
+
$cartActionContainer = $('update_cart_action_container');
|
96 |
+
if ($emptyCartButton && $cartActionContainer) {
|
97 |
+
Event.observe($emptyCartButton, 'click', function()
|
98 |
+
{
|
99 |
+
$emptyCartButton.setAttribute('name', 'update_cart_action_temp');
|
100 |
+
$cartActionContainer.setAttribute('name', 'update_cart_action');
|
101 |
+
$cartActionContainer.setValue('empty_cart');
|
102 |
+
});
|
103 |
+
}
|
104 |
+
|
105 |
+
});
|
106 |
+
//]]>
|
107 |
+
</script>
|
108 |
+
<![endif]-->
|
109 |
+
</td>
|
110 |
+
</tr>
|
111 |
+
</tfoot>
|
112 |
+
<tbody>
|
113 |
+
<?php foreach($this->getItems() as $_item): ?>
|
114 |
+
<?php echo $this->getItemHtml($_item) ?>
|
115 |
+
<?php endforeach ?>
|
116 |
+
</tbody>
|
117 |
+
</table>
|
118 |
+
<script type="text/javascript">decorateTable('shopping-cart-table')</script>
|
119 |
+
</form>
|
120 |
+
|
121 |
+
<?php echo $this->getChildHtml('shopping.cart.table.after'); ?>
|
122 |
+
<div class="cart-forms">
|
123 |
+
<?php /* Extensions placeholder */ ?>
|
124 |
+
<?php echo $this->getChildHtml('checkout_cart_widget') ?>
|
125 |
+
<?php echo $this->getChildHtml('coupon') ?>
|
126 |
+
<?php if (!$this->getIsVirtual()): echo $this->getChildHtml('rushorder_cart'); endif; ?>
|
127 |
+
<?php echo $this->getChildHtml('checkout.cart.extra') ?>
|
128 |
+
<?php if (!$this->getIsVirtual()): echo $this->getChildHtml('shipping'); endif; ?>
|
129 |
+
</div>
|
130 |
+
<div class="cart-totals-wrapper">
|
131 |
+
<div class="cart-totals">
|
132 |
+
<?php echo $this->getChildHtml('totals'); ?>
|
133 |
+
<?php if(!$this->hasError()): ?>
|
134 |
+
<ul class="checkout-types bottom">
|
135 |
+
<?php foreach ($this->getMethods('methods') as $method): ?>
|
136 |
+
<?php if ($methodHtml = $this->getMethodHtml($method)): ?>
|
137 |
+
<li class="method-<?php echo preg_replace("/[^_a-zA-Z0-9-]/", '-', $method); ?>"><?php echo $methodHtml; ?></li>
|
138 |
+
<?php endif; ?>
|
139 |
+
<?php endforeach; ?>
|
140 |
+
</ul>
|
141 |
+
<?php endif; ?>
|
142 |
+
</div>
|
143 |
+
</div>
|
144 |
+
<?php echo $this->getChildHtml('crosssell') ?>
|
145 |
+
</div>
|
app/design/frontend/rwd/default/template/rushorder/checkout/cart/noItems.phtml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="page-title">
|
2 |
+
<h1><?php echo $this->__('Shopping Cart is Empty') ?></h1>
|
3 |
+
</div>
|
4 |
+
<div class="cart-empty">
|
5 |
+
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
6 |
+
<?php echo $this->getChildHtml('checkout_cart_empty_widget'); ?>
|
7 |
+
<p><?php echo $this->__('You have no items in your shopping cart.') ?></p>
|
8 |
+
<p><?php echo $this->__('Click <a href="%s">here</a> to continue shopping.', Mage::helper('core')->quoteEscape($this->getContinueShoppingUrl())) ?></p>
|
9 |
+
<?php echo $this->getChildHtml('shopping.cart.table.after'); ?>
|
10 |
+
</div>
|
app/design/frontend/rwd/default/template/rushorder/checkout/cart/rushorder-cart.phtml
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="rushorder-cart">
|
2 |
+
<form id="rushorderForm" action="<?php echo $this->getUrl('rushorder/index/applyrushorder'); ?>" method="post">
|
3 |
+
<div class="discount">
|
4 |
+
<h2><?php echo $this->__('Rush order') ?></h2>
|
5 |
+
<div class="discount-form">
|
6 |
+
<label for="coupon_code"><?php echo Mage::getStoreConfig('rushorder/configuration/cartdesc'); ?></label>
|
7 |
+
<div class="input-box">
|
8 |
+
<?php if(Mage::getSingleton('core/session')->getRushorderapply() == 'rapply') { ?>
|
9 |
+
<input type="checkbox" checked class="rushorderchk required-entry" style="margin-right: 3px;" name="rushorderapply" value="1"> <?php echo Mage::getStoreConfig('rushorder/configuration/title'); ?><br>
|
10 |
+
<?php } else { ?>
|
11 |
+
<input type="checkbox" id="rushorderapply" class="rushorderchk required-entry" style="margin-right: 3px;" name="rushorderapply" value="1"> <?php echo Mage::getStoreConfig('rushorder/configuration/title'); ?><br>
|
12 |
+
<?php } ?>
|
13 |
+
<div id="rushorderapplyval" style="display: none;" class="validation-advice">This is a required field.</div>
|
14 |
+
|
15 |
+
</div>
|
16 |
+
<div class="buttons-set">
|
17 |
+
<button type="submit" name="applyrushorder" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Apply')) ?>" class="button" onclick="return validationchk()" value="<?php echo Mage::helper('core')->quoteEscape($this->__('Apply')) ?>"><span><span><?php echo $this->__('Apply') ?></span></span></button>
|
18 |
+
|
19 |
+
<button type="submit" name="resetrushorder" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Reset')) ?>" class="button" value="<?php echo Mage::helper('core')->quoteEscape($this->__('Reset')) ?>"><span><span><?php echo $this->__('Reset') ?></span></span></button>
|
20 |
+
</div>
|
21 |
+
</div>
|
22 |
+
</div>
|
23 |
+
</form>
|
24 |
+
</div>
|
25 |
+
|
26 |
+
<script type="text/javascript">
|
27 |
+
|
28 |
+
// Custom validation for checkbox in cart page
|
29 |
+
|
30 |
+
function validationchk(){
|
31 |
+
var remember = document.getElementById('rushorderapply');
|
32 |
+
if (remember.checked){
|
33 |
+
// check box is checked
|
34 |
+
return true;
|
35 |
+
}else{
|
36 |
+
// check box is not checked
|
37 |
+
document.getElementById('rushorderapplyval').style.display = "block";
|
38 |
+
return false;
|
39 |
+
}
|
40 |
+
}
|
41 |
+
</script>
|
app/design/frontend/rwd/default/template/rushorder/checkout/onepage/progress/shipping_method.phtml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ($this->getCheckout()->getStepData('shipping_method', 'complete')): ?>
|
2 |
+
<dt class="complete">
|
3 |
+
<?php echo $this->__('Shipping Method') ?> <span class="changelink"><span class="separator">|</span> <a
|
4 |
+
href="#shipping_method"
|
5 |
+
onclick="checkout.changeSection('opc-shipping_method'); return false;"><?php echo $this->__('Change') ?></a></span>
|
6 |
+
</dt>
|
7 |
+
<dd class="complete">
|
8 |
+
<?php if ($this->getShippingMethod()): ?>
|
9 |
+
<?php echo $this->getShippingDescription() ?>
|
10 |
+
|
11 |
+
<?php $_excl = $this->getShippingPriceExclTax(); ?>
|
12 |
+
<?php $_incl = $this->getShippingPriceInclTax(); ?>
|
13 |
+
<?php if ($this->helper('tax')->displayShippingPriceIncludingTax()): ?>
|
14 |
+
<?php echo $_incl; ?>
|
15 |
+
<?php else: ?>
|
16 |
+
<?php echo $_excl; ?>
|
17 |
+
<?php endif; ?>
|
18 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
19 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
20 |
+
<?php endif; ?>
|
21 |
+
<?php else: ?>
|
22 |
+
<?php echo $this->__('Shipping method has not been selected yet') ?>
|
23 |
+
<?php endif; ?>
|
24 |
+
</dd>
|
25 |
+
<!-- Rushorder Text -->
|
26 |
+
<?php if(Mage::getSingleton('core/session')->getRushOrder() && $this->getShippingMethod()): ?>
|
27 |
+
<?php $helper = Mage::helper('rushorder'); ?>
|
28 |
+
<span class="rushorder-amount"><strong><?php echo $helper->getRushOrderTitle(); ?></strong> - <?php echo $helper->getRushOrderPricehtml(); ?>
|
29 |
+
<?php endif; ?>
|
30 |
+
<!-- Rushorder Text -->
|
31 |
+
<?php else: ?>
|
32 |
+
<dt>
|
33 |
+
<?php echo $this->__('Shipping Method') ?>
|
34 |
+
</dt>
|
35 |
+
<?php endif; ?>
|
36 |
+
|
37 |
+
|
app/design/frontend/rwd/default/template/rushorder/checkout/onepage/shipping_method/additional.phtml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if (!$this->getQuote()->isVirtual()): ?>
|
2 |
+
<?php echo $this->helper('giftmessage/message')->getInline('onepage_checkout', $this->getQuote(), $this->getDontDisplayContainer()) ?>
|
3 |
+
<?php endif; ?>
|
4 |
+
<!-- Rushorder Enabled -->
|
5 |
+
<?php if(Mage::getSingleton('core/session')->getRushorderapply() == 'rapply') { ?>
|
6 |
+
<input type="checkbox" checked name="shipping_rushorder" class="additional-amount-box" value="1"/> <?php echo Mage::getStoreConfig('rushorder/configuration/title'); ?>
|
7 |
+
<?php } else { ?>
|
8 |
+
<input type="checkbox" name="shipping_rushorder" class="additional-amount-box" value="1"/> <?php echo Mage::getStoreConfig('rushorder/configuration/title'); ?>
|
9 |
+
<?php } ?>
|
app/etc/modules/CP_Rushorder.xml
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Commerce Pundit Technologies
|
17 |
+
* @package CP_Rushorder
|
18 |
+
* @copyright Copyright (c) 2016 Commerce Pundit Technologies. (http://www.commercepundit.com)
|
19 |
+
* @author <<Niranjan Gondaliya>>
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
|
24 |
+
<config>
|
25 |
+
<modules>
|
26 |
+
<CP_Rushorder>
|
27 |
+
<active>true</active>
|
28 |
+
<codePool>community</codePool>
|
29 |
+
<depends>
|
30 |
+
<Mage_Sales />
|
31 |
+
</depends>
|
32 |
+
</CP_Rushorder>
|
33 |
+
</modules>
|
34 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>CP_Rushorder</name>
|
4 |
+
<version>0.1.5</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Rush Order extension by Commerce Pundit will help you to add additional options for your order.</summary>
|
10 |
+
<description>Using Rush Order admin can add additional fees to extra order services. Customer can choose in cart page as well as in checkout shipping steps.</description>
|
11 |
+
<notes>CP_Rushorder</notes>
|
12 |
+
<authors><author><name>Commerce Pundit</name><user>CPExtensions</user><email>support@commercepundit.com</email></author></authors>
|
13 |
+
<date>2016-01-30</date>
|
14 |
+
<time>05:57:56</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="CP"><dir name="Rushorder"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Create"><dir name="Totals"><file name="Rushorder.php" hash="2986dd77a517b37b4528deaf57e04874"/></dir></dir></dir></dir></dir><dir name="Checkout"><dir name="Totals"><file name="Rushorder.php" hash="0bcf747b187f79f54e14f35d71efdb8f"/></dir></dir><dir name="Sales"><dir name="Order"><file name="Rushorder.php" hash="22e8446cbef9bdd42478281f8ca69544"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="fc6676f720f04c8b4d7a51218b7526ac"/></dir><dir name="Model"><file name="Observer.php" hash="df1301cbbb8669db428c6294395bdc4f"/><file name="Rushorder.php" hash="f94a3cf9ad5d18f5f8adc5775842efe5"/><dir name="Sales"><dir name="Order"><dir name="Total"><dir name="Creditmemo"><file name="Rushorder.php" hash="4f5cd91fff82899e2ffd7ae3c86bc685"/></dir><dir name="Invoice"><file name="Rushorder.php" hash="74af5df0e3a7ba5cebada54de4229281"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Rushorder.php" hash="a6820802de54d09bdc83ab7e5a4a3620"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="c0b2985c345aa89e955ada00a59a5cc3"/><file name="OnepageController.php" hash="88de7eb72b2cd0f419fa5b9bd48ac9bb"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f76553c2a2d0359e6e94b85ffda968d0"/><file name="config.xml" hash="5d92a29f2d8153097b4f7b81e5af6653"/><file name="system.xml" hash="eb9321966f618b9f50e9df8460bd5830"/></dir><dir name="sql"><dir name="rushorder_setup"><file name="mysql4-install-0.1.0.php" hash="15a6774b640498d59e75b465d2582a84"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="eb7a53ca3981988aa5d54b8d5a332ca6"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="5d9e2cf6230bf24d4255d7c93fa2db3c"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="1956732387a4189188b8789b71da0e9a"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="d5bc27a359c3fdadaec03e23edd71afd"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="15a2af651a123a244e1f05d05621e79e"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="CP_Rushorder.xml" hash="5c9dd91a9c69d2b561336ea18b6e8555"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="rushorder.xml" hash="bbf67ae1baa75ef3f47033f63c2f39f3"/></dir><dir name="template"><dir name="rushorder"><dir name="sales"><dir name="order"><file name="refunded.phtml" hash="fbbbe529cf423e78e87098ff07631315"/><file name="total.phtml" hash="0af492c3452e5af7add4180c2ea6429a"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="rushorder.xml" hash="103ad5d9a20eba3b66f15e732bcede1a"/></dir><dir name="template"><dir name="rushorder"><dir name="checkout"><dir name="cart"><file name="noItems.phtml" hash="27d395af1561ac393a07d05e2a6c54dd"/><file name="rushorder-cart.phtml" hash="c4b9cf5815eaba5c1643e48a0982362b"/></dir><file name="cart.phtml" hash="d4b4d4a80c8a3dd204e3590bb316d40c"/><dir name="onepage"><dir name="progress"><file name="shipping_method.phtml" hash="1c63b56ab5fe453269207902504b2c58"/></dir><dir name="shipping_method"><file name="additional.phtml" hash="77ac530db6de1e94615ae9a7cc0565dd"/></dir></dir></dir></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="layout"><file name="rushorder.xml" hash="103ad5d9a20eba3b66f15e732bcede1a"/></dir><dir name="template"><dir name="rushorder"><dir name="checkout"><dir name="cart"><file name="noItems.phtml" hash="27d395af1561ac393a07d05e2a6c54dd"/><file name="rushorder-cart.phtml" hash="c4b9cf5815eaba5c1643e48a0982362b"/></dir><file name="cart.phtml" hash="1e8ea0b63960e2f29648c21aba3e5ab1"/><dir name="onepage"><dir name="progress"><file name="shipping_method.phtml" hash="1c63b56ab5fe453269207902504b2c58"/></dir><dir name="shipping_method"><file name="additional.phtml" hash="77ac530db6de1e94615ae9a7cc0565dd"/></dir></dir></dir></dir></dir></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|