Version Notes
This extension allow customer to place an order fast only with phone number or email.
Download this release
Release Info
Developer | freshcodes.in |
Extension | Freshcodes_Fastorder |
Version | 0.1.0 |
Comparing to | |
See all releases |
Version 0.1.0
- app/code/local/Freshcodes/Fastorder/Block/Adminhtml/Fastorderdetails.php +38 -0
- app/code/local/Freshcodes/Fastorder/Block/Adminhtml/Fastorderdetails/Edit.php +65 -0
- app/code/local/Freshcodes/Fastorder/Block/Adminhtml/Fastorderdetails/Edit/Form.php +17 -0
- app/code/local/Freshcodes/Fastorder/Block/Adminhtml/Fastorderdetails/Edit/Tab/Form.php +31 -0
- app/code/local/Freshcodes/Fastorder/Block/Adminhtml/Fastorderdetails/Edit/Tabs.php +43 -0
- app/code/local/Freshcodes/Fastorder/Block/Adminhtml/Fastorderdetails/Grid.php +124 -0
- app/code/local/Freshcodes/Fastorder/Block/Index.php +102 -0
- app/code/local/Freshcodes/Fastorder/Helper/Data.php +82 -0
- app/code/local/Freshcodes/Fastorder/Model/Fastorderdetails.php +33 -0
- app/code/local/Freshcodes/Fastorder/Model/Fastorderproduct.php +33 -0
- app/code/local/Freshcodes/Fastorder/Model/Fastorderproductoption.php +33 -0
- app/code/local/Freshcodes/Fastorder/Model/Mysql4/Fastorderdetails.php +30 -0
- app/code/local/Freshcodes/Fastorder/Model/Mysql4/Fastorderdetails/Collection.php +34 -0
- app/code/local/Freshcodes/Fastorder/Model/Mysql4/Fastorderproduct.php +30 -0
- app/code/local/Freshcodes/Fastorder/Model/Mysql4/Fastorderproduct/Collection.php +34 -0
- app/code/local/Freshcodes/Fastorder/Model/Mysql4/Fastorderproductoption.php +30 -0
- app/code/local/Freshcodes/Fastorder/Model/Mysql4/Fastorderproductoption/Collection.php +34 -0
- app/code/local/Freshcodes/Fastorder/controllers/Adminhtml/FastorderdetailsController.php +186 -0
- app/code/local/Freshcodes/Fastorder/controllers/IndexController.php +152 -0
- app/code/local/Freshcodes/Fastorder/etc/adminhtml.xml +47 -0
- app/code/local/Freshcodes/Fastorder/etc/config.xml +181 -0
- app/code/local/Freshcodes/Fastorder/etc/system.xml +168 -0
- app/code/local/Freshcodes/Fastorder/sql/fastorder_setup/mysql4-install-0.1.0.php +67 -0
- app/design/adminhtml/default/default/layout/fastorder.xml +37 -0
- app/design/adminhtml/default/default/template/fastorder/index.phtml +181 -0
- app/design/frontend/base/default/layout/fastorder.xml +53 -0
- app/design/frontend/base/default/template/fastorder/cart.phtml +56 -0
- app/design/frontend/base/default/template/fastorder/email/template/index.phtml +51 -0
- app/design/frontend/base/default/template/fastorder/index.phtml +56 -0
- app/etc/modules/Freshcodes_Fastorder.xml +10 -0
- app/locale/en_US/template/email/fastorder_custom_email.html +47 -0
- package.xml +18 -0
- skin/frontend/base/default/css/fastorder/styles.css +28 -0
app/code/local/Freshcodes/Fastorder/Block/Adminhtml/Fastorderdetails.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Block_Adminhtml_Fastorderdetails extends Mage_Adminhtml_Block_Widget_Grid_Container{
|
25 |
+
|
26 |
+
public function __construct()
|
27 |
+
{
|
28 |
+
|
29 |
+
$this->_controller = "adminhtml_fastorderdetails";
|
30 |
+
$this->_blockGroup = "fastorder";
|
31 |
+
$this->_headerText = Mage::helper("fastorder")->__("Fastorder Manager");
|
32 |
+
//$this->_addButtonLabel = Mage::helper("fastorder")->__("Add New Item");
|
33 |
+
parent::__construct();
|
34 |
+
$this->_removeButton('add');
|
35 |
+
|
36 |
+
}
|
37 |
+
|
38 |
+
}
|
app/code/local/Freshcodes/Fastorder/Block/Adminhtml/Fastorderdetails/Edit.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Block_Adminhtml_Fastorderdetails_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
25 |
+
{
|
26 |
+
public function __construct()
|
27 |
+
{
|
28 |
+
|
29 |
+
parent::__construct();
|
30 |
+
$this->_objectId = "fastorder_id";
|
31 |
+
$this->_blockGroup = "fastorder";
|
32 |
+
$this->_controller = "adminhtml_fastorderdetails";
|
33 |
+
$this->_updateButton("save", "label", Mage::helper("fastorder")->__("Save Fastorder"));
|
34 |
+
$this->_updateButton("delete", "label", Mage::helper("fastorder")->__("Delete Fastorder"));
|
35 |
+
|
36 |
+
$this->_addButton("saveandcontinue", array(
|
37 |
+
"label" => Mage::helper("fastorder")->__("Save And Continue Edit"),
|
38 |
+
"onclick" => "saveAndContinueEdit()",
|
39 |
+
"class" => "save",
|
40 |
+
), -100);
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
+
$this->_formScripts[] = "
|
45 |
+
|
46 |
+
function saveAndContinueEdit(){
|
47 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
48 |
+
}
|
49 |
+
";
|
50 |
+
}
|
51 |
+
|
52 |
+
public function getHeaderText()
|
53 |
+
{
|
54 |
+
if( Mage::registry("fastorderdetails_data") && Mage::registry("fastorderdetails_data")->getId() ){
|
55 |
+
|
56 |
+
return Mage::helper("fastorder")->__("Edit Fastorder '%s'", $this->htmlEscape(Mage::registry("fastorderdetails_data")->getId()));
|
57 |
+
|
58 |
+
}
|
59 |
+
else{
|
60 |
+
|
61 |
+
return Mage::helper("fastorder")->__("Add Item");
|
62 |
+
|
63 |
+
}
|
64 |
+
}
|
65 |
+
}
|
app/code/local/Freshcodes/Fastorder/Block/Adminhtml/Fastorderdetails/Edit/Form.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Freshcodes_Fastorder_Block_Adminhtml_Fastorderdetails_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
+
{
|
4 |
+
protected function _prepareForm()
|
5 |
+
{
|
6 |
+
$form = new Varien_Data_Form(array(
|
7 |
+
"id" => "edit_form",
|
8 |
+
"action" => $this->getUrl("*/*/save", array("id" => $this->getRequest()->getParam("id"))),
|
9 |
+
"method" => "post",
|
10 |
+
"enctype" =>"multipart/form-data",
|
11 |
+
)
|
12 |
+
);
|
13 |
+
$form->setUseContainer(true);
|
14 |
+
$this->setForm($form);
|
15 |
+
return parent::_prepareForm();
|
16 |
+
}
|
17 |
+
}
|
app/code/local/Freshcodes/Fastorder/Block/Adminhtml/Fastorderdetails/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Block_Adminhtml_Fastorderdetails_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
25 |
+
{
|
26 |
+
public function __construct()
|
27 |
+
{
|
28 |
+
parent::__construct();
|
29 |
+
$this->setTemplate('fastorder/index.phtml');
|
30 |
+
}
|
31 |
+
}
|
app/code/local/Freshcodes/Fastorder/Block/Adminhtml/Fastorderdetails/Edit/Tabs.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Block_Adminhtml_Fastorderdetails_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
25 |
+
{
|
26 |
+
public function __construct()
|
27 |
+
{
|
28 |
+
parent::__construct();
|
29 |
+
$this->setId("fastorderdetails_tabs");
|
30 |
+
$this->setDestElementId("edit_form");
|
31 |
+
$this->setTitle(Mage::helper("fastorder")->__("Fastorder Information"));
|
32 |
+
}
|
33 |
+
protected function _beforeToHtml()
|
34 |
+
{
|
35 |
+
$this->addTab("form_section", array(
|
36 |
+
"label" => Mage::helper("fastorder")->__("Fastorder Information"),
|
37 |
+
"title" => Mage::helper("fastorder")->__("Fastorder Information"),
|
38 |
+
"content" => $this->getLayout()->createBlock("fastorder/adminhtml_fastorderdetails_edit_tab_form")->toHtml(),
|
39 |
+
));
|
40 |
+
return parent::_beforeToHtml();
|
41 |
+
}
|
42 |
+
|
43 |
+
}
|
app/code/local/Freshcodes/Fastorder/Block/Adminhtml/Fastorderdetails/Grid.php
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Block_Adminhtml_Fastorderdetails_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
25 |
+
{
|
26 |
+
|
27 |
+
public function __construct()
|
28 |
+
{
|
29 |
+
parent::__construct();
|
30 |
+
$this->setId("fastorderdetailsGrid");
|
31 |
+
$this->setDefaultSort("fastorder_id");
|
32 |
+
$this->setDefaultDir("DESC");
|
33 |
+
$this->setSaveParametersInSession(true);
|
34 |
+
}
|
35 |
+
|
36 |
+
protected function _prepareCollection()
|
37 |
+
{
|
38 |
+
$collection = Mage::getModel("fastorder/fastorderdetails")->getCollection();
|
39 |
+
$this->setCollection($collection);
|
40 |
+
return parent::_prepareCollection();
|
41 |
+
}
|
42 |
+
protected function _prepareColumns()
|
43 |
+
{
|
44 |
+
$this->addColumn("fastorder_id", array(
|
45 |
+
"header" => Mage::helper("fastorder")->__("ID"),
|
46 |
+
"align" =>"right",
|
47 |
+
"width" => "50px",
|
48 |
+
"type" => "number",
|
49 |
+
"index" => "fastorder_id",
|
50 |
+
));
|
51 |
+
|
52 |
+
$this->addColumn('created_date', array(
|
53 |
+
'header' => Mage::helper('fastorder')->__('Created At'),
|
54 |
+
'index' => 'created_date',
|
55 |
+
'type' => 'datetime',
|
56 |
+
));
|
57 |
+
$this->addColumn("name", array(
|
58 |
+
"header" => Mage::helper("fastorder")->__("Name"),
|
59 |
+
"index" => "name",
|
60 |
+
));
|
61 |
+
$this->addColumn("email", array(
|
62 |
+
"header" => Mage::helper("fastorder")->__("Email"),
|
63 |
+
"index" => "email",
|
64 |
+
));
|
65 |
+
$this->addColumn("phone", array(
|
66 |
+
"header" => Mage::helper("fastorder")->__("Phone"),
|
67 |
+
"index" => "phone",
|
68 |
+
));
|
69 |
+
$this->addColumn('status', array(
|
70 |
+
'header' => Mage::helper('fastorder')->__('Status'),
|
71 |
+
'index' => 'status',
|
72 |
+
'type' => 'options',
|
73 |
+
'options'=>Freshcodes_Fastorder_Block_Adminhtml_Fastorderdetails_Grid::getOptionArray5(),
|
74 |
+
));
|
75 |
+
|
76 |
+
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
77 |
+
$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
|
78 |
+
|
79 |
+
return parent::_prepareColumns();
|
80 |
+
}
|
81 |
+
|
82 |
+
public function getRowUrl($row)
|
83 |
+
{
|
84 |
+
return $this->getUrl("*/*/edit", array("id" => $row->getId()));
|
85 |
+
}
|
86 |
+
|
87 |
+
|
88 |
+
|
89 |
+
protected function _prepareMassaction()
|
90 |
+
{
|
91 |
+
$this->setMassactionIdField('fastorder_id');
|
92 |
+
$this->getMassactionBlock()->setFormFieldName('fastorder_ids');
|
93 |
+
$this->getMassactionBlock()->setUseSelectAll(true);
|
94 |
+
$this->getMassactionBlock()->addItem('remove_fastorderdetails', array(
|
95 |
+
'label'=> Mage::helper('fastorder')->__('Remove Fastorderdetails'),
|
96 |
+
'url' => $this->getUrl('*/adminhtml_fastorderdetails/massRemove'),
|
97 |
+
'confirm' => Mage::helper('fastorder')->__('Are you sure?')
|
98 |
+
));
|
99 |
+
return $this;
|
100 |
+
}
|
101 |
+
|
102 |
+
static public function getOptionArray5()
|
103 |
+
{
|
104 |
+
$data_array=array();
|
105 |
+
$data_array['pending']='pending';
|
106 |
+
$data_array['processing']='processing';
|
107 |
+
$data_array['complete']='complete';
|
108 |
+
$data_array['closed']='closed';
|
109 |
+
$data_array['canceled']='canceled';
|
110 |
+
$data_array['holded']='holded';
|
111 |
+
return($data_array);
|
112 |
+
}
|
113 |
+
static public function getValueArray5()
|
114 |
+
{
|
115 |
+
$data_array=array();
|
116 |
+
foreach(Freshcodes_Fastorder_Block_Adminhtml_Fastorderdetails_Grid::getOptionArray5() as $k=>$v){
|
117 |
+
$data_array[]=array('value'=>$k,'label'=>$v);
|
118 |
+
}
|
119 |
+
return($data_array);
|
120 |
+
|
121 |
+
}
|
122 |
+
|
123 |
+
|
124 |
+
}
|
app/code/local/Freshcodes/Fastorder/Block/Index.php
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Block_Index extends Mage_Core_Block_Template{
|
25 |
+
public function _prepareLayout()
|
26 |
+
{
|
27 |
+
return parent::_prepareLayout();
|
28 |
+
}
|
29 |
+
public function getActive()
|
30 |
+
{
|
31 |
+
$totalItemsInCart = Mage::helper('checkout/cart')->getItemsCount();
|
32 |
+
if(Mage::getStoreConfig('fastorder/general/active') && $totalItemsInCart > 0)
|
33 |
+
{
|
34 |
+
return true;
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
public function getCheckCart()
|
39 |
+
{
|
40 |
+
|
41 |
+
}
|
42 |
+
public function getCustomerName()
|
43 |
+
{
|
44 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn())
|
45 |
+
{
|
46 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
47 |
+
return $customer->getName();
|
48 |
+
}
|
49 |
+
}
|
50 |
+
public function getCustomerEmail()
|
51 |
+
{
|
52 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn())
|
53 |
+
{
|
54 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
55 |
+
return $customer->getEmail();
|
56 |
+
}
|
57 |
+
}
|
58 |
+
public function getCustomerPhone()
|
59 |
+
{
|
60 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn())
|
61 |
+
{
|
62 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
63 |
+
return $customer->getPrimaryBillingAddress()->getTelephone();
|
64 |
+
}
|
65 |
+
}
|
66 |
+
public function getTitle()
|
67 |
+
{
|
68 |
+
if(Mage::getStoreConfig('fastorder/general/block_title'))
|
69 |
+
{
|
70 |
+
return Mage::getStoreConfig('fastorder/general/block_title');
|
71 |
+
}
|
72 |
+
else
|
73 |
+
{
|
74 |
+
return "FastOrder";
|
75 |
+
}
|
76 |
+
}
|
77 |
+
public function getSuccess()
|
78 |
+
{
|
79 |
+
return Mage::getStoreConfig('fastorder/general/success_messgae');
|
80 |
+
}
|
81 |
+
public function getFailured()
|
82 |
+
{
|
83 |
+
return Mage::getStoreConfig('fastorder/general/failure_messgae');
|
84 |
+
}
|
85 |
+
public function enablePhone()
|
86 |
+
{
|
87 |
+
return Mage::getStoreConfig('fastorder/general/phone');
|
88 |
+
}
|
89 |
+
public function enableName()
|
90 |
+
{
|
91 |
+
return Mage::getStoreConfig('fastorder/general/name');
|
92 |
+
}
|
93 |
+
public function enableComment()
|
94 |
+
{
|
95 |
+
return Mage::getStoreConfig('fastorder/general/comment');
|
96 |
+
}
|
97 |
+
|
98 |
+
|
99 |
+
|
100 |
+
|
101 |
+
|
102 |
+
}
|
app/code/local/Freshcodes/Fastorder/Helper/Data.php
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Helper_Data extends Mage_Core_Helper_Abstract
|
25 |
+
{
|
26 |
+
public function login()
|
27 |
+
{
|
28 |
+
if(!Mage::getStoreConfig('fastorder/general/guestcust'))
|
29 |
+
{
|
30 |
+
if(Mage::getSingleton('customer/session')->isLoggedIn())
|
31 |
+
{
|
32 |
+
return true;
|
33 |
+
}
|
34 |
+
}
|
35 |
+
else
|
36 |
+
{
|
37 |
+
return true;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
public function status()
|
42 |
+
{
|
43 |
+
if(Mage::getStoreConfig('fastorder/general/status'))
|
44 |
+
{
|
45 |
+
return Mage::getStoreConfig('fastorder/general/status');
|
46 |
+
}
|
47 |
+
else
|
48 |
+
{
|
49 |
+
return 'pending';
|
50 |
+
}
|
51 |
+
}
|
52 |
+
public function success()
|
53 |
+
{
|
54 |
+
if(Mage::getStoreConfig('fastorder/general/success'))
|
55 |
+
{
|
56 |
+
return Mage::getStoreConfig('fastorder/general/success');
|
57 |
+
}
|
58 |
+
else
|
59 |
+
{
|
60 |
+
return 'Your order successfully submited!';
|
61 |
+
}
|
62 |
+
}
|
63 |
+
public function failured()
|
64 |
+
{
|
65 |
+
if(Mage::getStoreConfig('fastorder/general/failured'))
|
66 |
+
{
|
67 |
+
return Mage::getStoreConfig('fastorder/general/failured');
|
68 |
+
}
|
69 |
+
else
|
70 |
+
{
|
71 |
+
return 'Sorry! Your order not submited!';
|
72 |
+
}
|
73 |
+
}
|
74 |
+
public function clearCart()
|
75 |
+
{
|
76 |
+
if(Mage::getStoreConfig('fastorder/general/cartempty'))
|
77 |
+
{
|
78 |
+
return true;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
app/code/local/Freshcodes/Fastorder/Model/Fastorderdetails.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Model_Fastorderdetails extends Mage_Core_Model_Abstract
|
25 |
+
{
|
26 |
+
protected function _construct(){
|
27 |
+
|
28 |
+
$this->_init("fastorder/fastorderdetails");
|
29 |
+
|
30 |
+
}
|
31 |
+
|
32 |
+
}
|
33 |
+
|
app/code/local/Freshcodes/Fastorder/Model/Fastorderproduct.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Model_Fastorderproduct extends Mage_Core_Model_Abstract
|
25 |
+
{
|
26 |
+
protected function _construct(){
|
27 |
+
|
28 |
+
$this->_init("fastorder/fastorderproduct");
|
29 |
+
|
30 |
+
}
|
31 |
+
|
32 |
+
}
|
33 |
+
|
app/code/local/Freshcodes/Fastorder/Model/Fastorderproductoption.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Model_Fastorderproductoption extends Mage_Core_Model_Abstract
|
25 |
+
{
|
26 |
+
protected function _construct(){
|
27 |
+
|
28 |
+
$this->_init("fastorder/fastorderproductoption");
|
29 |
+
|
30 |
+
}
|
31 |
+
|
32 |
+
}
|
33 |
+
|
app/code/local/Freshcodes/Fastorder/Model/Mysql4/Fastorderdetails.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Model_Mysql4_Fastorderdetails extends Mage_Core_Model_Mysql4_Abstract
|
25 |
+
{
|
26 |
+
protected function _construct()
|
27 |
+
{
|
28 |
+
$this->_init("fastorder/fastorderdetails", "fastorder_id");
|
29 |
+
}
|
30 |
+
}
|
app/code/local/Freshcodes/Fastorder/Model/Mysql4/Fastorderdetails/Collection.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Model_Mysql4_Fastorderdetails_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
25 |
+
{
|
26 |
+
|
27 |
+
public function _construct(){
|
28 |
+
$this->_init("fastorder/fastorderdetails");
|
29 |
+
}
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
}
|
34 |
+
|
app/code/local/Freshcodes/Fastorder/Model/Mysql4/Fastorderproduct.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Model_Mysql4_Fastorderproduct extends Mage_Core_Model_Mysql4_Abstract
|
25 |
+
{
|
26 |
+
protected function _construct()
|
27 |
+
{
|
28 |
+
$this->_init("fastorder/fastorderproduct", "id");
|
29 |
+
}
|
30 |
+
}
|
app/code/local/Freshcodes/Fastorder/Model/Mysql4/Fastorderproduct/Collection.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Model_Mysql4_Fastorderproduct_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
25 |
+
{
|
26 |
+
|
27 |
+
public function _construct(){
|
28 |
+
$this->_init("fastorder/fastorderproduct");
|
29 |
+
}
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
}
|
34 |
+
|
app/code/local/Freshcodes/Fastorder/Model/Mysql4/Fastorderproductoption.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Model_Mysql4_Fastorderproductoption extends Mage_Core_Model_Mysql4_Abstract
|
25 |
+
{
|
26 |
+
protected function _construct()
|
27 |
+
{
|
28 |
+
$this->_init("fastorder/fastorderproductoption", "id");
|
29 |
+
}
|
30 |
+
}
|
app/code/local/Freshcodes/Fastorder/Model/Mysql4/Fastorderproductoption/Collection.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Model_Mysql4_Fastorderproductoption_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
25 |
+
{
|
26 |
+
|
27 |
+
public function _construct(){
|
28 |
+
$this->_init("fastorder/fastorderproductoption");
|
29 |
+
}
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
}
|
34 |
+
|
app/code/local/Freshcodes/Fastorder/controllers/Adminhtml/FastorderdetailsController.php
ADDED
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_Adminhtml_FastorderdetailsController extends Mage_Adminhtml_Controller_Action
|
25 |
+
{
|
26 |
+
protected function _initAction()
|
27 |
+
{
|
28 |
+
$this->loadLayout()->_setActiveMenu("fastorder/fastorderdetails")->_addBreadcrumb(Mage::helper("adminhtml")->__("Fastorderdetails Manager"),Mage::helper("adminhtml")->__("Fastorderdetails Manager"));
|
29 |
+
return $this;
|
30 |
+
}
|
31 |
+
public function indexAction()
|
32 |
+
{
|
33 |
+
$this->_title($this->__("Fastorder"));
|
34 |
+
$this->_title($this->__("Manager Fastorderdetails"));
|
35 |
+
|
36 |
+
$this->_initAction();
|
37 |
+
$this->renderLayout();
|
38 |
+
}
|
39 |
+
public function editAction()
|
40 |
+
{
|
41 |
+
$this->_title($this->__("Fastorder"));
|
42 |
+
$this->_title($this->__("Fastorderdetails"));
|
43 |
+
$this->_title($this->__("Edit Fastorder"));
|
44 |
+
|
45 |
+
$id = $this->getRequest()->getParam("id");
|
46 |
+
$model = Mage::getModel("fastorder/fastorderdetails")->load($id);
|
47 |
+
if ($model->getId()) {
|
48 |
+
Mage::register("fastorderdetails_data", $model);
|
49 |
+
$this->loadLayout();
|
50 |
+
$this->_setActiveMenu("fastorder/fastorderdetails");
|
51 |
+
$this->_addBreadcrumb(Mage::helper("adminhtml")->__("Fastorderdetails Manager"), Mage::helper("adminhtml")->__("Fastorderdetails Manager"));
|
52 |
+
$this->_addBreadcrumb(Mage::helper("adminhtml")->__("Fastorderdetails Description"), Mage::helper("adminhtml")->__("Fastorderdetails Description"));
|
53 |
+
$this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
|
54 |
+
$this->_addContent($this->getLayout()->createBlock("fastorder/adminhtml_fastorderdetails_edit"))->_addLeft($this->getLayout()->createBlock("fastorder/adminhtml_fastorderdetails_edit_tabs"));
|
55 |
+
$this->renderLayout();
|
56 |
+
}
|
57 |
+
else {
|
58 |
+
Mage::getSingleton("adminhtml/session")->addError(Mage::helper("fastorder")->__("Item does not exist."));
|
59 |
+
$this->_redirect("*/*/");
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
public function newAction()
|
64 |
+
{
|
65 |
+
|
66 |
+
$this->_title($this->__("Fastorder"));
|
67 |
+
$this->_title($this->__("Fastorderdetails"));
|
68 |
+
$this->_title($this->__("New Item"));
|
69 |
+
|
70 |
+
$id = $this->getRequest()->getParam("id");
|
71 |
+
$model = Mage::getModel("fastorder/fastorderdetails")->load($id);
|
72 |
+
|
73 |
+
$data = Mage::getSingleton("adminhtml/session")->getFormData(true);
|
74 |
+
if (!empty($data)) {
|
75 |
+
$model->setData($data);
|
76 |
+
}
|
77 |
+
|
78 |
+
Mage::register("fastorderdetails_data", $model);
|
79 |
+
|
80 |
+
$this->loadLayout();
|
81 |
+
$this->_setActiveMenu("fastorder/fastorderdetails");
|
82 |
+
|
83 |
+
$this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
|
84 |
+
|
85 |
+
$this->_addBreadcrumb(Mage::helper("adminhtml")->__("Fastorderdetails Manager"), Mage::helper("adminhtml")->__("Fastorderdetails Manager"));
|
86 |
+
$this->_addBreadcrumb(Mage::helper("adminhtml")->__("Fastorderdetails Description"), Mage::helper("adminhtml")->__("Fastorderdetails Description"));
|
87 |
+
|
88 |
+
|
89 |
+
$this->_addContent($this->getLayout()->createBlock("fastorder/adminhtml_fastorderdetails_edit"))->_addLeft($this->getLayout()->createBlock("fastorder/adminhtml_fastorderdetails_edit_tabs"));
|
90 |
+
|
91 |
+
$this->renderLayout();
|
92 |
+
|
93 |
+
}
|
94 |
+
public function saveAction()
|
95 |
+
{
|
96 |
+
|
97 |
+
$post_data=$this->getRequest()->getPost();
|
98 |
+
|
99 |
+
|
100 |
+
if ($post_data) {
|
101 |
+
|
102 |
+
try {
|
103 |
+
|
104 |
+
|
105 |
+
|
106 |
+
$model = Mage::getModel("fastorder/fastorderdetails")
|
107 |
+
->addData($post_data)
|
108 |
+
->setId($this->getRequest()->getParam("id"))
|
109 |
+
->save();
|
110 |
+
|
111 |
+
Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Fastorderdetails was successfully saved"));
|
112 |
+
Mage::getSingleton("adminhtml/session")->setFastorderdetailsData(false);
|
113 |
+
|
114 |
+
if ($this->getRequest()->getParam("back")) {
|
115 |
+
$this->_redirect("*/*/edit", array("id" => $model->getId()));
|
116 |
+
return;
|
117 |
+
}
|
118 |
+
$this->_redirect("*/*/");
|
119 |
+
return;
|
120 |
+
}
|
121 |
+
catch (Exception $e) {
|
122 |
+
Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
|
123 |
+
Mage::getSingleton("adminhtml/session")->setFastorderdetailsData($this->getRequest()->getPost());
|
124 |
+
$this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
|
125 |
+
return;
|
126 |
+
}
|
127 |
+
|
128 |
+
}
|
129 |
+
$this->_redirect("*/*/");
|
130 |
+
}
|
131 |
+
|
132 |
+
|
133 |
+
|
134 |
+
public function deleteAction()
|
135 |
+
{
|
136 |
+
if( $this->getRequest()->getParam("id") > 0 ) {
|
137 |
+
try {
|
138 |
+
$model = Mage::getModel("fastorder/fastorderdetails");
|
139 |
+
$model->setId($this->getRequest()->getParam("id"))->delete();
|
140 |
+
Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item was successfully deleted"));
|
141 |
+
$this->_redirect("*/*/");
|
142 |
+
}
|
143 |
+
catch (Exception $e) {
|
144 |
+
Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
|
145 |
+
$this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
|
146 |
+
}
|
147 |
+
}
|
148 |
+
$this->_redirect("*/*/");
|
149 |
+
}
|
150 |
+
|
151 |
+
|
152 |
+
public function massRemoveAction()
|
153 |
+
{
|
154 |
+
try {
|
155 |
+
$ids = $this->getRequest()->getPost('fastorder_ids', array());
|
156 |
+
foreach ($ids as $id) {
|
157 |
+
$model = Mage::getModel("fastorder/fastorderdetails");
|
158 |
+
$model->setId($id)->delete();
|
159 |
+
}
|
160 |
+
Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
|
161 |
+
}
|
162 |
+
catch (Exception $e) {
|
163 |
+
Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
|
164 |
+
}
|
165 |
+
$this->_redirect('*/*/');
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Export order grid to CSV format
|
170 |
+
*/
|
171 |
+
public function exportCsvAction()
|
172 |
+
{
|
173 |
+
$fileName = 'fastorderdetails.csv';
|
174 |
+
$grid = $this->getLayout()->createBlock('fastorder/adminhtml_fastorderdetails_grid');
|
175 |
+
$this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
|
176 |
+
}
|
177 |
+
/**
|
178 |
+
* Export order grid to Excel XML format
|
179 |
+
*/
|
180 |
+
public function exportExcelAction()
|
181 |
+
{
|
182 |
+
$fileName = 'fastorderdetails.xml';
|
183 |
+
$grid = $this->getLayout()->createBlock('fastorder/adminhtml_fastorderdetails_grid');
|
184 |
+
$this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
|
185 |
+
}
|
186 |
+
}
|
app/code/local/Freshcodes/Fastorder/controllers/IndexController.php
ADDED
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
class Freshcodes_Fastorder_IndexController extends Mage_Core_Controller_Front_Action{
|
25 |
+
public function IndexAction() {
|
26 |
+
|
27 |
+
$this->loadLayout();
|
28 |
+
$this->getLayout()->getBlock("head")->setTitle($this->__("Fastorder"));
|
29 |
+
$breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
|
30 |
+
$breadcrumbs->addCrumb("home", array(
|
31 |
+
"label" => $this->__("Home Page"),
|
32 |
+
"title" => $this->__("Home Page"),
|
33 |
+
"link" => Mage::getBaseUrl()
|
34 |
+
));
|
35 |
+
|
36 |
+
$breadcrumbs->addCrumb("fastorder", array(
|
37 |
+
"label" => $this->__("Fastorder"),
|
38 |
+
"title" => $this->__("Fastorder")
|
39 |
+
));
|
40 |
+
$this->_initLayoutMessages('core/session');
|
41 |
+
$this->renderLayout();
|
42 |
+
|
43 |
+
}
|
44 |
+
public function postAction() {
|
45 |
+
|
46 |
+
$cart = Mage::helper('checkout/cart')->getCart()->getQuote()->getAllItems();
|
47 |
+
$helper = Mage::helper('fastorder');
|
48 |
+
if(!$helper->login())
|
49 |
+
{
|
50 |
+
Mage::getSingleton('core/session')->addError('Fastorder not enable for guest account!');
|
51 |
+
$this->_redirect("checkout/cart");
|
52 |
+
return;
|
53 |
+
}
|
54 |
+
//$status = $helper->status();
|
55 |
+
$post = $this->getRequest()->getPost();
|
56 |
+
$model = Mage::getModel("fastorder/fastorderdetails");
|
57 |
+
$curent_date = date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time()));
|
58 |
+
$post['created_date'] = $curent_date;
|
59 |
+
$post['status'] = $helper->status();
|
60 |
+
$model->setData($post);
|
61 |
+
try {
|
62 |
+
$model->save();
|
63 |
+
$fastorderId = $model->getId();
|
64 |
+
|
65 |
+
foreach($cart as $item) {
|
66 |
+
if ($item->getParentItemId()) {
|
67 |
+
continue;
|
68 |
+
}
|
69 |
+
/*$productName = $item->getProduct()->getName();
|
70 |
+
$productSku = $item->getProduct()->getSku();
|
71 |
+
$productPrice = $item->getPrice();
|
72 |
+
$productDis = $item->getDiscountAmount();
|
73 |
+
$productQty = $item->getQty();*/
|
74 |
+
|
75 |
+
$modelProduct = Mage::getModel("fastorder/fastorderproduct");
|
76 |
+
$modelProduct->setFastorderId($fastorderId);
|
77 |
+
$modelProduct->setProductSku($item->getProduct()->getSku());
|
78 |
+
$modelProduct->setProductName($item->getProduct()->getName());
|
79 |
+
$modelProduct->setQty($item->getQty());
|
80 |
+
$modelProduct->setProductPrice($item->getPrice());
|
81 |
+
$modelProduct->setProductDiscount($item->getDiscountAmount());
|
82 |
+
$modelProduct->save();
|
83 |
+
$fastorderproductId = $modelProduct->getId();
|
84 |
+
$modelproductoption = Mage::getModel("fastorder/fastorderproductoption");
|
85 |
+
/* get custom option value */
|
86 |
+
$_customOptions = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
|
87 |
+
$productData = array();
|
88 |
+
foreach($_customOptions['options'] as $_option)
|
89 |
+
{
|
90 |
+
$modelproductoption->setProductdetailsId($fastorderproductId);
|
91 |
+
$modelproductoption->setLabel($_option['label']);
|
92 |
+
$modelproductoption->setValue($_option['value']);
|
93 |
+
$modelproductoption->save();
|
94 |
+
$modelproductoption->unsetData();
|
95 |
+
}
|
96 |
+
|
97 |
+
}
|
98 |
+
/* send mail */
|
99 |
+
$emailTemplate = Mage::getModel('core/email_template')->loadDefault('fastorder_email_template');
|
100 |
+
|
101 |
+
//Getting the Store E-Mail Sender Name.
|
102 |
+
$senderName = Mage::getStoreConfig('trans_email/ident_general/name');
|
103 |
+
|
104 |
+
//Getting the Store General E-Mail.
|
105 |
+
$senderEmail = Mage::getStoreConfig('trans_email/ident_general/email');
|
106 |
+
|
107 |
+
//Variables for Confirmation Mail.
|
108 |
+
$emailTemplateVariables = array();
|
109 |
+
|
110 |
+
$emailTemplateVariables['name'] = $post['name'];
|
111 |
+
|
112 |
+
//Appending the Custom Variables to Template.
|
113 |
+
$processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
|
114 |
+
|
115 |
+
//Sending E-Mail to Customers.
|
116 |
+
$mail = Mage::getModel('core/email')
|
117 |
+
->setToName($post['name'])
|
118 |
+
->setToEmail($post['email'])
|
119 |
+
->setBody($processedTemplate)
|
120 |
+
->setSubject('Fastorder Request # '.$fastorderId)
|
121 |
+
->setFromEmail($senderEmail)
|
122 |
+
->setFromName($senderName)
|
123 |
+
->setType('html');
|
124 |
+
try{
|
125 |
+
|
126 |
+
//Confimation E-Mail Send
|
127 |
+
$mail->send();
|
128 |
+
|
129 |
+
}
|
130 |
+
catch(Exception $error)
|
131 |
+
{
|
132 |
+
Mage::getSingleton('core/session')->addError('Enable to send mail!');
|
133 |
+
$this->_redirect("checkout/cart");
|
134 |
+
return;
|
135 |
+
}
|
136 |
+
|
137 |
+
/* send mail over */
|
138 |
+
Mage::getSingleton('core/session')->addSuccess($helper->success());
|
139 |
+
if($helper->clearCart()):
|
140 |
+
Mage::getSingleton('checkout/session')->clear();
|
141 |
+
endif;
|
142 |
+
//Mage::getSingleton('checkout/cart')->truncate();
|
143 |
+
//Mage::getSingleton('checkout/session')->clear();
|
144 |
+
$this->_redirect("checkout/cart");
|
145 |
+
}
|
146 |
+
catch (Exception $e) {
|
147 |
+
//$FailuredMessage = Mage::getStoreConfig('fastorder/general/failured');
|
148 |
+
Mage::getSingleton('core/session')->addError($helper->failured());
|
149 |
+
$this->_redirect("checkout/cart");
|
150 |
+
}
|
151 |
+
}
|
152 |
+
}
|
app/code/local/Freshcodes/Fastorder/etc/adminhtml.xml
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Freshcodes
|
5 |
+
*
|
6 |
+
* It is also available through the world-wide-web at this URL:
|
7 |
+
* http://freshcodes.in
|
8 |
+
*
|
9 |
+
* ==============================================================
|
10 |
+
* MAGENTO EDITION USAGE NOTICE
|
11 |
+
* ==============================================================
|
12 |
+
* This package designed for Magento COMMUNITY edition
|
13 |
+
* Freshcodes does not guarantee correct work of this extension
|
14 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
15 |
+
* Freshcodes does not provide extension support in case of
|
16 |
+
* incorrect edition usage.
|
17 |
+
* ==============================================================
|
18 |
+
*
|
19 |
+
* @category Freshcodes
|
20 |
+
* @package Freshcodes_Fastorder
|
21 |
+
* @version 0.1.0
|
22 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
23 |
+
*
|
24 |
+
*/
|
25 |
+
-->
|
26 |
+
<config>
|
27 |
+
<acl>
|
28 |
+
<resources>
|
29 |
+
<admin>
|
30 |
+
<children>
|
31 |
+
<system>
|
32 |
+
<children>
|
33 |
+
<config>
|
34 |
+
<children>
|
35 |
+
<fastorder translate="title" module="fastorder">
|
36 |
+
<title>Fastorder Section</title>
|
37 |
+
<sort_order>0</sort_order>
|
38 |
+
</fastorder>
|
39 |
+
</children>
|
40 |
+
</config>
|
41 |
+
</children>
|
42 |
+
</system>
|
43 |
+
</children>
|
44 |
+
</admin>
|
45 |
+
</resources>
|
46 |
+
</acl>
|
47 |
+
</config>
|
app/code/local/Freshcodes/Fastorder/etc/config.xml
ADDED
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Freshcodes
|
5 |
+
*
|
6 |
+
* It is also available through the world-wide-web at this URL:
|
7 |
+
* http://freshcodes.in
|
8 |
+
*
|
9 |
+
* ==============================================================
|
10 |
+
* MAGENTO EDITION USAGE NOTICE
|
11 |
+
* ==============================================================
|
12 |
+
* This package designed for Magento COMMUNITY edition
|
13 |
+
* Freshcodes does not guarantee correct work of this extension
|
14 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
15 |
+
* Freshcodes does not provide extension support in case of
|
16 |
+
* incorrect edition usage.
|
17 |
+
* ==============================================================
|
18 |
+
*
|
19 |
+
* @category Freshcodes
|
20 |
+
* @package Freshcodes_Fastorder
|
21 |
+
* @version 0.1.0
|
22 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
23 |
+
*
|
24 |
+
*/
|
25 |
+
-->
|
26 |
+
<config>
|
27 |
+
<modules>
|
28 |
+
<Freshcodes_Fastorder>
|
29 |
+
<version>0.1.0</version>
|
30 |
+
</Freshcodes_Fastorder>
|
31 |
+
</modules>
|
32 |
+
<frontend>
|
33 |
+
<routers>
|
34 |
+
<fastorder>
|
35 |
+
<use>standard</use>
|
36 |
+
<args>
|
37 |
+
<module>Freshcodes_Fastorder</module>
|
38 |
+
<frontName>fastorder</frontName>
|
39 |
+
</args>
|
40 |
+
</fastorder>
|
41 |
+
</routers>
|
42 |
+
<layout>
|
43 |
+
<updates>
|
44 |
+
<fastorder>
|
45 |
+
<file>fastorder.xml</file>
|
46 |
+
</fastorder>
|
47 |
+
</updates>
|
48 |
+
</layout>
|
49 |
+
</frontend>
|
50 |
+
<global>
|
51 |
+
<helpers>
|
52 |
+
<fastorder>
|
53 |
+
<class>Freshcodes_Fastorder_Helper</class>
|
54 |
+
</fastorder>
|
55 |
+
</helpers>
|
56 |
+
<blocks>
|
57 |
+
<fastorder>
|
58 |
+
<class>Freshcodes_Fastorder_Block</class>
|
59 |
+
</fastorder>
|
60 |
+
</blocks>
|
61 |
+
<models>
|
62 |
+
<fastorder>
|
63 |
+
<class>Freshcodes_Fastorder_Model</class>
|
64 |
+
<resourceModel>fastorder_mysql4</resourceModel>
|
65 |
+
</fastorder>
|
66 |
+
<fastorder_mysql4>
|
67 |
+
<class>Freshcodes_Fastorder_Model_Mysql4</class>
|
68 |
+
<entities>
|
69 |
+
<fastorderdetails>
|
70 |
+
<table>fastorderdetails</table>
|
71 |
+
</fastorderdetails>
|
72 |
+
<fastorderproduct>
|
73 |
+
<table>fastorderproduct</table>
|
74 |
+
</fastorderproduct>
|
75 |
+
<fastorderproductoption>
|
76 |
+
<table>fastorderproductoption</table>
|
77 |
+
</fastorderproductoption>
|
78 |
+
</entities>
|
79 |
+
</fastorder_mysql4>
|
80 |
+
</models>
|
81 |
+
<resources>
|
82 |
+
<fastorder_setup>
|
83 |
+
<setup>
|
84 |
+
<module>Freshcodes_Fastorder</module>
|
85 |
+
</setup>
|
86 |
+
<connection>
|
87 |
+
<use>core_setup</use>
|
88 |
+
</connection>
|
89 |
+
</fastorder_setup>
|
90 |
+
<fastorder_write>
|
91 |
+
<connection>
|
92 |
+
<use>core_write</use>
|
93 |
+
</connection>
|
94 |
+
</fastorder_write>
|
95 |
+
<fastorder_read>
|
96 |
+
<connection>
|
97 |
+
<use>core_read</use>
|
98 |
+
</connection>
|
99 |
+
</fastorder_read>
|
100 |
+
</resources>
|
101 |
+
|
102 |
+
<template>
|
103 |
+
<email>
|
104 |
+
<fastorder_email_template module="fastorder">
|
105 |
+
<label>Fastorder custom email</label>
|
106 |
+
<file>fastorder_custom_email.html</file>
|
107 |
+
<type>html</type>
|
108 |
+
</fastorder_email_template>
|
109 |
+
</email>
|
110 |
+
</template>
|
111 |
+
<default>
|
112 |
+
<email>
|
113 |
+
<template>fastorder_email_template</template>
|
114 |
+
</email>
|
115 |
+
</default>
|
116 |
+
|
117 |
+
</global>
|
118 |
+
<admin>
|
119 |
+
<routers>
|
120 |
+
<fastorder>
|
121 |
+
<use>admin</use>
|
122 |
+
<args>
|
123 |
+
<module>Freshcodes_Fastorder</module>
|
124 |
+
<frontName>fastorder</frontName>
|
125 |
+
</args>
|
126 |
+
</fastorder>
|
127 |
+
</routers>
|
128 |
+
</admin>
|
129 |
+
<adminhtml>
|
130 |
+
<menu>
|
131 |
+
<fastorder module="fastorder">
|
132 |
+
<title>Fastorder</title>
|
133 |
+
<sort_order>100</sort_order>
|
134 |
+
<children>
|
135 |
+
<fastorderdetails module="fastorder">
|
136 |
+
<title>Manage Fastorderdetails</title>
|
137 |
+
<sort_order>0</sort_order>
|
138 |
+
<action>fastorder/adminhtml_fastorderdetails</action>
|
139 |
+
</fastorderdetails>
|
140 |
+
<!--<fastorderproduct module="fastorder">
|
141 |
+
<title>Manage Fastorderproduct</title>
|
142 |
+
<sort_order>10</sort_order>
|
143 |
+
<action>fastorder/adminhtml_fastorderproduct</action>
|
144 |
+
</fastorderproduct>-->
|
145 |
+
</children>
|
146 |
+
</fastorder>
|
147 |
+
</menu>
|
148 |
+
<acl>
|
149 |
+
<resources>
|
150 |
+
<all>
|
151 |
+
<title>Allow Everything</title>
|
152 |
+
</all>
|
153 |
+
<admin>
|
154 |
+
<children>
|
155 |
+
<fastorder translate="title" module="fastorder">
|
156 |
+
<title>Fastorder</title>
|
157 |
+
<sort_order>1000</sort_order>
|
158 |
+
<children>
|
159 |
+
<fastorderdetails translate="title">
|
160 |
+
<title>Manage Fastorderdetails</title>
|
161 |
+
<sort_order>0</sort_order>
|
162 |
+
</fastorderdetails>
|
163 |
+
<fastorderproduct translate="title">
|
164 |
+
<title>Manage Fastorderproduct</title>
|
165 |
+
<sort_order>10</sort_order>
|
166 |
+
</fastorderproduct>
|
167 |
+
</children>
|
168 |
+
</fastorder>
|
169 |
+
</children>
|
170 |
+
</admin>
|
171 |
+
</resources>
|
172 |
+
</acl>
|
173 |
+
<layout>
|
174 |
+
<updates>
|
175 |
+
<fastorder>
|
176 |
+
<file>fastorder.xml</file>
|
177 |
+
</fastorder>
|
178 |
+
</updates>
|
179 |
+
</layout>
|
180 |
+
</adminhtml>
|
181 |
+
</config>
|
app/code/local/Freshcodes/Fastorder/etc/system.xml
ADDED
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Freshcodes
|
5 |
+
*
|
6 |
+
* It is also available through the world-wide-web at this URL:
|
7 |
+
* http://freshcodes.in
|
8 |
+
*
|
9 |
+
* ==============================================================
|
10 |
+
* MAGENTO EDITION USAGE NOTICE
|
11 |
+
* ==============================================================
|
12 |
+
* This package designed for Magento COMMUNITY edition
|
13 |
+
* Freshcodes does not guarantee correct work of this extension
|
14 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
15 |
+
* Freshcodes does not provide extension support in case of
|
16 |
+
* incorrect edition usage.
|
17 |
+
* ==============================================================
|
18 |
+
*
|
19 |
+
* @category Freshcodes
|
20 |
+
* @package Freshcodes_Fastorder
|
21 |
+
* @version 0.1.0
|
22 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
23 |
+
*
|
24 |
+
*/
|
25 |
+
-->
|
26 |
+
<config>
|
27 |
+
<tabs>
|
28 |
+
<fastorder translate="label" module="fastorder">
|
29 |
+
<label>Freshcodes</label>
|
30 |
+
<sort_order>0</sort_order>
|
31 |
+
</fastorder>
|
32 |
+
</tabs>
|
33 |
+
<sections>
|
34 |
+
<fastorder translate="label" module="fastorder">
|
35 |
+
<label>Fastorder</label>
|
36 |
+
<tab>fastorder</tab>
|
37 |
+
<frontend_type>text</frontend_type>
|
38 |
+
<sort_order>0</sort_order>
|
39 |
+
<show_in_default>1</show_in_default>
|
40 |
+
<show_in_website>1</show_in_website>
|
41 |
+
<show_in_store>1</show_in_store>
|
42 |
+
<groups>
|
43 |
+
<general translate="label">
|
44 |
+
<label>General</label>
|
45 |
+
<frontend_type>text</frontend_type>
|
46 |
+
<sort_order>0</sort_order>
|
47 |
+
<show_in_default>1</show_in_default>
|
48 |
+
<show_in_website>1</show_in_website>
|
49 |
+
<show_in_store>1</show_in_store>
|
50 |
+
<fields>
|
51 |
+
<active translate="label">
|
52 |
+
<label>Enable Fastorder</label>
|
53 |
+
<frontend_type>select</frontend_type>
|
54 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
55 |
+
<sort_order>0</sort_order>
|
56 |
+
<show_in_default>1</show_in_default>
|
57 |
+
<show_in_website>1</show_in_website>
|
58 |
+
<show_in_store>1</show_in_store>
|
59 |
+
</active>
|
60 |
+
<guestcust translate="label">
|
61 |
+
<label>Enable Fastorder For Guest</label>
|
62 |
+
<frontend_type>select</frontend_type>
|
63 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
64 |
+
<sort_order>0</sort_order>
|
65 |
+
<show_in_default>1</show_in_default>
|
66 |
+
<show_in_website>1</show_in_website>
|
67 |
+
<show_in_store>1</show_in_store>
|
68 |
+
</guestcust>
|
69 |
+
<status translate="label">
|
70 |
+
<label>Order Status</label>
|
71 |
+
<frontend_type>select</frontend_type>
|
72 |
+
<source_model>adminhtml/system_config_source_order_status</source_model>
|
73 |
+
<sort_order>1</sort_order>
|
74 |
+
<show_in_default>1</show_in_default>
|
75 |
+
<show_in_website>1</show_in_website>
|
76 |
+
<show_in_store>1</show_in_store>
|
77 |
+
</status>
|
78 |
+
<cartempty translate="label">
|
79 |
+
<label>Clear Cart after Fastorder</label>
|
80 |
+
<frontend_type>select</frontend_type>
|
81 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
82 |
+
<sort_order>2</sort_order>
|
83 |
+
<show_in_default>1</show_in_default>
|
84 |
+
<show_in_website>1</show_in_website>
|
85 |
+
<show_in_store>1</show_in_store>
|
86 |
+
</cartempty>
|
87 |
+
<name translate="label">
|
88 |
+
<label>Enable Name Field</label>
|
89 |
+
<frontend_type>select</frontend_type>
|
90 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
91 |
+
<sort_order>3</sort_order>
|
92 |
+
<show_in_default>1</show_in_default>
|
93 |
+
<show_in_website>1</show_in_website>
|
94 |
+
<show_in_store>1</show_in_store>
|
95 |
+
</name>
|
96 |
+
|
97 |
+
<phone translate="label">
|
98 |
+
<label>Enable Phone Field</label>
|
99 |
+
<frontend_type>select</frontend_type>
|
100 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
101 |
+
<sort_order>4</sort_order>
|
102 |
+
<show_in_default>1</show_in_default>
|
103 |
+
<show_in_website>1</show_in_website>
|
104 |
+
<show_in_store>1</show_in_store>
|
105 |
+
</phone>
|
106 |
+
<comment translate="label">
|
107 |
+
<label>Enable Comment Field</label>
|
108 |
+
<frontend_type>select</frontend_type>
|
109 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
110 |
+
<sort_order>5</sort_order>
|
111 |
+
<show_in_default>1</show_in_default>
|
112 |
+
<show_in_website>1</show_in_website>
|
113 |
+
<show_in_store>1</show_in_store>
|
114 |
+
</comment>
|
115 |
+
<title translate="label">
|
116 |
+
<label>Fastorder Heading</label>
|
117 |
+
<frontend_type>text</frontend_type>
|
118 |
+
<sort_order>6</sort_order>
|
119 |
+
<show_in_default>1</show_in_default>
|
120 |
+
<show_in_website>1</show_in_website>
|
121 |
+
<show_in_store>1</show_in_store>
|
122 |
+
</title>
|
123 |
+
<success translate="label">
|
124 |
+
<label>Fastorder Success Message</label>
|
125 |
+
<frontend_type>text</frontend_type>
|
126 |
+
<sort_order>7</sort_order>
|
127 |
+
<comment>Default: Your order successfully submited!</comment>
|
128 |
+
<show_in_default>1</show_in_default>
|
129 |
+
<show_in_website>1</show_in_website>
|
130 |
+
<show_in_store>1</show_in_store>
|
131 |
+
</success>
|
132 |
+
<failured translate="label">
|
133 |
+
<label>Fastorder Failured Message</label>
|
134 |
+
<frontend_type>text</frontend_type>
|
135 |
+
<sort_order>8</sort_order>
|
136 |
+
<comment>Default: Sorry! Your order not submited!</comment>
|
137 |
+
<show_in_default>1</show_in_default>
|
138 |
+
<show_in_website>1</show_in_website>
|
139 |
+
<show_in_store>1</show_in_store>
|
140 |
+
</failured>
|
141 |
+
|
142 |
+
</fields>
|
143 |
+
</general>
|
144 |
+
</groups>
|
145 |
+
<groups>
|
146 |
+
<email translate="label">
|
147 |
+
<label>Email Template</label>
|
148 |
+
<frontend_type>text</frontend_type>
|
149 |
+
<sort_order>1</sort_order>
|
150 |
+
<show_in_default>1</show_in_default>
|
151 |
+
<show_in_website>1</show_in_website>
|
152 |
+
<show_in_store>1</show_in_store>
|
153 |
+
<fields>
|
154 |
+
<template>
|
155 |
+
<label>Email Template</label>
|
156 |
+
<show_in_default>1</show_in_default>
|
157 |
+
<show_in_website>1</show_in_website>
|
158 |
+
<show_in_store>1</show_in_store>
|
159 |
+
<sort_order>5</sort_order>
|
160 |
+
<frontend_type>select</frontend_type>
|
161 |
+
<source_model>adminhtml/system_config_source_email_template</source_model>
|
162 |
+
</template>
|
163 |
+
</fields>
|
164 |
+
</email>
|
165 |
+
</groups>
|
166 |
+
</fastorder>
|
167 |
+
</sections>
|
168 |
+
</config>
|
app/code/local/Freshcodes/Fastorder/sql/fastorder_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
$installer = $this;
|
25 |
+
|
26 |
+
$installer->startSetup();
|
27 |
+
|
28 |
+
$installer->run("
|
29 |
+
DROP TABLE IF EXISTS {$this->getTable('fastorderdetails')};
|
30 |
+
CREATE TABLE {$this->getTable('fastorderdetails')} (
|
31 |
+
`fastorder_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
32 |
+
`created_date` datetime NOT NULL,
|
33 |
+
`name` text NOT NULL,
|
34 |
+
`email` text NOT NULL,
|
35 |
+
`phone` text NOT NULL,
|
36 |
+
`comment` text NOT NULL,
|
37 |
+
`status` text NOT NULL,
|
38 |
+
PRIMARY KEY (`fastorder_id`)
|
39 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
40 |
+
|
41 |
+
DROP TABLE IF EXISTS {$this->getTable('fastorderproduct')};
|
42 |
+
CREATE TABLE {$this->getTable('fastorderproduct')} (
|
43 |
+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
44 |
+
`fastorder_id` int(11) NOT NULL,
|
45 |
+
`product_sku` text NOT NULL,
|
46 |
+
`product_name` text NOT NULL,
|
47 |
+
`qty` int(5) NOT NULL,
|
48 |
+
`product_price` text NOT NULL,
|
49 |
+
`product_discount` decimal(11,2) NOT NULL DEFAULT '0',
|
50 |
+
PRIMARY KEY (`id`)
|
51 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
52 |
+
|
53 |
+
DROP TABLE IF EXISTS {$this->getTable('fastorderproductoption')};
|
54 |
+
CREATE TABLE {$this->getTable('fastorderproductoption')} (
|
55 |
+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
56 |
+
`productdetails_id` int(11) NOT NULL,
|
57 |
+
`label` text NOT NULL,
|
58 |
+
`value` text NOT NULL,
|
59 |
+
PRIMARY KEY (`id`)
|
60 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
61 |
+
|
62 |
+
");
|
63 |
+
|
64 |
+
$installer->endSetup();
|
65 |
+
|
66 |
+
|
67 |
+
|
app/design/adminhtml/default/default/layout/fastorder.xml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Freshcodes
|
5 |
+
*
|
6 |
+
* It is also available through the world-wide-web at this URL:
|
7 |
+
* http://freshcodes.in
|
8 |
+
*
|
9 |
+
* ==============================================================
|
10 |
+
* MAGENTO EDITION USAGE NOTICE
|
11 |
+
* ==============================================================
|
12 |
+
* This package designed for Magento COMMUNITY edition
|
13 |
+
* Freshcodes does not guarantee correct work of this extension
|
14 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
15 |
+
* Freshcodes does not provide extension support in case of
|
16 |
+
* incorrect edition usage.
|
17 |
+
* ==============================================================
|
18 |
+
*
|
19 |
+
* @category Freshcodes
|
20 |
+
* @package Freshcodes_Fastorder
|
21 |
+
* @version 0.1.0
|
22 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
23 |
+
*
|
24 |
+
*/
|
25 |
+
-->
|
26 |
+
<layout version="0.1.0">
|
27 |
+
<fastorder_adminhtml_fastorderdetails_index>
|
28 |
+
<reference name="content">
|
29 |
+
<block type="fastorder/adminhtml_fastorderdetails" name="fastorderdetails" />
|
30 |
+
</reference>
|
31 |
+
</fastorder_adminhtml_fastorderdetails_index>
|
32 |
+
<fastorder_adminhtml_fastorderproduct_index>
|
33 |
+
<reference name="content">
|
34 |
+
<block type="fastorder/adminhtml_fastorderproduct" name="fastorderproduct" />
|
35 |
+
</reference>
|
36 |
+
</fastorder_adminhtml_fastorderproduct_index>
|
37 |
+
</layout>
|
app/design/adminhtml/default/default/template/fastorder/index.phtml
ADDED
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Freshcodes_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
$id = $this->getRequest()->getParam('id', null);
|
25 |
+
$model = Mage::getModel("fastorder/fastorderdetails")->load($id);
|
26 |
+
//echo $model->getFastorderId();
|
27 |
+
//echo $model->getCreatedDate();
|
28 |
+
$orderStoreDate = $this->formatDate($model->getCreatedDate(), 'medium', true);
|
29 |
+
$c_status = $model->getStatus();
|
30 |
+
//print_r($model);exit;
|
31 |
+
$status = Freshcodes_Fastorder_Block_Adminhtml_Fastorderdetails_Grid::getValueArray5();
|
32 |
+
|
33 |
+
?>
|
34 |
+
<div class="entry-edit">
|
35 |
+
<div class="entry-edit-head">
|
36 |
+
<h4 class="icon-head head-edit-form fieldset-legend">Fastorder Details</h4>
|
37 |
+
</div>
|
38 |
+
<div class="fieldset fieldset-wide">
|
39 |
+
<div class="hor-scroll">
|
40 |
+
<table cellspacing="0" class="form-list">
|
41 |
+
<tr>
|
42 |
+
<td class="label">
|
43 |
+
<label for="multilocationinventory_global_inventory">Order Date</label>
|
44 |
+
</td>
|
45 |
+
<td class="value">
|
46 |
+
<span class="bold"><?php echo $orderStoreDate; ?></span>
|
47 |
+
</td>
|
48 |
+
</tr>
|
49 |
+
<tr>
|
50 |
+
<td class="label">
|
51 |
+
<label for="multilocationinventory_global_inventory">Customer Name</label>
|
52 |
+
</td>
|
53 |
+
<td class="value">
|
54 |
+
<span class="bold"><?php echo $model->getName() ?></span>
|
55 |
+
</td>
|
56 |
+
</tr>
|
57 |
+
<tr>
|
58 |
+
<td class="label">
|
59 |
+
<label for="multilocationinventory_global_location">Email</label>
|
60 |
+
</td>
|
61 |
+
<td class="value">
|
62 |
+
<span class="bold"><?php echo $model->getEmail() ?></span>
|
63 |
+
</td>
|
64 |
+
</tr>
|
65 |
+
<tr>
|
66 |
+
<td class="label">
|
67 |
+
<label for="multilocationinventory_global_location">Phone</label>
|
68 |
+
</td>
|
69 |
+
<td class="value">
|
70 |
+
<span class="bold"><?php echo $model->getPhone() ?></span>
|
71 |
+
</td>
|
72 |
+
</tr>
|
73 |
+
<tr>
|
74 |
+
<td class="label">
|
75 |
+
<label for="multilocationinventory_global_location">Status</label>
|
76 |
+
</td>
|
77 |
+
<td class="value">
|
78 |
+
<select id="status" name="status" class=" select">
|
79 |
+
<?php
|
80 |
+
foreach($status as $key=>$value)
|
81 |
+
{
|
82 |
+
?>
|
83 |
+
<option value="<?php echo $value['label']; ?>" <?php if($c_status == $value['label']) { echo "selected";} ?>><?php echo $value['label']; ?></option>
|
84 |
+
<?php
|
85 |
+
}
|
86 |
+
?>
|
87 |
+
|
88 |
+
</select>
|
89 |
+
</td>
|
90 |
+
</tr>
|
91 |
+
</table>
|
92 |
+
</div>
|
93 |
+
<div> </div>
|
94 |
+
<div> </div>
|
95 |
+
<div class="grid">
|
96 |
+
<div class="entry-edit">
|
97 |
+
<div class="entry-edit-head">
|
98 |
+
<h4 class="icon-head head-products">Items Ordered</h4>
|
99 |
+
</div>
|
100 |
+
</div>
|
101 |
+
<table cellspacing="0" class="data order-tables">
|
102 |
+
<thead>
|
103 |
+
<tr class="headings">
|
104 |
+
<th>Name</th>
|
105 |
+
<th>Price</th>
|
106 |
+
<th>QTY</th>
|
107 |
+
<th>SUBTOTAL</th>
|
108 |
+
<th>DISCOUNT</th>
|
109 |
+
<th>ROW TOTAL</th>
|
110 |
+
</tr>
|
111 |
+
</thead>
|
112 |
+
|
113 |
+
<?php
|
114 |
+
$modelProduct = Mage::getModel("fastorder/fastorderproduct")->getCollection()->addFieldToFilter('fastorder_id',$id );
|
115 |
+
$count = 2;
|
116 |
+
//print_r($modelProduct->getData('product_sku'));
|
117 |
+
|
118 |
+
//print_r($modelProduct->getData()->getSku());
|
119 |
+
?>
|
120 |
+
<?php foreach ($modelProduct as $product): ?>
|
121 |
+
<?php
|
122 |
+
$modelproductoption = Mage::getModel("fastorder/fastorderproductoption")->getCollection()->addFieldToFilter('productdetails_id',$product['id']);
|
123 |
+
//print_r($modelproductoption->getData());
|
124 |
+
?>
|
125 |
+
<tbody class="<?php if($count % 2 == 0){ echo "even"; } ?>">
|
126 |
+
<tr class="border">
|
127 |
+
<td>
|
128 |
+
<?php echo $product['product_name']; ?>
|
129 |
+
<?php
|
130 |
+
echo "</br><strong>Sku</strong> : ".$product['product_sku'];
|
131 |
+
foreach ($modelproductoption as $productoption)
|
132 |
+
{
|
133 |
+
echo "</br><strong>".$productoption['label']."</strong> : ".$productoption['value'];
|
134 |
+
}
|
135 |
+
?>
|
136 |
+
</td>
|
137 |
+
<td>
|
138 |
+
<?php echo Mage::helper('core')->currency($product['product_price'], true, false); ?>
|
139 |
+
</td>
|
140 |
+
<td>
|
141 |
+
<?php echo $product['qty']; ?>
|
142 |
+
</td>
|
143 |
+
<td class="">
|
144 |
+
<?php $totalPrice = $product['product_price']; ?>
|
145 |
+
<?php $final_price = $totalPrice*$product['qty']; ?>
|
146 |
+
<?php echo Mage::helper('core')->currency($final_price, true, false); ?>
|
147 |
+
</td>
|
148 |
+
<td class="">
|
149 |
+
<?php $discountPrice = $product['product_discount']; ?>
|
150 |
+
<?php echo Mage::helper('core')->currency($discountPrice, true, false); ?>
|
151 |
+
</td>
|
152 |
+
<td class="last">
|
153 |
+
<?php $mainPrice = $final_price - $discountPrice; ?>
|
154 |
+
<?php echo Mage::helper('core')->currency($mainPrice, true, false); ?>
|
155 |
+
</td>
|
156 |
+
|
157 |
+
</tr>
|
158 |
+
</tbody>
|
159 |
+
<?php $count++; endforeach; ?>
|
160 |
+
|
161 |
+
</table>
|
162 |
+
|
163 |
+
</div>
|
164 |
+
</div>
|
165 |
+
</div>
|
166 |
+
|
167 |
+
<script type="text/javascript">
|
168 |
+
$$('.demac_multilocationinventory_manage_stock').each(function(element) {
|
169 |
+
element.observe('change', function (ev) {
|
170 |
+
var visibility_str = "hidden";
|
171 |
+
if(ev.target.value == "1") {
|
172 |
+
visibility_str = "visible";
|
173 |
+
}
|
174 |
+
ev.target.parentElement.parentElement.select('input, select').each(function(toggleElement) {
|
175 |
+
if(!toggleElement.hasClassName('demac_multilocationinventory_manage_stock')) {
|
176 |
+
toggleElement.setStyle({visibility: visibility_str});
|
177 |
+
}
|
178 |
+
});
|
179 |
+
});
|
180 |
+
});
|
181 |
+
</script>
|
app/design/frontend/base/default/layout/fastorder.xml
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Freshcodes
|
5 |
+
*
|
6 |
+
* It is also available through the world-wide-web at this URL:
|
7 |
+
* http://freshcodes.in
|
8 |
+
*
|
9 |
+
* ==============================================================
|
10 |
+
* MAGENTO EDITION USAGE NOTICE
|
11 |
+
* ==============================================================
|
12 |
+
* This package designed for Magento COMMUNITY edition
|
13 |
+
* Freshcodes does not guarantee correct work of this extension
|
14 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
15 |
+
* Freshcodes does not provide extension support in case of
|
16 |
+
* incorrect edition usage.
|
17 |
+
* ==============================================================
|
18 |
+
*
|
19 |
+
* @category Freshcodes
|
20 |
+
* @package Freshcodes_Fastorder
|
21 |
+
* @version 0.1.0
|
22 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
23 |
+
*
|
24 |
+
*/
|
25 |
+
-->
|
26 |
+
<layout version="0.1.0">
|
27 |
+
<checkout_cart_index>
|
28 |
+
<reference name="head">
|
29 |
+
<action method="addCss"><stylesheet>css/fastorder/styles.css</stylesheet></action>
|
30 |
+
</reference>
|
31 |
+
<!--<reference name="content">
|
32 |
+
<block type="fastorder/index" name="fastorder_index" template="fastorder/index.phtml"/>
|
33 |
+
</reference> -->
|
34 |
+
<reference name="checkout.cart.methods">
|
35 |
+
<block type="fastorder/index" name="test.somblock" after="-" template="fastorder/index.phtml" />
|
36 |
+
</reference>
|
37 |
+
</checkout_cart_index>
|
38 |
+
<!-- If you want to display fastorder block in other specific place in cart page then please follow below step -->
|
39 |
+
<!-- Step 1 - Please comment line no :- 2 to 10 -->
|
40 |
+
<!-- Step 2 - Please comment line no :- 15 to 22 -->
|
41 |
+
<!-- Step 3 - add this code in php tag :- echo $this->getChildHtml('fastorder_index'); -->
|
42 |
+
<!--<checkout_cart_index>
|
43 |
+
<reference name="head">
|
44 |
+
<action method="addCss"><stylesheet>css/fastorder/styles.css</stylesheet></action>
|
45 |
+
</reference>
|
46 |
+
<reference name="checkout.cart">
|
47 |
+
<block type="fastorder/index" name="fastorder_index" as="fastorder_index" template="fastorder/index.phtml"/>
|
48 |
+
</reference>
|
49 |
+
</checkout_cart_index>-->
|
50 |
+
<fastorder_email_template>
|
51 |
+
<block type="core/template" name="email_template" template="fastorder/email/template/index.phtml" />
|
52 |
+
</fastorder_email_template>
|
53 |
+
</layout>
|
app/design/frontend/base/default/template/fastorder/cart.phtml
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Karon_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
if($this->getActive()):
|
25 |
+
?>
|
26 |
+
<div class="fastorder-block">
|
27 |
+
<div class="fastorder-inner">
|
28 |
+
<form id="fastorder-form" action="<?php echo $this->getUrl('fastorder/index/post') ?>" method="post" class="fastorder-form">
|
29 |
+
<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
|
30 |
+
<h2><?php echo Mage::helper('contacts')->__($this->getTitle()); ?></h2>
|
31 |
+
<div class="field-wrapper">
|
32 |
+
<?php if($this->enableName()): ?>
|
33 |
+
<input class="input-text required-entry " type="text" id="name" name="name" value="" placeholder="Name">
|
34 |
+
<?php endif; ?>
|
35 |
+
<input class="input-text required-entry validate-email" type="text" id="email" name="email" value="" placeholder="Email">
|
36 |
+
<?php if($this->enablePhone()): ?>
|
37 |
+
<input class="input-text required-entry " type="text" id="phone" name="phone" value="" placeholder="Phone">
|
38 |
+
<?php endif; ?>
|
39 |
+
<?php if($this->enableComment()): ?>
|
40 |
+
<textarea name="comment" id="comment" placeholder="Comment"></textarea>
|
41 |
+
<?php endif; ?>
|
42 |
+
<div class="button-wrapper">
|
43 |
+
<button type="submit" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Submit')) ?>" class="button"><span><span><?php echo Mage::helper('contacts')->__('Process To Fastorder') ?></span></span></button>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
</form>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
<?php
|
50 |
+
endif;
|
51 |
+
?>
|
52 |
+
<script type="text/javascript">
|
53 |
+
//<![CDATA[
|
54 |
+
var fastorder = new VarienForm('fastorder-form', true);
|
55 |
+
//]]>
|
56 |
+
</script>
|
app/design/frontend/base/default/template/fastorder/email/template/index.phtml
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Karon_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
$cart = Mage::getModel('checkout/cart')->getQuote();
|
25 |
+
?>
|
26 |
+
<table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
|
27 |
+
<tr>
|
28 |
+
<td align="center" valign="top" style="padding:20px 0 20px 0">
|
29 |
+
<!-- [ header starts here] -->
|
30 |
+
<table bgcolor="FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
|
31 |
+
<tr style="background:#f1f1f1;">
|
32 |
+
<td style="font-weight:bold">Product Name</td>
|
33 |
+
<td style="font-weight:bold">Quantity</td>
|
34 |
+
<td style="font-weight:bold">Total Price</td>
|
35 |
+
</tr>
|
36 |
+
<?php
|
37 |
+
$i = 1;
|
38 |
+
foreach ($cart->getAllItems() as $item) {
|
39 |
+
?>
|
40 |
+
<tr style="<?php if($i % 2 == 0): echo "background:#ddd;"; endif; ?>">
|
41 |
+
<td><?php echo $item->getProduct()->getName(); ?></td>
|
42 |
+
<td><?php echo $item->getQty(); ?></td>
|
43 |
+
<td><?php echo Mage::helper('core')->currency($item->getRowTotal(), true, false); ?></td>
|
44 |
+
</tr>
|
45 |
+
<?php
|
46 |
+
}
|
47 |
+
?>
|
48 |
+
</table>
|
49 |
+
</td>
|
50 |
+
</tr>
|
51 |
+
</table>
|
app/design/frontend/base/default/template/fastorder/index.phtml
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Freshcodes
|
4 |
+
*
|
5 |
+
* It is also available through the world-wide-web at this URL:
|
6 |
+
* http://freshcodes.in
|
7 |
+
*
|
8 |
+
* ==============================================================
|
9 |
+
* MAGENTO EDITION USAGE NOTICE
|
10 |
+
* ==============================================================
|
11 |
+
* This package designed for Magento COMMUNITY edition
|
12 |
+
* Freshcodes does not guarantee correct work of this extension
|
13 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
14 |
+
* Freshcodes does not provide extension support in case of
|
15 |
+
* incorrect edition usage.
|
16 |
+
* ==============================================================
|
17 |
+
*
|
18 |
+
* @category Freshcodes
|
19 |
+
* @package Karon_Fastorder
|
20 |
+
* @version 0.1.0
|
21 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
if($this->getActive()):
|
25 |
+
?>
|
26 |
+
<div class="fastorder-block">
|
27 |
+
<div class="fastorder-inner">
|
28 |
+
<form id="fastorder-form" action="<?php echo $this->getUrl('fastorder/index/post') ?>" method="post" class="fastorder-form">
|
29 |
+
<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
|
30 |
+
<h2><?php echo Mage::helper('contacts')->__($this->getTitle()); ?></h2>
|
31 |
+
<div class="field-wrapper">
|
32 |
+
<?php if($this->enableName()): ?>
|
33 |
+
<input class="input-text required-entry " type="text" id="name" name="name" value="<?php echo $this->getCustomerName(); ?>" placeholder="Name">
|
34 |
+
<?php endif; ?>
|
35 |
+
<input class="input-text required-entry validate-email" type="text" id="email" name="email" value="<?php echo $this->getCustomerEmail(); ?>" placeholder="Email">
|
36 |
+
<?php if($this->enablePhone()): ?>
|
37 |
+
<input class="input-text required-entry " type="text" id="phone" name="phone" value="<?php echo $this->getCustomerPhone(); ?>" placeholder="Phone">
|
38 |
+
<?php endif; ?>
|
39 |
+
<?php if($this->enableComment()): ?>
|
40 |
+
<textarea name="comment" id="comment" placeholder="Comment"></textarea>
|
41 |
+
<?php endif; ?>
|
42 |
+
<div class="button-wrapper">
|
43 |
+
<button type="submit" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Submit')) ?>" class="button"><span><span><?php echo Mage::helper('contacts')->__('Process To Fastorder') ?></span></span></button>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
</form>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
<?php
|
50 |
+
endif;
|
51 |
+
?>
|
52 |
+
<script type="text/javascript">
|
53 |
+
//<![CDATA[
|
54 |
+
var fastorder = new VarienForm('fastorder-form', true);
|
55 |
+
//]]>
|
56 |
+
</script>
|
app/etc/modules/Freshcodes_Fastorder.xml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Freshcodes_Fastorder>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
<version>0.1.0</version>
|
8 |
+
</Freshcodes_Fastorder>
|
9 |
+
</modules>
|
10 |
+
</config>
|
app/locale/en_US/template/email/fastorder_custom_email.html
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!--@subject Welcome, {{var customer.name}}! @-->
|
2 |
+
<!--@vars
|
3 |
+
{"store url=\"\"":"Store Url",
|
4 |
+
"var logo_url":"Email Logo Image Url",
|
5 |
+
"htmlescape var=$customer.name":"Customer Name",
|
6 |
+
"store url=\"customer/account/\"":"Customer Account Url",
|
7 |
+
"var customer.email":"Customer Email",
|
8 |
+
"htmlescape var=$customer.password":"Customer Password"}
|
9 |
+
@-->
|
10 |
+
|
11 |
+
<!--@styles
|
12 |
+
body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
|
13 |
+
@-->
|
14 |
+
|
15 |
+
<body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
|
16 |
+
<div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
|
17 |
+
<table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
|
18 |
+
<tr>
|
19 |
+
<td align="center" valign="top" style="padding:20px 0 20px 0">
|
20 |
+
<!-- [ header starts here] -->
|
21 |
+
<table bgcolor="FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
|
22 |
+
<tr>
|
23 |
+
<td valign="top">
|
24 |
+
<a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
|
25 |
+
</tr>
|
26 |
+
<tr>
|
27 |
+
<td valign="top">
|
28 |
+
Dear {{var name}},
|
29 |
+
</td>
|
30 |
+
</tr>
|
31 |
+
<tr>
|
32 |
+
<td valign="top">
|
33 |
+
Thank you for your Fastorder request, We will contact you shortly to confirm the details of your order and Please note, online Fastorder are not confirmed untill a representative has contacted you and the terms of order have been agreed.
|
34 |
+
</td>
|
35 |
+
</tr>
|
36 |
+
<tr>
|
37 |
+
{{layout handle="fastorder_email_template"}}
|
38 |
+
</tr>
|
39 |
+
<tr>
|
40 |
+
<td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you, <strong>{{var store.getFrontendName()}}</strong></p></center></td>
|
41 |
+
</tr>
|
42 |
+
</table>
|
43 |
+
</td>
|
44 |
+
</tr>
|
45 |
+
</table>
|
46 |
+
</div>
|
47 |
+
</body>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Freshcodes_Fastorder</name>
|
4 |
+
<version>0.1.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL-3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Fastorder Extension for Magento</summary>
|
10 |
+
<description>This extension allow customer to place an order fast only within phone number or email.</description>
|
11 |
+
<notes>This extension allow customer to place an order fast only with phone number or email.</notes>
|
12 |
+
<authors><author><name>freshcodes.in</name><user>freshcodes</user><email>info@freshcodes.in</email></author></authors>
|
13 |
+
<date>2016-08-06</date>
|
14 |
+
<time>06:20:29</time>
|
15 |
+
<contents><target name="magelocal"><dir name="Freshcodes"><dir name="Fastorder"><dir name="Block"><dir name="Adminhtml"><dir name="Fastorderdetails"><dir name="Edit"><file name="Form.php" hash="02a4bc670db57d6f098072b4617bfee7"/><dir name="Tab"><file name="Form.php" hash="d92ce235d0e5cf15f5d216330f2636b6"/></dir><file name="Tabs.php" hash="d5a0b9ec6799edf20188da5f632f5cf9"/></dir><file name="Edit.php" hash="e7846a71414b4169971068e7a210180f"/><file name="Grid.php" hash="85846c4da5bf65a42a43dfc9badae2a3"/></dir><file name="Fastorderdetails.php" hash="6fc854a75b5d1fbb126e2048005d16f3"/></dir><file name="Index.php" hash="ff411100b18286833358386ebb9007a1"/></dir><dir name="Helper"><file name="Data.php" hash="bf90993f583d9412a47c0b64dce4233f"/></dir><dir name="Model"><file name="Fastorderdetails.php" hash="ca27e5df351bdfc54a8ecd338a64c12b"/><file name="Fastorderproduct.php" hash="b265bf753c56b19b6e9a140f98f207f6"/><file name="Fastorderproductoption.php" hash="c44445d2491a60969fdf12ea606ece12"/><dir name="Mysql4"><dir name="Fastorderdetails"><file name="Collection.php" hash="c3c50f24a88bb24b2fa5963d5585465e"/></dir><file name="Fastorderdetails.php" hash="e3fbf64c75faf99a09cc4c0376630780"/><dir name="Fastorderproduct"><file name="Collection.php" hash="5c3095378fb328848e7f511e6a9c6d9a"/></dir><file name="Fastorderproduct.php" hash="a7cf036666b4294552c76ff0f8b4e9c2"/><dir name="Fastorderproductoption"><file name="Collection.php" hash="c01a592d317f54f8a73ac19de8e1ee02"/></dir><file name="Fastorderproductoption.php" hash="004ecc0f061ff1917de1aa680f03c42c"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="FastorderdetailsController.php" hash="f42672e419eb69b5a74d358a4211ed55"/></dir><file name="IndexController.php" hash="e7a5519acda356ab41b07c2e52d32425"/></dir><dir name="etc"><file name="adminhtml.xml" hash="7b66e32618b5b75e20d669242ab324e5"/><file name="config.xml" hash="1eec8e0e392b4706d9ba48bb9c903329"/><file name="system.xml" hash="fee4424e7d8824a1b734ec9be390c634"/></dir><dir name="sql"><dir name="fastorder_setup"><file name="mysql4-install-0.1.0.php" hash="ea6f851f4125f6303558e59e448cd1d3"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="fastorder.xml" hash="996db5294ed5c1c651bce89d3e4463f6"/></dir><dir name="template"><dir name="fastorder"><file name="index.phtml" hash="bfcc655fa7a27b38e1edd497c5109d3f"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="fastorder.xml" hash="20586c08398ff9f33d2725e83f119bd8"/></dir><dir name="template"><dir name="fastorder"><file name="cart.phtml" hash="f1f1705c8c563e8bfd64df44a6b522b4"/><dir name="email"><dir name="template"><file name="index.phtml" hash="a844622a736b77dd0cd04e6f9f716b76"/></dir></dir><file name="index.phtml" hash="63a68ef78fb2b6988938005d9461edc8"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Freshcodes_Fastorder.xml" hash="bf80b7d2c94a4486ff4775b8bc304b64"/></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="fastorder_custom_email.html" hash="a783b2260bebc547e593864bd0116434"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="fastorder"><file name="styles.css" hash="572e13258ddf1be1d937fca960116a31"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|
skin/frontend/base/default/css/fastorder/styles.css
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Freshcodes
|
3 |
+
*
|
4 |
+
* It is also available through the world-wide-web at this URL:
|
5 |
+
* http://freshcodes.in
|
6 |
+
*
|
7 |
+
* ==============================================================
|
8 |
+
* MAGENTO EDITION USAGE NOTICE
|
9 |
+
* ==============================================================
|
10 |
+
* This package designed for Magento COMMUNITY edition
|
11 |
+
* Freshcodes does not guarantee correct work of this extension
|
12 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
13 |
+
* Freshcodes does not provide extension support in case of
|
14 |
+
* incorrect edition usage.
|
15 |
+
* ==============================================================
|
16 |
+
*
|
17 |
+
* @category Freshcodes
|
18 |
+
* @package Freshcodes_Fastorder
|
19 |
+
* @version 0.1.0
|
20 |
+
* @author Freshcodes Team <developers@freshcodes.in>
|
21 |
+
*
|
22 |
+
*/
|
23 |
+
|
24 |
+
.fastorder-block
|
25 |
+
{
|
26 |
+
padding: 20px 0;
|
27 |
+
}
|
28 |
+
.fastorder-block input,.fastorder-block textarea{width:100% !important;margin-bottom:8px;}
|