Wizard_MassStatus - Version 1.0.0

Version Notes

New Extension

Download this release

Release Info

Developer Sujeet Kr Singh
Extension Wizard_MassStatus
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/Wizard/DeliveryPin/Block/Adminhtml/Addupdate.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class GT_DeliveryPin_Block_Adminhtml_Addupdate extends Mage_Adminhtml_Block_Template
4
+ {
5
+ public function __construct()
6
+ {
7
+
8
+ }
9
+ }
app/code/community/Wizard/DeliveryPin/Helper/Data.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento GoTechy Admin Status Module
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Gotechy
22
+ * @package GT_MassStatus
23
+ * @copyright Copyright (c) 2014 GoTechy (http://www.gotechy.in)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ *
26
+ **/
27
+ class GT_DeliveryPin_Helper_Data extends Mage_Core_Helper_Abstract{
28
+ }
app/code/community/Wizard/DeliveryPin/controllers/Adminhtml/DeliverypinController.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento GoTechy Admin Status Module
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Gotechy
22
+ * @package GT_MassStatus
23
+ * @copyright Copyright (c) 2014 GoTechy (http://www.gotechy.in)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ *
26
+ **/
27
+
28
+ class GT_DeliveryPin_Adminhtml_DeliverypinController extends Mage_Adminhtml_Controller_Action{
29
+
30
+
31
+ public function indexAction(){
32
+ $this->loadLayout();
33
+ $this->_title($this->__('Add/Update'))->_title($this->__('Delivery PIN'));
34
+ $this->_setActiveMenu('deliverypin/addupdate');
35
+ $this->_addContent($this->getLayout()->createBlock('adminhtml/template')->setTemplate('deliverypin/addupdate.phtml'));
36
+
37
+
38
+ $this->renderLayout();
39
+ }
40
+
41
+ public function uploadAction(){
42
+ $uploader = new Varien_File_Uploader('csvfile');
43
+ $uploader->setAllowedExtensions(array('csv'));
44
+ $uploader->setAllowRenameFiles(false);
45
+ $uploader->setFilesDispersion(false);
46
+ $path = Mage::getBaseDir().'/var/deliverypin';
47
+ $fileName = $_FILES['csvfile']['name'];
48
+ $ext = explode('.', $fileName);
49
+ $ext = array_pop($ext);
50
+ //print_r($uploader->save($path, "pincodes.".$ext));
51
+
52
+ $this->_getSession()->addSuccess($this->__("File saved successfully!"));
53
+ $this->_redirect('*/deliverypin/index');
54
+ }
55
+
56
+ public function downloadAction(){
57
+ $filepath = Mage::getBaseDir().'/var/deliverypin/pincodes.csv';
58
+ if (! is_file ( $filepath ) || ! is_readable ( $filepath )) {
59
+ $this->_getSession()->addSuccess($this->__("File not available!"));
60
+ $this->_redirect('*/deliverypin/index');
61
+ }
62
+ $this->getResponse ()
63
+ ->setHttpResponseCode ( 200 )
64
+ ->setHeader ( 'Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true )
65
+ ->setHeader ( 'Pragma', 'public', true )
66
+ ->setHeader ( 'Content-type', 'application/force-download' )
67
+ ->setHeader ( 'Content-Length', filesize($filepath) )
68
+ ->setHeader ('Content-Disposition', 'attachment' . '; filename=' . basename($filepath) );
69
+ $this->getResponse ()->clearBody ();
70
+ $this->getResponse ()->sendHeaders ();
71
+ readfile ( $filepath );
72
+ exit;
73
+ }
74
+
75
+ }
app/code/community/Wizard/DeliveryPin/controllers/PinController.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento GoTechy Admin Status Module
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Gotechy
22
+ * @package GT_MassStatus
23
+ * @copyright Copyright (c) 2014 GoTechy (http://www.gotechy.in)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ *
26
+ **/
27
+
28
+ class GT_DeliveryPin_PinController extends Mage_Core_Controller_Front_Action{
29
+
30
+ public function validateAction(){
31
+ $pin=$this->getRequest()->getParam('pin');
32
+ $file = Mage::getBaseDir().'/var/deliverypin/pincodes.csv';
33
+ $csv = new Varien_File_Csv();
34
+ $data = $csv->getData($file);
35
+ $skipHead=true;
36
+ $result=array();
37
+ foreach($data as $row){
38
+ if($skipHead) {
39
+ $skipHead=false;
40
+ continue;
41
+ }
42
+ if($row[0]==$pin){
43
+ $result=$row;
44
+ }
45
+ }
46
+
47
+ echo json_encode($result);
48
+ }
49
+ }
app/code/community/Wizard/DeliveryPin/etc/adminhtml.xml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <menu>
4
+ <deliverypin>
5
+ <title>Delivery PIN</title>
6
+ <sort_order>100</sort_order>
7
+ <children>
8
+ <addupdate>
9
+ <title>Add/Update</title>
10
+ <sort_order>1</sort_order>
11
+ <action>adminhtml/deliverypin/index</action>
12
+ </addupdate>
13
+ </children>
14
+ </deliverypin>
15
+ </menu>
16
+ </config>
app/code/community/Wizard/DeliveryPin/etc/config.xml ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ * Magento GoTechy Admin Status Module
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Gotechy
22
+ * @package GT_DeliveryPin
23
+ * @copyright Copyright (c) 2014 GoTechy (http://www.gotechy.in)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ *
26
+ -->
27
+ <config>
28
+ <modules>
29
+ <GT_DeliveryPin>
30
+ <version>0.0.1</version>
31
+ </GT_DeliveryPin>
32
+ </modules>
33
+ <global>
34
+ <helpers>
35
+ <gt_DeliveryPin>
36
+ <class>GT_DeliveryPin_Helper</class>
37
+ </gt_DeliveryPin>
38
+ </helpers>
39
+ <blocks>
40
+ <gt_DeliveryPin>
41
+ <class>GT_DeliveryPin_Block</class>
42
+ </gt_DeliveryPin>
43
+ </blocks>
44
+
45
+ </global>
46
+ <admin>
47
+ <routers>
48
+ <adminhtml>
49
+ <args>
50
+ <modules>
51
+ <gt_deliverypin before="Mage_Adminhtml">GT_DeliveryPin_Adminhtml</gt_deliverypin>
52
+ </modules>
53
+ </args>
54
+ </adminhtml>
55
+ </routers>
56
+ </admin>
57
+ <frontend>
58
+ <routers>
59
+ <deliverypin>
60
+ <use>standard</use>
61
+ <args>
62
+ <module>GT_DeliveryPin</module>
63
+ <frontName>deliverypin</frontName>
64
+ </args>
65
+ </deliverypin>
66
+ </routers>
67
+ </frontend>
68
+ <adminhtml>
69
+ <default>
70
+ <deliverypin>
71
+ <condition_name>deliverypin</condition_name>
72
+ </deliverypin>
73
+ </default>
74
+
75
+ <acl>
76
+ <resources>
77
+ <admin>
78
+ <children>
79
+ <deliverypin>
80
+ <title>Delivery PIN Menu Item</title>
81
+ <children>
82
+ <addupdate translate="title" module="deliverypin">
83
+ <title>Add Update Menu Item</title>
84
+ </addupdate>
85
+ </children>
86
+ </deliverypin>
87
+ </children>
88
+ </admin>
89
+ </resources>
90
+ </acl>
91
+ </adminhtml>
92
+ </config>
app/code/community/Wizard/DeliveryPin/etc/system.xml2 ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ * Magento GoTechy Admin Status Module
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Gotechy
22
+ * @package GT_MassStatus
23
+ * @copyright Copyright (c) 2014 GoTechy (http://www.gotechy.in)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ *
26
+ **/
27
+ -->
28
+ <config>
29
+ <sections>
30
+ <deliverypin translate="label" module="gt_massstatus">
31
+ <label>GT Delivery PIN</label>
32
+ <tab>sales</tab>
33
+ <frontend_type>text</frontend_type>
34
+ <sort_order>301</sort_order>
35
+ <show_in_default>1</show_in_default>
36
+ <show_in_website>1</show_in_website>
37
+ <show_in_store>1</show_in_store>
38
+ <groups>
39
+ <delivery_settings translate="label">
40
+ <label>GT Delivery PIN Settings</label>
41
+ <frontend_type>text</frontend_type>
42
+ <sort_order>2</sort_order>
43
+ <show_in_default>1</show_in_default>
44
+ <show_in_website>1</show_in_website>
45
+ <show_in_store>1</show_in_store>
46
+
47
+ <fields>
48
+ <active translate="label">
49
+ <label>Enabled</label>
50
+ <frontend_type>select</frontend_type>
51
+ <source_model>adminhtml/system_config_source_yesno</source_model>
52
+ <sort_order>0</sort_order>
53
+ <show_in_default>1</show_in_default>
54
+ <show_in_website>1</show_in_website>
55
+ <show_in_store>1</show_in_store>
56
+ </active>
57
+ <csvfile translate="label">
58
+ <label>Upload File</label>
59
+ <comment><![CDATA[Upload csv file of pin codes. Columns of csv file must be [pin,city,state].]]></comment>
60
+ <frontend_type>file</frontend_type>
61
+ <backend_model>adminhtml/system_config_backend_file</backend_model>
62
+ <upload_dir>var/uploads</upload_dir>
63
+ <sort_order>1</sort_order>
64
+ <show_in_default>1</show_in_default>
65
+ <show_in_website>1</show_in_website>
66
+ <show_in_store>1</show_in_store>
67
+ </csvfile>
68
+ </fields>
69
+ </delivery_settings>
70
+
71
+ </groups>
72
+ </deliverypin>
73
+ </sections>
74
+ </config>
app/code/community/Wizard/MassStatus/Block/Sales/Order/Grid.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento Wizard Admin Mass Status Module
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Wizard
22
+ * @package Wizard_MassStatus
23
+ * @copyright Copyright (c) 2015 Wizard (http://www.sujeetkrsingh.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ *
26
+ **/
27
+ class Wizard_MassStatus_Block_Sales_Order_Grid extends Mage_Adminhtml_Block_Sales_Order_Grid
28
+ {
29
+ protected function _prepareMassaction()
30
+ {
31
+ parent::_prepareMassaction();
32
+ if (Mage::getStoreConfig("mass_status/export_orders/active")) {
33
+
34
+ $orderStatus=Mage::getModel('sales/order_status')->getResourceCollection()->getData();
35
+
36
+ foreach($orderStatus as $status){
37
+ // if($status['status']!='canceled'){
38
+ $this->getMassactionBlock()->addItem('status'.$status['status'], array(
39
+ 'label'=> Mage::helper('sales')->__($status['label']),
40
+ 'url' => $this->getUrl('*/massstatus/change').'?status='.$status['status'].'&label='.$status['label']
41
+ ));
42
+ // }
43
+ }
44
+
45
+ $this->getMassactionBlock()->addItem('statusDelete', array(
46
+ 'label'=> Mage::helper('sales')->__('Delete'),
47
+ 'url' => $this->getUrl('*/massstatus/delete')
48
+ ));
49
+
50
+
51
+ }
52
+
53
+ }
54
+ }
55
+ ?>
app/code/community/Wizard/MassStatus/Helper/Data.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento Wizard Admin Mass Status Module
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Wizard
22
+ * @package Wizard_MassStatus
23
+ * @copyright Copyright (c) 2015 Wizard (http://www.sujeetkrsingh.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ *
26
+ **/
27
+ class Wizard_MassStatus_Helper_Data extends Mage_Core_Helper_Abstract{
28
+ }
app/code/community/Wizard/MassStatus/controllers/Adminhtml/MassstatusController.php ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento Wizard Admin Mass Status Module
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Wizard
22
+ * @package Wizard_MassStatus
23
+ * @copyright Copyright (c) 2015 Wizard (http://www.sujeetkrsingh.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ *
26
+ **/
27
+
28
+ class Wizard_MassStatus_Adminhtml_MassstatusController extends Mage_Adminhtml_Controller_Action{
29
+
30
+ public function changeAction(){
31
+ $orderIds = $this->getRequest()->getPost('order_ids', array());
32
+ $status=$this->getRequest()->getParam('status');
33
+ $label=$this->getRequest()->getParam('label');
34
+
35
+ foreach ($orderIds as $orderId) {
36
+ $order=Mage::getModel('sales/order')->load($orderId);
37
+ // if($order->getData('status')!='canceled'){
38
+ $order->setStatus($status);
39
+ $order->save();
40
+ // }
41
+
42
+ }
43
+
44
+ $this->_getSession()->addSuccess($this->__('Status of %s order(s) have been changed to '.$label.'.', count($orderIds)));
45
+ $this->_redirect('*/sales_order/index');
46
+ }
47
+
48
+ public function deleteAction()
49
+ {
50
+
51
+ $orderIds = $this->getRequest()->getPost('order_ids');
52
+ $flag = false;
53
+ $write = Mage::getSingleton('core/resource')->getConnection('core_write');
54
+ $query="show tables";
55
+ $rsc_table=$write->fetchCol($query);
56
+
57
+ $table_sales_flat_order = Mage::getSingleton('core/resource')->getTableName('sales_flat_order');
58
+ $table_sales_flat_creditmemo_comment= Mage::getSingleton('core/resource')->getTableName('sales_flat_creditmemo_comment');
59
+ $table_sales_flat_creditmemo_item= Mage::getSingleton('core/resource')->getTableName('sales_flat_creditmemo_item');
60
+ $table_sales_flat_creditmemo= Mage::getSingleton('core/resource')->getTableName('sales_flat_creditmemo');
61
+ $table_sales_flat_creditmemo_grid= Mage::getSingleton('core/resource')->getTableName('sales_flat_creditmemo_grid');
62
+ $table_sales_flat_invoice_comment= Mage::getSingleton('core/resource')->getTableName('sales_flat_invoice_comment');
63
+ $table_sales_flat_invoice_item= Mage::getSingleton('core/resource')->getTableName('sales_flat_invoice_item');
64
+ $table_sales_flat_invoice= Mage::getSingleton('core/resource')->getTableName('sales_flat_invoice');
65
+ $table_sales_flat_invoice_grid= Mage::getSingleton('core/resource')->getTableName('sales_flat_invoice_grid');
66
+ $table_sales_flat_quote_address_item= Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_address_item');
67
+ $table_sales_flat_quote_item_option= Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_item_option');
68
+ $table_sales_flat_quote= Mage::getSingleton('core/resource')->getTableName('sales_flat_quote');
69
+ $table_sales_flat_quote_address= Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_address');
70
+ $table_sales_flat_quote_item= Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_item');
71
+ $table_sales_flat_quote_payment= Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_payment');
72
+ $table_sales_flat_shipment_comment= Mage::getSingleton('core/resource')->getTableName('sales_flat_shipment_comment');
73
+ $table_sales_flat_shipment_item= Mage::getSingleton('core/resource')->getTableName('sales_flat_shipment_item');
74
+ $table_sales_flat_shipment_track= Mage::getSingleton('core/resource')->getTableName('sales_flat_shipment_track');
75
+ $table_sales_flat_shipment= Mage::getSingleton('core/resource')->getTableName('sales_flat_shipment');
76
+ $table_sales_flat_shipment_grid= Mage::getSingleton('core/resource')->getTableName('sales_flat_shipment_grid');
77
+ $table_sales_flat_order_address= Mage::getSingleton('core/resource')->getTableName('sales_flat_order_address');
78
+ $table_sales_flat_order_item= Mage::getSingleton('core/resource')->getTableName('sales_flat_order_item');
79
+ $table_sales_flat_order_payment= Mage::getSingleton('core/resource')->getTableName('sales_flat_order_payment');
80
+ $table_sales_flat_order_status_history= Mage::getSingleton('core/resource')->getTableName('sales_flat_order_status_history');
81
+ $table_sales_flat_order_grid= Mage::getSingleton('core/resource')->getTableName('sales_flat_order_grid');
82
+ $table_log_quote= Mage::getSingleton('core/resource')->getTableName('log_quote');
83
+ $quoteId='';
84
+ if (!empty($orderIds)) {
85
+ foreach ($orderIds as $orderId) {
86
+ $query=null;
87
+ $order = Mage::getModel('sales/order')->load($orderId);
88
+ if($order->increment_id){
89
+ /*$query="show tables like 'sales_flat_order'";
90
+ $rs=$write->fetchAll($query);*/
91
+ $incId=$order->increment_id;
92
+ if(in_array($table_sales_flat_order,$rsc_table)){
93
+ $query='SELECT entity_id FROM '.$table_sales_flat_order.' WHERE increment_id="'.mysql_escape_string($incId).'"';
94
+
95
+ $rs=$write->fetchAll($query);
96
+
97
+ $query='SELECT quote_id FROM '.$table_sales_flat_order.' WHERE entity_id="'.mysql_escape_string($orderId).'"';
98
+ $rs1=$write->fetchAll($query);
99
+ $quoteId=$rs1[0]['quote_id'];
100
+ }
101
+
102
+ $query='SET FOREIGN_KEY_CHECKS=1';
103
+ $rs3=$write->query($query);
104
+ //print_r($rsc_table);
105
+ //echo $table_sales_flat_creditmemo_comment;
106
+ if(in_array($table_sales_flat_creditmemo_comment,$rsc_table)){
107
+ //echo "DELETE FROM ".$table_sales_flat_creditmemo_comment." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_creditmemo." WHERE order_id=".$orderId.")";
108
+ //die;
109
+ $write->query("DELETE FROM ".$table_sales_flat_creditmemo_comment." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_creditmemo." WHERE order_id='".mysql_escape_string($orderId)."')");
110
+ }
111
+ //die;
112
+
113
+
114
+ if(in_array('sales_flat_creditmemo_item',$rsc_table)){
115
+ $write->query("DELETE FROM ".$table_sales_flat_creditmemo_item." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_creditmemo." WHERE order_id='".mysql_escape_string($orderId)."')");
116
+ }
117
+
118
+
119
+ if(in_array($table_sales_flat_creditmemo,$rsc_table)){
120
+ $write->query("DELETE FROM ".$table_sales_flat_creditmemo." WHERE order_id='".mysql_escape_string($orderId)."'");
121
+ }
122
+
123
+
124
+
125
+ if(in_array($table_sales_flat_creditmemo_grid,$rsc_table)){
126
+ $write->query("DELETE FROM ".$table_sales_flat_creditmemo_grid." WHERE order_id='".mysql_escape_string($orderId)."'");
127
+ }
128
+
129
+
130
+ if(in_array($table_sales_flat_invoice_comment,$rsc_table)){
131
+
132
+ $write->query("DELETE FROM ".$table_sales_flat_invoice_comment." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_invoice." WHERE order_id='".mysql_escape_string($orderId)."')");
133
+ }
134
+
135
+ if(in_array($table_sales_flat_invoice_item,$rsc_table)){
136
+
137
+ $write->query("DELETE FROM ".$table_sales_flat_invoice_item." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_invoice." WHERE order_id='".mysql_escape_string($orderId)."')");
138
+ }
139
+
140
+
141
+ if(in_array($table_sales_flat_invoice,$rsc_table)){
142
+
143
+ $write->query("DELETE FROM ".$table_sales_flat_invoice." WHERE order_id='".mysql_escape_string($orderId)."'");
144
+ }
145
+
146
+ if(in_array($table_sales_flat_invoice_grid,$rsc_table)){
147
+
148
+ $write->query("DELETE FROM ".$table_sales_flat_invoice_grid." WHERE order_id='".mysql_escape_string($orderId)."'");
149
+ }
150
+
151
+ if($quoteId){
152
+ if(in_array($table_sales_flat_quote_address_item,$rsc_table)){
153
+ $write->query("DELETE FROM ".$table_sales_flat_quote_address_item." WHERE parent_item_id IN (SELECT address_id FROM ".$table_sales_flat_quote_address." WHERE quote_id=".$quoteId.")");
154
+ }
155
+
156
+ $table_sales_flat_quote_shipping_rate= Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_shipping_rate');
157
+ if(in_array($table_sales_flat_quote_shipping_rate,$rsc_table)){
158
+ $write->query("DELETE FROM ".$table_sales_flat_quote_shipping_rate." WHERE address_id IN (SELECT address_id FROM ".$table_sales_flat_quote_address." WHERE quote_id=".$quoteId.")");
159
+ }
160
+
161
+ if(in_array($table_sales_flat_quote_item_option,$rsc_table)){
162
+ $write->query("DELETE FROM ".$table_sales_flat_quote_item_option." WHERE item_id IN (SELECT item_id FROM ".$table_sales_flat_quote_item." WHERE quote_id=".$quoteId.")");
163
+ }
164
+
165
+
166
+ if(in_array($table_sales_flat_quote,$rsc_table)){
167
+ $write->query("DELETE FROM ".$table_sales_flat_quote." WHERE entity_id=".$quoteId);
168
+ }
169
+
170
+ if(in_array($table_sales_flat_quote_address,$rsc_table)){
171
+ $write->query("DELETE FROM ".$table_sales_flat_quote_address." WHERE quote_id=".$quoteId);
172
+ }
173
+
174
+ if(in_array($table_sales_flat_quote_item,$rsc_table)){
175
+ $write->query("DELETE FROM ".$table_sales_flat_quote_item." WHERE quote_id=".$quoteId);
176
+ }
177
+
178
+ if(in_array('sales_flat_quote_payment',$rsc_table)){
179
+ $write->query("DELETE FROM ".$table_sales_flat_quote_payment." WHERE quote_id=".$quoteId);
180
+ }
181
+
182
+ }
183
+
184
+
185
+ if(in_array($table_sales_flat_shipment_comment,$rsc_table)){
186
+ $write->query("DELETE FROM ".$table_sales_flat_shipment_comment." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_shipment." WHERE order_id='".mysql_escape_string($orderId)."')");
187
+ }
188
+
189
+ if(in_array($table_sales_flat_shipment_item,$rsc_table)){
190
+ $write->query("DELETE FROM ".$table_sales_flat_shipment_item." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_shipment." WHERE order_id='".mysql_escape_string($orderId)."')");
191
+ }
192
+
193
+
194
+ if(in_array($table_sales_flat_shipment_track,$rsc_table)){
195
+ $write->query("DELETE FROM ".$table_sales_flat_shipment_track." WHERE order_id IN (SELECT entity_id FROM ".$table_sales_flat_shipment." WHERE order_id='".mysql_escape_string($orderId)."')");
196
+ }
197
+
198
+
199
+ if(in_array($table_sales_flat_shipment,$rsc_table)){
200
+
201
+ $write->query("DELETE FROM ".$table_sales_flat_shipment." WHERE order_id='".mysql_escape_string($orderId)."'");
202
+ }
203
+
204
+
205
+ if(in_array($table_sales_flat_shipment_grid,$rsc_table)){
206
+ $write->query("DELETE FROM ".$table_sales_flat_shipment_grid." WHERE order_id='".mysql_escape_string($orderId)."'");
207
+ }
208
+
209
+ if(in_array($table_sales_flat_order,$rsc_table)){
210
+ $write->query("DELETE FROM ".$table_sales_flat_order." WHERE entity_id='".mysql_escape_string($orderId)."'");
211
+ }
212
+
213
+ if(in_array($table_sales_flat_order_address,$rsc_table)){
214
+ $write->query("DELETE FROM ".$table_sales_flat_order_address." WHERE parent_id='".mysql_escape_string($orderId)."'");
215
+ }
216
+
217
+ if(in_array($table_sales_flat_order_item,$rsc_table)){
218
+ $write->query("DELETE FROM ".$table_sales_flat_order_item." WHERE order_id='".mysql_escape_string($orderId)."'");
219
+ }
220
+ if(in_array($table_sales_flat_order_payment,$rsc_table)){
221
+ $write->query("DELETE FROM ".$table_sales_flat_order_payment." WHERE parent_id='".mysql_escape_string($orderId)."'");
222
+ }
223
+ if(in_array($table_sales_flat_order_status_history,$rsc_table)){
224
+ $write->query("DELETE FROM ".$table_sales_flat_order_status_history." WHERE parent_id='".mysql_escape_string($orderId)."'");
225
+ }
226
+ if($incId&&in_array($table_sales_flat_order_grid,$rsc_table)){
227
+ $write->query("DELETE FROM ".$table_sales_flat_order_grid." WHERE increment_id='".mysql_escape_string($incId)."'");
228
+
229
+ }
230
+
231
+ $query="show tables like '%".$table_log_quote."'";
232
+ $rsc_table_l=$write->fetchCol($query);
233
+ if($quoteId&&$rsc_table_l){
234
+ $write->query("DELETE FROM ".$table_log_quote." WHERE quote_id=".$quoteId);
235
+ }
236
+ $write->query("SET FOREIGN_KEY_CHECKS=1");
237
+ }
238
+ }
239
+ $this->_getSession()->addSuccess($this->__('Order(s) deleted.'));
240
+ }else{
241
+ $this->_getSession()->addError($this->__('Order(s) error.'));
242
+ }
243
+ $this->_redirect('*/sales_order/index');
244
+ }
245
+
246
+ }
app/code/community/Wizard/MassStatus/etc/config.xml ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ * Magento Wizard Admin Mass Status Module
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Wizard
22
+ * @package Wizard_MassStatus
23
+ * @copyright Copyright (c) 2015 Wizard (http://www.sujeetkrsingh.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ *
26
+ -->
27
+ <config>
28
+ <modules>
29
+ <Wizard_MassStatus>
30
+ <version>1.0.0</version>
31
+ </Wizard_MassStatus>
32
+ </modules>
33
+ <global>
34
+ <helpers>
35
+ <wizard_massstatus>
36
+ <class>Wizard_MassStatus_Helper</class>
37
+ </wizard_massstatus>
38
+ </helpers>
39
+ <blocks>
40
+ <adminhtml>
41
+ <rewrite>
42
+ <sales_order_grid>Wizard_MassStatus_Block_Sales_Order_Grid</sales_order_grid>
43
+ </rewrite>
44
+ </adminhtml>
45
+ </blocks>
46
+ </global>
47
+ <admin>
48
+ <routers>
49
+ <adminhtml>
50
+ <args>
51
+ <modules>
52
+ <wizard_massstatus before="Mage_Adminhtml">Wizard_MassStatus_Adminhtml</wizard_massstatus>
53
+ </modules>
54
+ </args>
55
+ </adminhtml>
56
+ </routers>
57
+ </admin>
58
+ <adminhtml>
59
+ <default>
60
+ <massstatus>
61
+ <condition_name>mass_status</condition_name>
62
+ </massstatus>
63
+ </default>
64
+ <acl>
65
+ <resources>
66
+ <admin>
67
+ <children>
68
+ <system>
69
+ <children>
70
+ <config>
71
+ <children>
72
+ <mass_status>
73
+ <title>Mass Status</title>
74
+ </mass_status>
75
+ </children>
76
+ </config>
77
+ </children>
78
+ </system>
79
+ </children>
80
+ </admin>
81
+ </resources>
82
+ </acl>
83
+ </adminhtml>
84
+ </config>
app/code/community/Wizard/MassStatus/etc/system.xml ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ * Magento Wizard Admin Mass Status Module
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Wizard
22
+ * @package Wizard_MassStatus
23
+ * @copyright Copyright (c) 2015 Wizard (http://www.sujeetkrsingh.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ *
26
+ -->
27
+ <config>
28
+ <tabs>
29
+ <wizard translate="label" module="wizard_massstatus">
30
+ <label>Wizard Extensions</label>
31
+ <sort_order>100</sort_order>
32
+ </wizard>
33
+ </tabs>
34
+ <sections>
35
+ <mass_status translate="label" module="wizard_massstatus">
36
+ <label>Mass Status</label>
37
+ <tab>wizard</tab>
38
+ <frontend_type>text</frontend_type>
39
+ <sort_order>301</sort_order>
40
+ <show_in_default>1</show_in_default>
41
+ <show_in_website>1</show_in_website>
42
+ <show_in_store>1</show_in_store>
43
+ <groups>
44
+ <export_orders translate="label">
45
+ <label>Wizard Mass Status Settings</label>
46
+ <frontend_type>text</frontend_type>
47
+ <sort_order>2</sort_order>
48
+ <show_in_default>1</show_in_default>
49
+ <show_in_website>1</show_in_website>
50
+ <show_in_store>1</show_in_store>
51
+
52
+ <fields>
53
+ <active translate="label">
54
+ <label>Enabled</label>
55
+ <frontend_type>select</frontend_type>
56
+ <source_model>adminhtml/system_config_source_yesno</source_model>
57
+ <sort_order>0</sort_order>
58
+ <show_in_default>1</show_in_default>
59
+ <show_in_website>1</show_in_website>
60
+ <show_in_store>0</show_in_store>
61
+ </active>
62
+ </fields>
63
+ </export_orders>
64
+
65
+ </groups>
66
+ </mass_status>
67
+ </sections>
68
+ </config>
app/code/community/Wizard/ShippingType/Helper/Data.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ class GT_ShippingType_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+
5
+ }
app/code/community/Wizard/ShippingType/controllers/CitiesController.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class GT_ShippingTyep_CitiesController extends Mage_Adminhtml_Controller_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ $this->loadLayout();
7
+ $this->renderLayout();
8
+ }
9
+ }
10
+
11
+ ?>
app/code/community/Wizard/ShippingType/etc/adminhtml.xml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <config>
2
+ <menu>
3
+ <shippingtype translate="title" module="gt_shippingtype">
4
+ <title>Shipping Type</title>
5
+ <sort_order>15</sort_order>
6
+ <children>
7
+ <cities>
8
+ <title>Add Cities</title>
9
+ <sort_order>1</sort_order>
10
+ <action>adminhtml/shippingtype/index</action>
11
+ </cities>
12
+ </children>
13
+ </pulsestorm>
14
+ </menu>
15
+
16
+ </config>
app/code/community/Wizard/ShippingType/etc/config.xml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <config>
2
+ <modules>
3
+ <GT_ShippingType>
4
+ <version>0.1.0</version>
5
+ </GT_ShippingType>
6
+ </modules>
7
+ <adminhtml>
8
+ <acl>
9
+ <resources>
10
+ <admin>
11
+ <children>
12
+ <shippingtype translate="title" module="shippingtype">
13
+ <title>Top Level GT Shippingtyep Menu Item</title>
14
+ <sort_order>1</sort_order>
15
+ <children>
16
+ <cities translate="title" module="shippingtype">
17
+ <title>Cities Menu Item</title>
18
+ </cities>
19
+ </children>
20
+ </shippingtype>
21
+ </children>
22
+ </admin>
23
+ </resources>
24
+ </acl>
25
+ </adminhtml>
26
+ <admin>
27
+ <routers>
28
+ <adminhtml>
29
+ <args>
30
+ <modules>
31
+ <shippingtype before="Mage_Adminhtml">GT_ShippingType_Adminhtml</awesome>
32
+ </modules>
33
+ </args>
34
+ </adminhtml>
35
+ </routers>
36
+ </admin>
37
+ <global>
38
+ <models>
39
+ <shippingtype>
40
+ <class>GT_ShippingType_Model</class>
41
+ <resourceModel>shippingtype_mysql4</resourceModel>
42
+ </shippingtype>
43
+ <shippingtype_mysql4>
44
+ <class>GT_ShippingType_Model_Mysql4</class>
45
+ <entities>
46
+ <cities>
47
+ <table>GT_ShippingType_cities</table>
48
+ </cities>
49
+ </entities>
50
+ </shippingtype_mysql4>
51
+ </models>
52
+
53
+ <helpers>
54
+ <shippingtype>
55
+ <class>GT_ShippingType_Helper</class>
56
+ </shippingtype>
57
+ </helpers>
58
+ </global>
59
+ <admin>
60
+ <routers>
61
+ <adminhtml>
62
+ <args>
63
+ <modules>
64
+ <GT_ShippingType after="Mage_Adminhtml">GT_ShippingType</GT_ShippingType>
65
+ </modules>
66
+ </args>
67
+ </adminhtml>
68
+ </routers>
69
+ </admin>
70
+ </config>
app/code/community/Wizard/billing_21nov.phtml ADDED
@@ -0,0 +1,585 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <form id="co-billing-form" action="">
28
+ <fieldset>
29
+ <ul class="form-list">
30
+ <?php if ($this->customerHasAddresses()): ?>
31
+ <li class="wide">
32
+ <label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
33
+ <div class="input-box">
34
+ <?php echo $this->getAddressesHtmlSelect('billing') ?>
35
+ </div>
36
+ </li>
37
+ <?php endif; ?>
38
+ <li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>>
39
+ <fieldset>
40
+ <input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" />
41
+ <ul>
42
+ <!-- ============================First name and second name starts ========================================== -->
43
+
44
+ <li class="fields">
45
+ <?php if(!$this->isCustomerLoggedIn()){ ?>
46
+
47
+ <div class="customer-name">
48
+ <div class="field name-firstname">
49
+ <label for="billing:fullname" class="required"><em>*</em>Full Name</label>
50
+ <div class="input-box">
51
+ <input type="text" id="fullname" name="fullname" value="" title="Fullname" placeholder="Full Name" maxlength="255" class="input-text required-entry" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Full Name'" >
52
+ <input type="hidden" id="billing:firstname" name="billing[firstname]" value="" title="First Name" maxlength="255" class="new_firstname input-text required-entry">
53
+ <input type="hidden" id="billing:lastname" name="billing[lastname]" value="" title="Last Name" maxlength="255" class="new_lastname input-text required-entry">
54
+ </div>
55
+ </div>
56
+ <div class="field name-lastname">
57
+ <label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
58
+ <div class="input-box">
59
+ <input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->escapeHtml($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" placeholder="Email Address" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Email Address'" />
60
+ </div>
61
+ </div>
62
+ </div>
63
+
64
+
65
+ <script>
66
+ //$.noConflict();
67
+ jQuery(document).ready(function(){
68
+ jQuery("#fullname").on("keyup",function(){
69
+ var fullnameVal = jQuery("#fullname").val();
70
+ var fullname = fullnameVal.split(" ");
71
+ var fullname1 = fullname[0];
72
+ var fullname2 = fullname[1];
73
+ var fullname3 = fullname[2];
74
+ jQuery(".new_firstname").val(fullname1);
75
+ if( fullname2 == null )
76
+ {
77
+ fullname2 = '.';
78
+ }
79
+ if( fullname3 == null )
80
+ {
81
+ fullname3 = ' ';
82
+ }
83
+ jQuery(".new_lastname").val(fullname2 +' '+ fullname3);
84
+ });
85
+ });
86
+
87
+ </script>
88
+ <?php }else{
89
+
90
+ $customerObj = Mage::getSingleton('customer/session')->getCustomer();
91
+ ?>
92
+
93
+ <div class="customer-name">
94
+ <div class="field name-firstname">
95
+ <label for="billing:fullname" class="required"><em>*</em>Full Name</label>
96
+ <div class="input-box">
97
+ <input type="text" id="fullname" name="fullname" value="<?php echo $customerObj->getName();?>" title="Fullname" placeholder="Full Name" maxlength="255" class="input-text required-entry" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Full Name'" >
98
+ <input type="hidden" id="billing:firstname" name="billing[firstname]" value="<?php echo $customerObj->getFirstname();?>" title="First Name" maxlength="255" class="new_firstname input-text required-entry">
99
+ <input type="hidden" id="billing:lastname" name="billing[lastname]" value="<?php echo $customerObj->getLastname();?>" title="Last Name" maxlength="255" class="new_lastname input-text required-entry">
100
+ </div>
101
+ </div>
102
+
103
+
104
+
105
+ <div class="field name-lastname">
106
+ <label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
107
+ <div class="input-box">
108
+ <input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->escapeHtml($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" placeholder="Email Address" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Email Address'" />
109
+ </div>
110
+ </div>
111
+ </div>
112
+
113
+
114
+
115
+ <?php }?>
116
+ </li>
117
+
118
+ <!-- ============================First name and second name ends ========================================== -->
119
+
120
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
121
+ <li class="wide">
122
+ <label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
123
+ <div class="input-box">
124
+ <input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" placeholder="Address" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Address'" />
125
+ </div>
126
+ </li>
127
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
128
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
129
+ <li class="wide">
130
+ <div class="input-box">
131
+ <input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" placeholder="Nearest land mark" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Nearest land mark'" />
132
+ </div>
133
+ </li>
134
+ <?php endfor; ?>
135
+ <?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
136
+ <li class="wide">
137
+ <label for="billing:vat_id"><?php echo $this->__('VAT Number') ?></label>
138
+ <div class="input-box">
139
+ <input type="text" id="billing:vat_id" name="billing[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()) ?>" title="<?php echo $this->__('VAT Number') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
140
+ </div>
141
+ </li>
142
+ <?php endif; ?>
143
+ <li class="fields">
144
+ <div class="field">
145
+ <label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
146
+ <div class="input-box">
147
+ <input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" placeholder="Telephone" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Telephone'" />
148
+ </div>
149
+ </div>
150
+ <div class="field">
151
+ <label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
152
+ <div class="input-box">
153
+ <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" id="Zipcode" name="billing[postcode]" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="Zipcode input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" placeholder="Zip code" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Zip code'" />
154
+ </div>
155
+ </div>
156
+ <div class="field" style="display:none;">
157
+ <label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
158
+ <div class="input-box">
159
+ <input type="text" name="billing[country_id]" id="billing:country_id" class="validate-select" title="Country" value="IN">
160
+ </div>
161
+ </div>
162
+ </li>
163
+ <li class="fields">
164
+ <div class="field">
165
+ <label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
166
+ <div class="input-box">
167
+ <input type="text" title="<?php echo $this->__('City') ?>" name="billing[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="zipcity input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="billing:city" placeholder="City" onfocus="this.placeholder = ''" onblur="this.placeholder = 'City'" />
168
+ </div>
169
+ </div>
170
+
171
+ <div class="field">
172
+ <label for="billing:region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
173
+ <div class="input-box">
174
+ <select id="billing:region" name="billing[region]" title="<?php echo $this->__('State/Province') ?>" class="zipstate validate-select" placeholder="State" onfocus="this.placeholder = ''" onblur="this.placeholder = 'State'">
175
+ <option value="">Select State</option>
176
+ <option value="Andaman and Nicobar Islands">Andaman and Nicobar Islands</option>
177
+ <option value="Andhra Pradesh">Andhra Pradesh</option>
178
+ <option value="Arunachal Pradesh">Arunachal Pradesh</option>
179
+ <option value="Assam">Assam</option>
180
+ <option value="Bihar">Bihar</option>
181
+ <option value="Chandigarh">Chandigarh</option>
182
+ <option value="Dadra and Nagar Haveli">Dadra and Nagar Haveli</option>
183
+ <option value="Daman and Diu">Daman and Diu</option>
184
+ <option value="Delhi">Delhi</option>
185
+ <option value="Goa">Goa</option>
186
+ <option value="Gujarat">Gujarat</option>
187
+ <option value="Haryana">Haryana</option>
188
+ <option value="Himachal Pradesh">Himachal Pradesh</option>
189
+ <option value="Jammu and Kashmir">Jammu and Kashmir</option>
190
+ <option value="Karnataka">Karnataka</option>
191
+ <option value="Kerala">Kerala</option>
192
+ <option value="Lakshadweep Islands">Lakshadweep Islands</option>
193
+ <option value="Madhya Pradesh">Madhya Pradesh</option>
194
+ <option value="Maharashtra">Maharashtra</option>
195
+ <option value="Manipur">Manipur</option>
196
+ <option value="Meghalaya">Meghalaya</option>
197
+ <option value="Mizoram">Mizoram</option>
198
+ <option value="Nagaland">Nagaland</option>
199
+ <option value="Orissa">Orissa</option>
200
+ <option value="Pondicherry">Pondicherry</option>
201
+ <option value="Punjab">Punjab</option>
202
+ <option value="Rajasthan">Rajasthan</option>
203
+ <option value="Sikkim">Sikkim</option>
204
+ <option value="Tamil Nadu">Tamil Nadu</option>
205
+ <option value="Tripura">Tripura</option>
206
+ <option value="Uttar Pradesh">Uttar Pradesh</option>
207
+ <option value="West Bengal">West Bengal</option>
208
+ <option value="Jharkand">Jharkand</option>
209
+ <option value="Uttarakhand">Uttarakhand</option>
210
+ <option value="Chattisgarh">Chattisgarh</option>
211
+ </select>
212
+ <script type="text/javascript">
213
+ //<![CDATA[
214
+ $('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
215
+ //]]>
216
+ </script>
217
+ <input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" placeholder="State" onfocus="this.placeholder = ''" onblur="this.placeholder = 'State'" /> </div>
218
+ </div>
219
+ </li>
220
+
221
+ <script>
222
+ jQuery(document).ready(function($){
223
+
224
+ jQuery("#Zipcode").on("change",function(){
225
+
226
+ var zipcode = jQuery("#Zipcode").val();
227
+ if( zipcode == '')
228
+ {
229
+
230
+ }else if( zipcode.length !== 6 ){
231
+ jQuery("#Zipcode").attr("placeholder", "Must Entrer 6 Digits");
232
+ jQuery("#Zipcode").val('');
233
+ }else{
234
+
235
+ jQuery.post("<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);?>js/action/checkout_zip_checker.php", {
236
+
237
+ zipcode: zipcode
238
+
239
+ },
240
+
241
+
242
+
243
+ function(data, status) {
244
+
245
+
246
+
247
+ if (status == "success") {
248
+
249
+
250
+
251
+ var json = jQuery.parseJSON(data);
252
+
253
+ if ( json == null)
254
+ {
255
+ //jQuery("#Zipcode").val('');
256
+ //jQuery("#Zipcode").attr("placeholder", "Invalid Zipcode");
257
+
258
+ }else{
259
+ state= json.STATE;
260
+ city= json.CITY;
261
+
262
+
263
+ jQuery(".zipcity").val(city);
264
+ jQuery(".zipstate").val(state);
265
+
266
+ }
267
+
268
+ }
269
+
270
+
271
+
272
+ });
273
+
274
+
275
+ }
276
+
277
+ });
278
+
279
+ });
280
+
281
+ //jQuery.noConflict();
282
+
283
+ </script>
284
+ <li class="fields">
285
+
286
+ <?php /*?><div class="field">
287
+ <label for="billing:fax"><?php echo $this->__('Fax') ?></label>
288
+ <div class="input-box">
289
+ <input type="text" name="billing[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="billing:fax" />
290
+ </div>
291
+ </div><?php */?>
292
+ </li>
293
+ <?php if(!$this->isCustomerLoggedIn()): ?>
294
+
295
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
296
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
297
+ <?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?>
298
+ <li class="fields">
299
+ <?php if ($_dob->isEnabled()): ?>
300
+ <div class="field">
301
+ <?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
302
+ </div>
303
+ <?php endif; ?>
304
+ <?php if ($_gender->isEnabled()): ?>
305
+ <div class="field">
306
+ <?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
307
+ </div>
308
+ <?php endif ?>
309
+ </li>
310
+ <?php endif ?>
311
+
312
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
313
+ <?php if ($_taxvat->isEnabled()): ?>
314
+ <li>
315
+ <?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
316
+ </li>
317
+ <?php endif ?>
318
+
319
+ <li class="fields" id="register-customer-password">
320
+ <div class="field">
321
+ <label for="billing:customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
322
+ <div class="input-box">
323
+ <input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
324
+ </div>
325
+ </div>
326
+ <div class="field">
327
+ <label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
328
+ <div class="input-box">
329
+ <input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-password" />
330
+ </div>
331
+ </div>
332
+ </li>
333
+ <?php endif; ?>
334
+ <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
335
+ <li class="control">
336
+ <input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="billing:save_in_address_book" <?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="billing:save_in_address_book"><?php echo $this->__('Save in address book') ?></label>
337
+ </li>
338
+ <?php else:?>
339
+ <li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" />
340
+
341
+ </li>
342
+ <?php endif; ?>
343
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
344
+ </ul>
345
+ </fieldset>
346
+ </li>
347
+
348
+ <?php /* Extensions placeholder */ ?>
349
+ <?php echo $this->getChildHtml('checkout.onepage.billing.extra')?>
350
+ <?php if ($this->canShip()): ?>
351
+ <?php /*?> <?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = true;" <?php */?>
352
+
353
+ <?php /*?> <li class="control">
354
+ <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1" class="radio" checked="checked" title="<?php echo $this->__('Ship to this address') ?>" />
355
+ <label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to this address') ?></label></li>
356
+ <li class="control">
357
+ <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0" class="radio" title="<?php echo $this->__('Ship to different address') ?>" />
358
+ <label for="billing:use_for_shipping_no"><?php echo $this->__('Ship to different address') ?></label>
359
+ </li><?php */?>
360
+ <?php endif; ?>
361
+ </ul>
362
+ <?php if (!$this->canShip()): ?>
363
+ <input type="hidden" name="billing[use_for_shipping]" value="1" />
364
+ <?php endif; ?>
365
+
366
+
367
+ <!--================================================= My Code Start Here =================================================================-->
368
+
369
+ <div id="shipping_info" style="left:-200%; display:none;">
370
+ <form action="" id="co-shipping-form">
371
+ <ul class="form-list">
372
+ <?php if ($this->customerHasAddresses()): ?>
373
+ <li class="wide">
374
+ <label for="shipping-address-select"><?php echo $this->__('Select a shipping address from your address book or enter a new address.') ?></label>
375
+ <div class="input-box">
376
+ <?php echo $this->getAddressesHtmlSelect('shipping') ?>
377
+ </div>
378
+ </li>
379
+ <?php endif ?>
380
+ <li id="shipping-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif ?>>
381
+ <fieldset>
382
+ <input type="hidden" name="shipping[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="shipping:address_id" />
383
+ <ul>
384
+ <li class="fields">
385
+ <div class="customer-name">
386
+
387
+ <div class="field name-firstname">
388
+ <label for="shipping:fullname" class="required"><em>*</em>Full Name</label>
389
+ <div class="input-box">
390
+ <?php if(!$this->isCustomerLoggedIn()): ?>
391
+ <input type="text" id="fullname" name="fullname" value="" title="Fullname" onchange="shipping.setSameAsBilling(false)" placeholder="Full Name" maxlength="255" class="input-text required-entry" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Full Name'" >
392
+
393
+ <input type="hidden" id="shipping:firstname" name="shipping[firstname]" onchange="shipping.setSameAsBilling(false)" value="" title="First Name" maxlength="255" class="new_firstname input-text" placeholder="First name" onfocus="this.placeholder = ''" onblur="this.placeholder = 'First name'">
394
+
395
+ <input type="hidden" id="shipping:lastname" name="shipping[lastname]" onchange="shipping.setSameAsBilling(false)" value="" title="Last Name" maxlength="255" class="new_lastname input-text" placeholder="Last Name" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Last Name'">
396
+ <?php else:
397
+ $customer2 = Mage::getSingleton('customer/session')->getCustomer();
398
+ /* Get the customer's full name */
399
+ $fullname1 = $customer2->getName();
400
+ /* Get the customer's first name */
401
+ $firstname1 = $customer2->getFirstname();
402
+ /* Get the customer's last name */
403
+ $lastname1 = $customer2->getLastname();
404
+
405
+
406
+ ?>
407
+ <input type="text" id="fullname" name="fullname" value="<?php echo $fullname1;?>" title="Fullname" onchange="shipping.setSameAsBilling(false)" placeholder="Full Name" maxlength="255" class="input-text required-entry" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Full Name'" >
408
+
409
+ <input type="hidden" id="shipping:firstname" name="shipping[firstname]" onchange="shipping.setSameAsBilling(false)" value="<?php echo $firstname1;?>" title="First Name" maxlength="255" class="new_firstname input-text" placeholder="First name" onfocus="this.placeholder = ''" onblur="this.placeholder = 'First name'">
410
+
411
+ <input type="hidden" id="shipping:lastname" name="shipping[lastname]" onchange="shipping.setSameAsBilling(false)" value="<?php echo $lastname1;?>" title="Last Name" maxlength="255" class="new_lastname input-text" placeholder="Last Name" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Last Name'">
412
+
413
+
414
+ <?php endif;?>
415
+
416
+ </div>
417
+ </div>
418
+ <div class="field name-lastname">
419
+ <label for="shipping:company"><?php echo $this->__('Company') ?></label>
420
+ <div class="input-box">
421
+ <input type="text" id="shipping:company" name="shipping[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" onchange="shipping.setSameAsBilling(false);" placeholder="Company Name" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Company Name'" />
422
+ </div>
423
+ </div>
424
+ </div>
425
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
426
+
427
+ <script>
428
+ $.noConflict();
429
+ jQuery(document).ready(function(){
430
+ jQuery("#fullname").on("keyup",function(){
431
+ var fullnameVal = jQuery("#fullname").val();
432
+ var fullname = fullnameVal.split(" ");
433
+ var fullname1 = fullname[0];
434
+ var fullname2 = fullname[1];
435
+ var fullname3 = fullname[2];
436
+ jQuery(".new_firstname").val(fullname1);
437
+ if( fullname2 == null )
438
+ {
439
+ fullname2 = '.';
440
+ }
441
+ if( fullname3 == null )
442
+ {
443
+ fullname3 = ' ';
444
+ }
445
+ jQuery(".new_lastname").val(fullname2 +' '+ fullname3);
446
+ });
447
+ });
448
+
449
+ </script>
450
+
451
+ </li>
452
+
453
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
454
+ <li class="wide">
455
+ <label for="shipping:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
456
+ <div class="input-box">
457
+ <input type="text" title="<?php echo $this->__('Street Address') ?>" name="shipping[street][]" id="shipping:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" placeholder="Address" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Address'" />
458
+ </div>
459
+ </li>
460
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
461
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
462
+ <li class="wide">
463
+ <div class="input-box">
464
+ <input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="shipping[street][]" id="shipping:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" placeholder="Address" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Address'" />
465
+ </div>
466
+ </li>
467
+ <?php endfor; ?>
468
+ <?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
469
+ <li class="wide">
470
+ <label for="billing:vat_id"><?php echo $this->__('VAT Number'); ?></label>
471
+ <div class="input-box">
472
+ <input type="text" id="shipping:vat_id" name="shipping[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()); ?>" title="<?php echo $this->__('VAT Number'); ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
473
+ </div>
474
+ </li>
475
+ <?php endif; ?>
476
+ <li class="fields">
477
+ <div class="field">
478
+ <label for="shipping:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
479
+ <div class="input-box">
480
+ <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="shipping[postcode]" id="shipping:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" placeholder="Zip code" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Zip code'" />
481
+ </div>
482
+ </div>
483
+ <div class="field">
484
+ <label for="shipping:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
485
+ <div class="input-box">
486
+ <input type="text" name="shipping[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="shipping:telephone" placeholder="Telephone" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Telephone'" />
487
+ </div>
488
+ </div>
489
+ <div class="field">
490
+ <label for="shipping:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
491
+ <div class="input-box">
492
+ <?php echo $this->getCountryHtmlSelect('shipping') ?>
493
+ </div>
494
+ </div>
495
+ </li>
496
+
497
+ <li class="fields">
498
+ <div class="field">
499
+ <label for="shipping:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
500
+ <div class="input-box">
501
+ <input type="text" title="<?php echo $this->__('City') ?>" name="shipping[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="shipping:city" placeholder="City" onfocus="this.placeholder = ''" onblur="this.placeholder = 'City'" />
502
+ </div>
503
+ </div>
504
+ <div class="field">
505
+ <label for="shipping:region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
506
+ <div class="input-box">
507
+ <select id="shipping:region_id" name="shipping[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;" placeholder="State" onfocus="this.placeholder = ''" onblur="this.placeholder = 'State'">
508
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
509
+ </select>
510
+ <script type="text/javascript">
511
+ //<![CDATA[
512
+ $('shipping:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
513
+ //]]>
514
+ </script>
515
+ <input type="text" id="shipping:region" name="shipping[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" placeholder="State" onfocus="this.placeholder = ''" onblur="this.placeholder = 'State'" />
516
+ </div>
517
+ </div>
518
+ </li>
519
+
520
+ <li class="fields">
521
+
522
+ <?php /*?><div class="field">
523
+ <label for="shipping:fax"><?php echo $this->__('Fax') ?></label>
524
+ <div class="input-box">
525
+ <input type="text" name="shipping[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="shipping:fax" />
526
+ </div>
527
+ </div><?php */?>
528
+ </li>
529
+ <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
530
+ <li class="control">
531
+ <input type="checkbox" name="shipping[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="shipping:save_in_address_book" <?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="shipping:save_in_address_book"><?php echo $this->__('Save in address book') ?></label></li>
532
+ <?php else:?>
533
+ <li class="no-display"><input type="hidden" name="shipping[save_in_address_book]" value="1" /></li>
534
+ <?php endif;?>
535
+ </ul>
536
+ </fieldset>
537
+ </li>
538
+
539
+ </ul>
540
+ </form>
541
+
542
+ </div>
543
+
544
+
545
+ <!--================================================== End Here ============================================================-->
546
+ <div class="buttons-set" id="billing-buttons-container">
547
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
548
+ <button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
549
+ <span class="please-wait" id="billing-please-wait" style="display:none;">
550
+ <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
551
+ </span>
552
+ </div>
553
+ </fieldset>
554
+ </form>
555
+ <script type="text/javascript">
556
+ //<![CDATA[
557
+ var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
558
+ var billingForm = new VarienForm('co-billing-form');
559
+
560
+ //billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
561
+ $('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
562
+
563
+ var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode');
564
+ //]]>
565
+ </script>
566
+
567
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.js"></script>
568
+ <script>
569
+ jQuery.noConflict();
570
+ jQuery(document).ready(function() {
571
+ //alert("asasas");
572
+ jQuery('input[type="radio"]').live('click',function() {
573
+ //alert("click");
574
+ if(jQuery(this).attr('id') == 'billing:use_for_shipping_no') {
575
+ jQuery('#shipping_info').show();
576
+ }
577
+
578
+ else {
579
+ jQuery('#shipping_info').hide();
580
+ }
581
+ });
582
+
583
+
584
+ });
585
+ </script>
app/code/community/Wizard/view_21nov.phtml ADDED
@@ -0,0 +1,516 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $_helper = $this->helper('catalog/output');
4
+
5
+ $_product = $this->getProduct();
6
+
7
+ $_config = Mage::getStoreConfig('milanoconfig/productpage');
8
+
9
+ $_share_config = Mage::getStoreConfig('milanoconfig/share');
10
+
11
+ $_brand_enabled = $_config['brand'] == 1;
12
+
13
+ $_use_share = $_share_config['use_share'] == 1;
14
+
15
+ $_share_code = $_share_config['share_code'];
16
+
17
+ $_shortDescription = $_product->getShortDescription();
18
+
19
+ $my_product_manufacturer = Mage::getModel('catalog/product')->load($_product->getId());
20
+
21
+ ?>
22
+ <script type="text/javascript">
23
+
24
+ var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);
25
+
26
+ </script>
27
+
28
+ <div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
29
+ <div class="product-view">
30
+ <div class="product-essential">
31
+ <div class="product-img-box"> <?php echo $this->getChildHtml('info_tabs') ?>
32
+ <img style="float:left; margin-top:0px;" alt="Free shipping" src="<?php echo $this->getSkinUrl() ?>/images/free-shipping1.jpg" />
33
+ <?php /*?> <img style="float:left; margin-left:-1px; margin-top:15px;" alt="COD" src="<?php echo $this->getSkinUrl() ?>/images/cod.jpg" />
34
+ <img style="float:left; margin-left:-1px; margin-top:15px;" alt="Easy Online Returns" src="<?php echo $this->getSkinUrl() ?>/images/easy-returns.jpg" />
35
+ <img style="float:left; margin-left:-1px; margin-top:15px;" alt="Secure Payment" src="<?php echo $this->getSkinUrl() ?>/images/secure-payment.jpg" /><?php */?>
36
+ </div>
37
+ <div class="product-shop">
38
+ <?php if ($my_product_manufacturer->getManufacturer()!=''):?>
39
+ <div class="brand_on_product_icon"><img src="http://latestsale.in/ssiplonline/media/wysiwyg/ssipl/brands/color/<?php echo $my_product_manufacturer->getManufacturer(); ?>.png" alt="" /> </div>
40
+ <?php endif;?>
41
+ <div class="product-name">
42
+ <?php include('view/labels.phtml') ?>
43
+ <h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
44
+ <?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
45
+ <?php if ($_shortDescription):?>
46
+ <div class="short-description"><?php echo $_helper->productAttribute($_product, nl2br($_shortDescription), 'short_description') ?></div>
47
+ <?php endif;?>
48
+ </div>
49
+ <?php if($_brand_enabled):
50
+
51
+ $_brand_attr = $_config['brand_attr'];
52
+
53
+ if ($_product->getData($_brand_attr)):
54
+
55
+ $brandImageExt = trim($_config['brand_image_extension']);
56
+
57
+ $brandPageBasePath = trim($_config['brand_page_base_path']);
58
+
59
+ $brandLinkSearch = $_config['brand_link_search_enabled'] == 1;
60
+
61
+ $attr = $_product->getResource()->getAttribute($_brand_attr);
62
+
63
+ // $brandValue = trim($attr->getFrontend()->getValue($_product));
64
+
65
+ $brandValueCode = str_replace(" ", "_", strtolower($brandValue));
66
+
67
+ //$brandLabel = $attr->getStoreLabel();
68
+
69
+ $brandImageUrl = Mage::registry('themeMediaUrl').'brand-logos/' . $brandValueCode . '.' . $brandImageExt;
70
+
71
+ if ($brandLinkSearch)
72
+
73
+ $brandPageUrl = Mage::getUrl() . 'catalogsearch/result/?q=' . $brandValue;
74
+
75
+ elseif ($brandPageBasePath != '')
76
+
77
+ {
78
+
79
+ $basePath = ($brandPageBasePath == '/') ? '' : $brandPageBasePath . '/';
80
+
81
+ $brandPageUrl = Mage::getUrl() . $basePath . str_replace(" ", "-", strtolower($brandValue));
82
+
83
+ }
84
+
85
+ else
86
+
87
+ $brandPageUrl = '';
88
+
89
+ ?>
90
+ <div class="brand-logo clear"> </div>
91
+ <?php endif; ?>
92
+ <?php endif; ?>
93
+ <div class="formdiv">
94
+ <form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
95
+ <div class="no-display">
96
+ <input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
97
+ <input type="hidden" name="related_product" id="related-products-field" value="" />
98
+ </div>
99
+ <div class="addtocont clear">
100
+ <?php if($_product->getTypeId() != 'bundle'): ?>
101
+ <?php echo $this->getChildHtml('product_type_data') ?> <span class="product-code"><?php echo $this->__('Product code:').' <strong>'.$_product->getSku().'</strong>'; ?></span>
102
+ <?php endif;?>
103
+ <?php if($_product->getTypeId() != 'bundle'): ?>
104
+ <?php echo $this->getPriceHtml($_product) ?>
105
+ <?php else: ?>
106
+ <span class="product-code"><?php echo $this->__('Product code:').'<strong>'.$_product->getSku().'</strong>'; ?></span> <?php echo $this->getChildHtml('product_type_data') ?>
107
+ <?php endif;?>
108
+
109
+ <?php if($_product->getOffer()){ ?>
110
+ <div class='offerbox'>
111
+ <a href="javascript:void(0)" class='offeropen'>Click for Offer</a>
112
+ <div class='offercontent'>
113
+ <!--<a href="javascript:void(0)" class='offerclose'>X</a>-->
114
+ <?php echo $_product->getOffer(); ?>
115
+ </div>
116
+ </div>
117
+ <?php } ?>
118
+
119
+ </div>
120
+ <?php if($_tierPriceHtml = $this->getTierPriceHtml()): ?>
121
+ <div class="clear"><?php echo $_tierPriceHtml; ?></div>
122
+ <?php endif; ?>
123
+ <?php if($_extraHint = $this->getChildHtml('extrahint')): ?>
124
+ <div class="clear"><?php echo $_extraHint ?></div>
125
+ <?php endif; ?>
126
+ <?php if($_alertUrls = $this->getChildHtml('alert_urls')): ?>
127
+ <div class="product-alerts clear"><?php echo $_alertUrls; ?></div>
128
+ <?php endif; ?>
129
+ <?php if($_promoMessage = $this->getChildHtml('product_promo_message')): ?>
130
+ <div class="clear"><?php echo $this->getChildHtml('product_promo_message') ?></div>
131
+ <?php endif; ?>
132
+ <?php if ($_product->isSaleable() && $this->hasOptions()):?>
133
+ <div class="clear" id="container1"><?php echo $this->getChildChildHtml('container1', '', true, true) ?>
134
+ <div class="clear"></div>
135
+ </div>
136
+ <?php endif;?>
137
+ <?php if ($_productDataGrouped = $this->getChildHtml('product_type_data_grouped')): ?>
138
+ <div class="clear"><?php echo $_productDataGrouped; ?></div>
139
+ <?php endif; ?>
140
+ <?php if (!$this->hasOptions()):?>
141
+ <div class="add-to-box clear">
142
+
143
+ <!-- ############################## Star My Code Here ###############################################################-->
144
+
145
+ <?php $quantity= Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();
146
+ $stock=number_format($quantity);
147
+ ?>
148
+ <?php if($stock!=0)
149
+ {?>
150
+ <div class="add-to-cart">
151
+ <button type="submit" title="Add to Cart" class="button btn-cart"><span><span>Add to Cart</span></span></button>
152
+ </div>
153
+ <?php } else{ ?>
154
+ <div class="add-to-cart">
155
+ <button type="button" title="Add to Cart" class="button btn-cart"><span><span>OUT OF STOCK</span></span></button>
156
+ </div>
157
+ <?php } ?>
158
+ </div>
159
+
160
+ <!-- ################################## END Here #############################################################-->
161
+
162
+ <?php else: ?>
163
+ <?php endif; ?>
164
+
165
+ <?php echo $this->getChildHtml('other');?>
166
+ <?php if ($_product->isSaleable() && $this->hasOptions()):?>
167
+ <div class="clear" id="container2">
168
+
169
+ <?php if ($_product->isSaleable() && $this->hasOptions()):?>
170
+ <div class="sizeCartmain">
171
+ <div id="sizecartlight" class="size-cart-white_content">
172
+ <div class="size-cart-cent">
173
+ <?php $b = 0;?>
174
+ <?php if($_product->getGender() != 196)
175
+
176
+ {
177
+
178
+ ?>
179
+ <img alt="" src="<?php echo $this->getSkinUrl() ?>/images/size-chart-men.png" />
180
+ <?php }else{ ?>
181
+ <img alt="" src="<?php echo $this->getSkinUrl() ?>/images/size-chart-women.png" />
182
+ <?php } ?>
183
+ <a class="size-cart-close-button" href="javascript:void(0)" onclick="document.getElementById('sizecartlight').style.display='none';document.getElementById('sizecartfade').style.display='none'">x</a> </div>
184
+ </div>
185
+ <a onclick="document.getElementById('sizecartlight').style.display='block';document.getElementById('sizecartfade').style.display='block'" href="javascript:void(0)">Size Chart
186
+ <?php /*?><img alt="" src="<?php echo $this->getSkinUrl() ?>/images/not-sure.png" /><?php */?> </a>
187
+
188
+ <div id="sizecartfade" class="size-cart-black_overlay"></div>
189
+
190
+
191
+ </div>
192
+ <?php else: ?>
193
+ <?php endif; ?>
194
+
195
+ <?php echo $this->getChildChildHtml('container2', '', true, true) ?>
196
+ </div>
197
+ <?php endif;?>
198
+ </form>
199
+ <script>
200
+
201
+ var txtStock = jQuery('.addtocont .availability span').text();
202
+
203
+ if(txtStock != "In stock")
204
+
205
+ {
206
+
207
+ //document.write(jQuery('.addtocont .availability span').text());
208
+
209
+ jQuery(".no-stock").css("display","block");
210
+
211
+ }
212
+
213
+ </script>
214
+ <script type="text/javascript">
215
+
216
+ //<![CDATA[
217
+
218
+ var productAddToCartForm = new VarienForm('product_addtocart_form');
219
+
220
+ var loaderBckImg = '<?php echo $this->getSkinUrl('images/loading.gif')?>';
221
+
222
+ var successMsg = '<?php echo $this->__('was successfully added to your shopping cart.') ?>';
223
+
224
+ var continueMsg = '<?php echo $this->__('Continue shopping') ?>';
225
+
226
+ var cartUrl = '<?php echo $this->getUrl('checkout/cart')?>';
227
+
228
+ var cartMsg = '<?php echo $this->__('View cart & checkout') ?>';
229
+
230
+ var errorMsg = '<?php echo $this->__('Error') ?>';
231
+
232
+ jQuery('.rating-links > a').click(function(e){ e.preventDefault(); jQuery('#product_tabs_product_review > a').click(); });
233
+
234
+ //]]>
235
+
236
+ </script>
237
+ <?php if($_use_share && $_share_code): ?>
238
+ <div class="clear"><?php echo $_share_code; ?></div>
239
+ <?php endif; ?>
240
+
241
+ <!--Delivery Check Plugin Script-->
242
+
243
+
244
+
245
+ <div id="delivery_CheckBlock">
246
+
247
+ <div id="LeftCheck">
248
+
249
+ <div id="ZIPUnfill"> <span id="ZIPChcekText">Check Availability:</span> </div>
250
+
251
+ <div id="ZIPfill" style="display:none;"> <span id="ZIPChcekText">Delivery to Pincode:</span><span id="ZIP_Result"><span id="ZipCode">&nbsp;</span> <a href="#edit" id="editZip">Edit</a></span> </div>
252
+
253
+ </div>
254
+
255
+ <div id="RightCheck">
256
+
257
+ <div id="ZIPUnfill2">
258
+
259
+ <form action="" name="DeliVeryChecker">
260
+
261
+ <input type="text" name="DeliveryZip" Placeholder="Enter Pincode" id="DeliveryZip" value=""/>
262
+
263
+ <input type="button" name="DeliveryCheck" id="DeliveryCheck" value="Check"/>
264
+ <span class="ErrorZip" style="color:red;"></span>
265
+ </form>
266
+
267
+ </div>
268
+
269
+ <div id="ZIPfill2" style="display:none;"><span id="ZIPChcekText"></span><span id="ZiptimeDay"></span></div>
270
+
271
+ <div style="clear:both;"></div>
272
+
273
+ </div>
274
+
275
+
276
+
277
+ <!--end Delivery Check Plugin-->
278
+
279
+
280
+
281
+
282
+
283
+ <script>
284
+
285
+ jQuery(document).ready(function($){
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+ $("#DeliveryCheck").click(function(){
294
+
295
+ var zipcode = $("#DeliveryZip").val();
296
+
297
+ if( zipcode == '')
298
+ {
299
+ jQuery(".ErrorZip").text("Must Entrer A Pincode");
300
+ setTimeout(function(){
301
+ jQuery(".ErrorZip").text('');
302
+
303
+ },2000);
304
+ }else if( zipcode.length !== 6 ){
305
+
306
+ jQuery(".ErrorZip").text("Must Entrer 6 Digits");
307
+ jQuery("#DeliveryZip").val('');
308
+ setTimeout(function(){
309
+
310
+ jQuery(".ErrorZip").text('');
311
+
312
+ },2000);
313
+ }else{
314
+
315
+
316
+ $.post("<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);?>js/action/deliverycheck-action.php", {
317
+
318
+ zip: $("#DeliveryZip").val(),
319
+ action: $("#DeliveryCheck").val()
320
+ },
321
+ function(data, status) {
322
+ if (status == "success") {
323
+
324
+
325
+
326
+ var json = $.parseJSON(data);
327
+
328
+
329
+ if ( json == null)
330
+ {
331
+
332
+ $("#ZIPfill,#ZIPfill2").css('display','block');
333
+
334
+
335
+
336
+ $("#ZIPUnfill,#ZIPUnfill2").css('display','none');
337
+
338
+
339
+
340
+ $("#ZipCode").text( zipcode );
341
+
342
+
343
+
344
+ $("#ZiptimeDay").text( 'Delivery not available' );
345
+
346
+ }else{
347
+
348
+ $("#ZIPfill,#ZIPfill2").css('display','block');
349
+
350
+
351
+
352
+ $("#ZIPUnfill,#ZIPUnfill2").css('display','none');
353
+
354
+
355
+
356
+ $("#ZipCode").text( json.PINCODE );
357
+
358
+
359
+
360
+ $("#ZiptimeDay").text( 'Estimated Delivery:3-5 business days. ' );
361
+
362
+
363
+
364
+ }
365
+
366
+ }
367
+
368
+ });
369
+
370
+ }
371
+
372
+
373
+
374
+
375
+
376
+ });
377
+
378
+
379
+
380
+
381
+
382
+
383
+ $("#editZip").click(function(){
384
+
385
+
386
+
387
+ $("#ZIPfill,#ZIPfill2").css('display','none');
388
+
389
+
390
+
391
+ $("#ZIPUnfill,#ZIPUnfill2").css('display','block');
392
+
393
+
394
+
395
+ });
396
+
397
+
398
+
399
+
400
+ });
401
+
402
+ jQuery.noConflict();
403
+ </script>
404
+
405
+
406
+
407
+
408
+ <div class="socialMedia" style="overflow:hidden;"> <span class='st_facebook_hcount' displayText='Facebook'></span> <span class='st_twitter_hcount' displayText='Tweet'></span> <span class='st_linkedin_hcount' displayText='LinkedIn'></span> <span class='st_pinterest_hcount' displayText='Pinterest'></span>
409
+
410
+ <!--<span class='st_email_hcount' displayText='Email'></span> -->
411
+
412
+ </div>
413
+ </div>
414
+
415
+
416
+ </div>
417
+ </div>
418
+ <?php if($this->getChildHtml('related_products')) {
419
+
420
+ echo '<div class="product_row_div">';
421
+
422
+ }
423
+
424
+ else {
425
+
426
+ echo '<div class="product_row_div" style="width:1000px; margin:0 0 0 0;">';
427
+
428
+ }
429
+
430
+
431
+
432
+
433
+
434
+ ?>
435
+ <?php $my_product = Mage::getModel('catalog/product')->load($_product->getId()); if ($my_product):?>
436
+ <div class="full-description clear">
437
+ <h2>PRODUCT DETAIL</h2>
438
+ <div class="description"><?php echo $my_product->getDescription(); ?></div>
439
+ </div>
440
+ <?php endif;?>
441
+ <?php if($_infoAccordion = $this->getChildHtml('info_accordion')): ?>
442
+ <div class="clear"><?php echo $_infoAccordion; ?></div>
443
+ <table class="data-table" id="product-attribute-specs-table" style="margin: -40px 0;">
444
+ <colgroup>
445
+ <col width="25%">
446
+ <col>
447
+ </colgroup>
448
+ <tbody>
449
+ <tr>
450
+ <th class="label">Availability </th>
451
+ <td id="availability_td_id" class="data"><script>document.write(jQuery('.addtocont .availability span').text());</script></td>
452
+ </tr>
453
+ <tr>
454
+ <th class="label">SKU</th>
455
+ <td id="product_code_td_id" class="data"><script>document.write(jQuery('.addtocont .product-code strong').text());</script></td>
456
+ </tr>
457
+ </tbody>
458
+ </table>
459
+ <?php endif; ?>
460
+ </div>
461
+ <div class="related_products_row_div">
462
+ <div class="product-collateral">
463
+ <?php // echo $this->getChildHtml('info_tabs') ?>
464
+ <?php echo $this->getChildHtml('product_additional_data') ?> </div>
465
+ <?php echo $this->getChildHtml('related_products') ?> <?php echo $this->getChildHtml('upsell_products') ?> </div>
466
+ </div>
467
+
468
+ <style>
469
+
470
+ .offercontent{border: 1px solid #bbb; margin-top:-18px; padding:10px; background: white; position: absolute; box-shadow: 0 4px 10px #999; display: none; z-index: 1000}
471
+ .offerclose{float:right; text-decoration: none; font-size:15px; margin-top:-7px;}
472
+ .offerclose:hover{text-decoration: none}
473
+ .offeropen {
474
+ float: left;
475
+ font-size: 14px;
476
+ margin-left: 120px;
477
+ margin-top: -44px;
478
+ color: #e36025
479
+ }
480
+ .offeropen:hover{text-decoration: none;}
481
+ </style>
482
+ <script>
483
+ var oflag=true;
484
+ /*jQuery('.offeropen').click(function(){
485
+ jQuery('.offercontent').toggle();
486
+ if(oflag){
487
+ jQuery('.offeropen').css('margin-top','-39px'); oflag=false;
488
+ }
489
+ else{
490
+ jQuery('.offeropen').css('margin-top','-44px'); oflag=true;
491
+ }
492
+
493
+ })
494
+ jQuery('.offerclose').click(function(){
495
+ jQuery('.offercontent').toggle();
496
+ if(oflag){
497
+ jQuery('.offeropen').css('margin-top','-39px'); oflag=false;
498
+ }
499
+ else{
500
+ jQuery('.offeropen').css('margin-top','-44px'); oflag=true;
501
+ }
502
+ })*/
503
+
504
+ jQuery(".offerbox").hover(
505
+ function(){
506
+ jQuery('.offercontent').toggle();
507
+ },
508
+ function(){
509
+ jQuery('.offercontent').toggle();
510
+ }
511
+ );
512
+
513
+
514
+
515
+
516
+ </script>
app/etc/modules/Wizard_MassStatus.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Wizard_MassStatus>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </Wizard_MassStatus>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Wizard_MassStatus</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Adds all order statuses created in "System &gt; Order Statuses" under action dropdown of "Sales Order".</summary>
10
+ <description>Mass Status Extension all order statuses created in "System &gt; Order Statuses" under action dropdown of "Sales Order" grid view plus one more extra option "Delete".&#xD;
11
+ Magento doesn't have delete order as default option. Using delete option of mass status you can delete multiple orders in one go.&#xD;
12
+ In Magento you can't cancel a processed order, this is a feature not a bug. But sometimes we face such circumstances when we need to change the order status to "Canceled".&#xD;
13
+ Using &lt;strong&gt;Mass Status&lt;/strong&gt; you can also change the status of a processed order to canceled*.</description>
14
+ <notes>New Extension</notes>
15
+ <authors><author><name>Sujeet Kr Singh</name><user>sujeet</user><email>sujeet.kumar.000@gmail.com</email></author></authors>
16
+ <date>2015-01-11</date>
17
+ <time>11:17:15</time>
18
+ <contents><target name="magecommunity"><dir name="Wizard"><dir name="DeliveryPin"><dir name="Block"><dir name="Adminhtml"><file name="Addupdate.php" hash="2c8bc77d7ffda97cd75ef9ad15ab7c75"/></dir></dir><dir name="Helper"><file name="Data.php" hash="4117aad2c9924399c9dcbc158f079f36"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="DeliverypinController.php" hash="d43a422c49417fcdfe881b6c80d6ad28"/></dir><file name="PinController.php" hash="5f1f061dffa1c7f2e61dd7b86a1b92ac"/></dir><dir name="etc"><file name="adminhtml.xml" hash="b8a74fd354e392f32df0b23f9151c59f"/><file name="config.xml" hash="68aca52854318f2bab6e58a4302bb741"/><file name="system.xml2" hash="2868b9114b8ab496f3b6d08a54e859e7"/></dir></dir><dir name="MassStatus"><dir name="Block"><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="6766cb57008956262acaa8f50a6ccf9a"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="95fe9b08090682417c93fb626568a7d9"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="MassstatusController.php" hash="cd7653203c1b8f286b44a90122cbea18"/></dir></dir><dir name="etc"><file name="config.xml" hash="fe81584e62e2314b7030927b3e8225e7"/><file name="system.xml" hash="512cef1987088c64454c9e3e0d5dfbdd"/></dir></dir><dir name="ShippingType"><dir name="Helper"><file name="Data.php" hash="f564cfb8c6f7176dceb9fdf0d0f97136"/></dir><dir name="controllers"><file name="CitiesController.php" hash="39d1a261e68310f07c9059b1dfce8951"/></dir><dir name="etc"><file name="adminhtml.xml" hash="3ecd111d8f1c43baf01578cfdb846fa5"/><file name="config.xml" hash="73c58329f8e2dc934c6b0121dbad902d"/></dir></dir><file name="billing_21nov.phtml" hash="1bf4e9197adcf79e4a40cdbb801b2c9a"/><file name="view_21nov.phtml" hash="35523e9363aa8d553aafe51cf05d22fc"/></dir></target><target name="mageetc"><dir name="modules"><file name="Wizard_MassStatus.xml" hash="391de738e56cf7f0b93a21a48195b515"/></dir></target></contents>
19
+ <compatible/>
20
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
21
+ </package>