Ispg_Seller - Version 0.0.0.1

Version Notes

This extension has been tested.

Download this release

Release Info

Developer Rahul K
Extension Ispg_Seller
Version 0.0.0.1
Comparing to
See all releases


Version 0.0.0.1

Files changed (39) hide show
  1. app/code/community/Ispg/Seller/Block/Adminhtml/Seller.php +13 -0
  2. app/code/community/Ispg/Seller/Block/Adminhtml/Seller/Edit.php +45 -0
  3. app/code/community/Ispg/Seller/Block/Adminhtml/Seller/Edit/Form.php +19 -0
  4. app/code/community/Ispg/Seller/Block/Adminhtml/Seller/Edit/Tab/Bankinfo.php +84 -0
  5. app/code/community/Ispg/Seller/Block/Adminhtml/Seller/Edit/Tab/Form.php +99 -0
  6. app/code/community/Ispg/Seller/Block/Adminhtml/Seller/Edit/Tab/Products.php +56 -0
  7. app/code/community/Ispg/Seller/Block/Adminhtml/Seller/Edit/Tabs.php +39 -0
  8. app/code/community/Ispg/Seller/Block/Adminhtml/Seller/Grid.php +143 -0
  9. app/code/community/Ispg/Seller/Block/Button.php +33 -0
  10. app/code/community/Ispg/Seller/Block/Checkout.php +27 -0
  11. app/code/community/Ispg/Seller/Block/Seller.php +27 -0
  12. app/code/community/Ispg/Seller/Block/Sellorders.php +64 -0
  13. app/code/community/Ispg/Seller/Block/Submitseller.php +33 -0
  14. app/code/community/Ispg/Seller/Helper/Data.php +69 -0
  15. app/code/community/Ispg/Seller/Model/Mysql4/Seller.php +10 -0
  16. app/code/community/Ispg/Seller/Model/Mysql4/Seller/Collection.php +10 -0
  17. app/code/community/Ispg/Seller/Model/Mysql4/Sellerbank.php +10 -0
  18. app/code/community/Ispg/Seller/Model/Mysql4/Sellerbank/Collection.php +10 -0
  19. app/code/community/Ispg/Seller/Model/Mysql4/Sellerproducts.php +10 -0
  20. app/code/community/Ispg/Seller/Model/Mysql4/Sellerproducts/Collection.php +10 -0
  21. app/code/community/Ispg/Seller/Model/Seller.php +176 -0
  22. app/code/community/Ispg/Seller/Model/Sellerbank.php +12 -0
  23. app/code/community/Ispg/Seller/Model/Sellerproducts.php +12 -0
  24. app/code/community/Ispg/Seller/Model/Status.php +15 -0
  25. app/code/community/Ispg/Seller/controllers/Adminhtml/SellerController.php +214 -0
  26. app/code/community/Ispg/Seller/controllers/IndexController.php +97 -0
  27. app/code/community/Ispg/Seller/etc/adminhtml.xml +23 -0
  28. app/code/community/Ispg/Seller/etc/config.xml +126 -0
  29. app/code/community/Ispg/Seller/etc/system.xml +48 -0
  30. app/code/community/Ispg/Seller/sql/seller_setup/mysql4-install-0.1.0.php +52 -0
  31. app/design/adminhtml/default/default/layout/seller.xml +8 -0
  32. app/design/frontend/base/default/layout/seller.xml +49 -0
  33. app/design/frontend/base/default/template/seller/checkout.phtml +137 -0
  34. app/design/frontend/base/default/template/seller/sellbtn.phtml +8 -0
  35. app/design/frontend/base/default/template/seller/seller.phtml +158 -0
  36. app/design/frontend/base/default/template/seller/sellorders.phtml +74 -0
  37. app/design/frontend/base/default/template/seller/submitseller.phtml +14 -0
  38. app/etc/modules/Ispg_Seller.xml +10 -0
  39. package.xml +20 -0
app/code/community/Ispg/Seller/Block/Adminhtml/Seller.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ispg_Seller_Block_Adminhtml_Seller extends Mage_Adminhtml_Block_Widget_Grid_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ $this->_controller = 'adminhtml_seller';
7
+ $this->_blockGroup = 'seller';
8
+ $this->_headerText = Mage::helper('seller')->__('Orders Manager');
9
+ //$this->_addButtonLabel = Mage::helper('seller')->__('Add Item');
10
+ parent::__construct();
11
+ $this->_removeButton('add');
12
+ }
13
+ }
app/code/community/Ispg/Seller/Block/Adminhtml/Seller/Edit.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Block_Adminhtml_Seller_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+
9
+ $this->_objectId = 'id';
10
+ $this->_blockGroup = 'seller';
11
+ $this->_controller = 'adminhtml_seller';
12
+
13
+ $this->_updateButton('save', 'label', Mage::helper('seller')->__('Save Order'));
14
+ $this->_updateButton('delete', 'label', Mage::helper('seller')->__('Delete Order'));
15
+
16
+ $this->_addButton('saveandcontinue', array(
17
+ 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
18
+ 'onclick' => 'saveAndContinueEdit()',
19
+ 'class' => 'save',
20
+ ), -100);
21
+
22
+ $this->_formScripts[] = "
23
+ function toggleEditor() {
24
+ if (tinyMCE.getInstanceById('seller_content') == null) {
25
+ tinyMCE.execCommand('mceAddControl', false, 'seller_content');
26
+ } else {
27
+ tinyMCE.execCommand('mceRemoveControl', false, 'seller_content');
28
+ }
29
+ }
30
+
31
+ function saveAndContinueEdit(){
32
+ editForm.submit($('edit_form').action+'back/edit/');
33
+ }
34
+ ";
35
+ }
36
+
37
+ public function getHeaderText()
38
+ {
39
+ if( Mage::registry('seller_data') && Mage::registry('seller_data')->getId() ) {
40
+ return Mage::helper('seller')->__("Edit Order '%s'", $this->htmlEscape(Mage::registry('seller_data')->getOrderId()));
41
+ } else {
42
+ return Mage::helper('seller')->__('Add Order');
43
+ }
44
+ }
45
+ }
app/code/community/Ispg/Seller/Block/Adminhtml/Seller/Edit/Form.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Block_Adminhtml_Seller_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form(array(
8
+ 'id' => 'edit_form',
9
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
10
+ 'method' => 'post',
11
+ 'enctype' => 'multipart/form-data'
12
+ )
13
+ );
14
+
15
+ $form->setUseContainer(true);
16
+ $this->setForm($form);
17
+ return parent::_prepareForm();
18
+ }
19
+ }
app/code/community/Ispg/Seller/Block/Adminhtml/Seller/Edit/Tab/Bankinfo.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Block_Adminhtml_Seller_Edit_Tab_Bankinfo extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ /*$this->setId('sellerProductsGrid');
9
+ $this->setDefaultSort('prdids');
10
+ $this->setDefaultDir('ASC');
11
+ $this->setSaveParametersInSession(true);*/
12
+ }
13
+
14
+ protected function _prepareCollection()
15
+ {
16
+ $orderDetailsArr = Mage::getModel('seller/seller')->getOrderDetailsById($this->getRequest()->getParam('id'));
17
+ $collection = Mage::getModel('seller/sellerbank')->getCollection();
18
+ $collection->getSelect()->where('customer_id=?',$orderDetailsArr['customer_id']);
19
+ $this->setCollection($collection);
20
+ return parent::_prepareCollection();
21
+ }
22
+
23
+ protected function _prepareColumns()
24
+ {
25
+ $this->addColumn('firstname', array(
26
+ 'header' => Mage::helper('seller')->__('First Name'),
27
+ 'align' =>'left',
28
+ 'width' => '100px',
29
+ 'index' => 'firstname',
30
+ ));
31
+
32
+ $this->addColumn('lastname', array(
33
+ 'header' => Mage::helper('seller')->__('Last Name'),
34
+ 'align' =>'left',
35
+ 'width' => '100px',
36
+ 'index' => 'lastname',
37
+ ));
38
+
39
+ $this->addColumn('telephone', array(
40
+ 'header' => Mage::helper('seller')->__('Telephone'),
41
+ 'align' =>'left',
42
+ 'width' => '100px',
43
+ 'index' => 'telephone',
44
+ ));
45
+
46
+ $this->addColumn('acc_name', array(
47
+ 'header' => Mage::helper('seller')->__('Account Name'),
48
+ 'align' =>'left',
49
+ 'width' => '100px',
50
+ 'index' => 'acc_name',
51
+ ));
52
+
53
+ $this->addColumn('acc_num', array(
54
+ 'header' => Mage::helper('seller')->__('Account Number'),
55
+ 'align' =>'left',
56
+ 'width' => '100px',
57
+ 'index' => 'acc_num',
58
+ ));
59
+
60
+ $this->addColumn('acc_bank', array(
61
+ 'header' => Mage::helper('seller')->__('Bank'),
62
+ 'align' =>'left',
63
+ 'width' => '100px',
64
+ 'index' => 'acc_bank',
65
+ ));
66
+
67
+ $this->addColumn('acc_branch', array(
68
+ 'header' => Mage::helper('seller')->__('Branch'),
69
+ 'align' =>'left',
70
+ 'width' => '100px',
71
+ 'index' => 'acc_branch',
72
+ ));
73
+
74
+ $this->addColumn('acc_ifsc', array(
75
+ 'header' => Mage::helper('seller')->__('IFSC'),
76
+ 'align' =>'left',
77
+ 'width' => '100px',
78
+ 'index' => 'acc_ifsc',
79
+ ));
80
+
81
+ return parent::_prepareColumns();
82
+ }
83
+
84
+ }
app/code/community/Ispg/Seller/Block/Adminhtml/Seller/Edit/Tab/Form.php ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Block_Adminhtml_Seller_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form();
8
+ $this->setForm($form);
9
+ $fieldset = $form->addFieldset('seller_form', array('legend'=>Mage::helper('seller')->__('Order information')));
10
+
11
+ $fieldset->addField('order_id', 'text', array(
12
+ 'label' => Mage::helper('seller')->__('Order Number'),
13
+ 'class' => 'required-entry',
14
+ 'readonly' => 'readonly',
15
+ 'required' => true,
16
+ 'name' => 'order_id',
17
+ ));
18
+
19
+ $fieldset->addField('email', 'text', array(
20
+ 'label' => Mage::helper('seller')->__('Customer Email ID'),
21
+ 'class' => 'required-entry',
22
+ 'readonly' => 'readonly',
23
+ 'required' => true,
24
+ 'name' => 'email',
25
+ ));
26
+
27
+ $fieldset->addField('payment_status', 'select', array(
28
+ 'label' => Mage::helper('seller')->__('Payment Status'),
29
+ 'name' => 'payment_status',
30
+ 'values' => array(
31
+ array(
32
+ 'value' => 1,
33
+ 'label' => Mage::helper('seller')->__('Pending'),
34
+ ),
35
+
36
+ array(
37
+ 'value' => 2,
38
+ 'label' => Mage::helper('seller')->__('Done'),
39
+ ),
40
+ ),
41
+ ));
42
+
43
+ $fieldset->addField('order_status', 'select', array(
44
+ 'label' => Mage::helper('seller')->__('Order Status'),
45
+ 'name' => 'order_status',
46
+ 'values' => array(
47
+ array(
48
+ 'value' => 1,
49
+ 'label' => Mage::helper('seller')->__('Pending'),
50
+ ),
51
+
52
+ array(
53
+ 'value' => 2,
54
+ 'label' => Mage::helper('seller')->__('Done'),
55
+ ),
56
+
57
+ array(
58
+ 'value' => 3,
59
+ 'label' => Mage::helper('seller')->__('Rejected'),
60
+ ),
61
+
62
+ ),
63
+ ));
64
+
65
+ $fieldset->addField('status', 'select', array(
66
+ 'label' => Mage::helper('seller')->__('Status'),
67
+ 'name' => 'status',
68
+ 'values' => array(
69
+ array(
70
+ 'value' => 1,
71
+ 'label' => Mage::helper('seller')->__('Enabled'),
72
+ ),
73
+
74
+ array(
75
+ 'value' => 2,
76
+ 'label' => Mage::helper('seller')->__('Disabled'),
77
+ ),
78
+ ),
79
+ ));
80
+
81
+ /*$fieldset->addField('content', 'editor', array(
82
+ 'name' => 'content',
83
+ 'label' => Mage::helper('seller')->__('Content'),
84
+ 'title' => Mage::helper('seller')->__('Content'),
85
+ 'style' => 'width:700px; height:500px;',
86
+ 'wysiwyg' => false,
87
+ 'required' => true,
88
+ ));*/
89
+
90
+ if ( Mage::getSingleton('adminhtml/session')->getSellerData() )
91
+ {
92
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getSellerData());
93
+ Mage::getSingleton('adminhtml/session')->setSellerData(null);
94
+ } elseif ( Mage::registry('seller_data') ) {
95
+ $form->setValues(Mage::registry('seller_data')->getData());
96
+ }
97
+ return parent::_prepareForm();
98
+ }
99
+ }
app/code/community/Ispg/Seller/Block/Adminhtml/Seller/Edit/Tab/Products.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Block_Adminhtml_Seller_Edit_Tab_Products extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ /*$this->setId('sellerProductsGrid');
9
+ $this->setDefaultSort('prdids');
10
+ $this->setDefaultDir('ASC');
11
+ $this->setSaveParametersInSession(true);*/
12
+ }
13
+
14
+ protected function _prepareCollection()
15
+ {
16
+ $orderDetailsArr = Mage::getModel('seller/seller')->getOrderDetailsById($this->getRequest()->getParam('id'));
17
+ $collection = Mage::getModel('seller/sellerproducts')->getCollection();
18
+ $collection->getSelect()->where('order_id=?',$orderDetailsArr['order_id']);
19
+ $this->setCollection($collection);
20
+ return parent::_prepareCollection();
21
+ }
22
+
23
+ protected function _prepareColumns()
24
+ {
25
+ $this->addColumn('name', array(
26
+ 'header' => Mage::helper('seller')->__('Product Name'),
27
+ 'align' =>'left',
28
+ 'width' => '150px',
29
+ 'index' => 'name',
30
+ ));
31
+
32
+ $this->addColumn('price', array(
33
+ 'header' => Mage::helper('seller')->__('Price'),
34
+ 'align' =>'left',
35
+ 'width' => '100px',
36
+ 'index' => 'price',
37
+ ));
38
+
39
+ $this->addColumn('qty', array(
40
+ 'header' => Mage::helper('seller')->__('Quantity'),
41
+ 'align' =>'left',
42
+ 'width' => '50px',
43
+ 'index' => 'qty',
44
+ ));
45
+
46
+ $this->addColumn('subtotal', array(
47
+ 'header' => Mage::helper('seller')->__('Subtotal'),
48
+ 'align' =>'left',
49
+ 'width' => '100px',
50
+ 'index' => 'subtotal',
51
+ ));
52
+
53
+ return parent::_prepareColumns();
54
+ }
55
+
56
+ }
app/code/community/Ispg/Seller/Block/Adminhtml/Seller/Edit/Tabs.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Block_Adminhtml_Seller_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setId('seller_tabs');
10
+ $this->setDestElementId('edit_form');
11
+ $this->setTitle(Mage::helper('seller')->__('Sell Order Details'));
12
+ }
13
+
14
+ protected function _beforeToHtml()
15
+ {
16
+ // Orders List
17
+ $this->addTab('form_section', array(
18
+ 'label' => Mage::helper('seller')->__('Order Information'),
19
+ 'title' => Mage::helper('seller')->__('Order Information'),
20
+ 'content' => $this->getLayout()->createBlock('seller/adminhtml_seller_edit_tab_form')->toHtml(),
21
+ ));
22
+
23
+ // Products List
24
+ $this->addTab('products_section', array(
25
+ 'label' => Mage::helper('seller')->__('Products Information'),
26
+ 'title' => Mage::helper('seller')->__('Products Information'),
27
+ 'content' => $this->getLayout()->createBlock('seller/adminhtml_seller_edit_tab_products')->toHtml(),
28
+ ));
29
+
30
+ // Bank Info
31
+ $this->addTab('bankinfo_section', array(
32
+ 'label' => Mage::helper('seller')->__('Bank Information'),
33
+ 'title' => Mage::helper('seller')->__('Bank Information'),
34
+ 'content' => $this->getLayout()->createBlock('seller/adminhtml_seller_edit_tab_bankinfo')->toHtml(),
35
+ ));
36
+
37
+ return parent::_beforeToHtml();
38
+ }
39
+ }
app/code/community/Ispg/Seller/Block/Adminhtml/Seller/Grid.php ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Block_Adminhtml_Seller_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ //$this->removeButton('add');
9
+ $this->setId('sellerGrid');
10
+ $this->setDefaultSort('seller_id');
11
+ $this->setDefaultDir('ASC');
12
+ $this->setSaveParametersInSession(true);
13
+ }
14
+
15
+ protected function _prepareCollection()
16
+ {
17
+ $collection = Mage::getModel('seller/seller')->getCollection();
18
+ $this->setCollection($collection);
19
+ return parent::_prepareCollection();
20
+ }
21
+
22
+ protected function _prepareColumns()
23
+ {
24
+ $this->addColumn('order_id', array(
25
+ 'header' => Mage::helper('seller')->__('Order Number'),
26
+ 'align' =>'left',
27
+ 'width' => '100px',
28
+ 'index' => 'order_id',
29
+ ));
30
+
31
+ $this->addColumn('email', array(
32
+ 'header' => Mage::helper('seller')->__('Customer Email ID'),
33
+ 'align' =>'left',
34
+ 'width' => '100px',
35
+ 'index' => 'email',
36
+ ));
37
+
38
+ $this->addColumn('payment_status', array(
39
+ 'header' => Mage::helper('seller')->__('Payment Status'),
40
+ 'align' => 'left',
41
+ 'width' => '80px',
42
+ 'index' => 'payment_status',
43
+ 'type' => 'options',
44
+ 'options' => array(
45
+ 1 => 'Pending',
46
+ 2 => 'Done',
47
+ ),
48
+ ));
49
+
50
+ $this->addColumn('order_status', array(
51
+ 'header' => Mage::helper('seller')->__('Order Status'),
52
+ 'align' => 'left',
53
+ 'width' => '80px',
54
+ 'index' => 'order_status',
55
+ 'type' => 'options',
56
+ 'options' => array(
57
+ 1 => 'Pending',
58
+ 2 => 'Done',
59
+ 3 => 'Rejected',
60
+ ),
61
+ ));
62
+
63
+ /*
64
+ $this->addColumn('content', array(
65
+ 'header' => Mage::helper('seller')->__('Item Content'),
66
+ 'width' => '150px',
67
+ 'index' => 'content',
68
+ ));
69
+ */
70
+
71
+ $this->addColumn('status', array(
72
+ 'header' => Mage::helper('seller')->__('Status'),
73
+ 'align' => 'left',
74
+ 'width' => '80px',
75
+ 'index' => 'status',
76
+ 'type' => 'options',
77
+ 'options' => array(
78
+ 1 => 'Enabled',
79
+ 2 => 'Disabled',
80
+ ),
81
+ ));
82
+
83
+ $this->addColumn('action',
84
+ array(
85
+ 'header' => Mage::helper('seller')->__('Action'),
86
+ 'width' => '100',
87
+ 'type' => 'action',
88
+ 'getter' => 'getId',
89
+ 'actions' => array(
90
+ array(
91
+ 'caption' => Mage::helper('seller')->__('Edit'),
92
+ 'url' => array('base'=> '*/*/edit'),
93
+ 'field' => 'id'
94
+ )
95
+ ),
96
+ 'filter' => false,
97
+ 'sortable' => false,
98
+ 'index' => 'stores',
99
+ 'is_system' => true,
100
+ ));
101
+
102
+ $this->addExportType('*/*/exportCsv', Mage::helper('seller')->__('CSV'));
103
+ $this->addExportType('*/*/exportXml', Mage::helper('seller')->__('XML'));
104
+
105
+ return parent::_prepareColumns();
106
+ }
107
+
108
+ protected function _prepareMassaction()
109
+ {
110
+ $this->setMassactionIdField('seller_id');
111
+ $this->getMassactionBlock()->setFormFieldName('seller');
112
+
113
+ $this->getMassactionBlock()->addItem('delete', array(
114
+ 'label' => Mage::helper('seller')->__('Delete'),
115
+ 'url' => $this->getUrl('*/*/massDelete'),
116
+ 'confirm' => Mage::helper('seller')->__('Are you sure?')
117
+ ));
118
+
119
+ $statuses = Mage::getSingleton('seller/status')->getOptionArray();
120
+
121
+ array_unshift($statuses, array('label'=>'', 'value'=>''));
122
+ $this->getMassactionBlock()->addItem('status', array(
123
+ 'label'=> Mage::helper('seller')->__('Change status'),
124
+ 'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
125
+ 'additional' => array(
126
+ 'visibility' => array(
127
+ 'name' => 'status',
128
+ 'type' => 'select',
129
+ 'class' => 'required-entry',
130
+ 'label' => Mage::helper('seller')->__('Status'),
131
+ 'values' => $statuses
132
+ )
133
+ )
134
+ ));
135
+ return $this;
136
+ }
137
+
138
+ public function getRowUrl($row)
139
+ {
140
+ return $this->getUrl('*/*/edit', array('id' => $row->getId()));
141
+ }
142
+
143
+ }
app/code/community/Ispg/Seller/Block/Button.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ispg_Seller_Block_Button extends Mage_Core_Block_Template
3
+ {
4
+
5
+ /**
6
+ * Retrieve current product model
7
+ *
8
+ * @return Mage_Catalog_Model_Product
9
+ */
10
+ public function getSellProduct()
11
+ {
12
+ if (!Mage::registry('product') && $this->getProductId()) {
13
+ $product = Mage::getModel('catalog/product')->load($this->getProductId());
14
+ Mage::register('product', $product);
15
+ }
16
+ return Mage::registry('product');
17
+ }
18
+
19
+ public function getCustomerInfo()
20
+ {
21
+ return Mage::helper('seller')->getCustomerInfo();
22
+ }
23
+
24
+ public function getSellerUrl()
25
+ {
26
+ if($this->getCustomerInfo()->getIsActive())
27
+ $sellerUrl=$this->getUrl('seller');
28
+ else
29
+ $sellerUrl=$this->getUrl('customer/account/login/');
30
+ return $sellerUrl;
31
+ }
32
+
33
+ }
app/code/community/Ispg/Seller/Block/Checkout.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ispg_Seller_Block_Checkout extends Mage_Core_Block_Template
3
+ {
4
+ public function _prepareLayout()
5
+ {
6
+ return parent::_prepareLayout();
7
+ }
8
+
9
+ /*public function getSeller()
10
+ {
11
+ if (!$this->hasData('seller')) {
12
+ $this->setData('seller', Mage::registry('seller'));
13
+ }
14
+ return $this->getData('seller');
15
+
16
+ }*/
17
+
18
+ public function getSellercart()
19
+ {
20
+ if (!$this->hasData('sellcart')) {
21
+ $this->setData('sellcart', Mage::registry('sellcart'));
22
+ }
23
+ return $this->getData('sellcart');
24
+
25
+ }
26
+
27
+ }
app/code/community/Ispg/Seller/Block/Seller.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ispg_Seller_Block_Seller extends Mage_Core_Block_Template
3
+ {
4
+ public function _prepareLayout()
5
+ {
6
+ return parent::_prepareLayout();
7
+ }
8
+
9
+ /*public function getSeller()
10
+ {
11
+ if (!$this->hasData('seller')) {
12
+ $this->setData('seller', Mage::registry('seller'));
13
+ }
14
+ return $this->getData('seller');
15
+
16
+ }*/
17
+
18
+ public function getSellercart()
19
+ {
20
+ if (!$this->hasData('sellcart')) {
21
+ $this->setData('sellcart', Mage::registry('sellcart'));
22
+ }
23
+ return $this->getData('sellcart');
24
+
25
+ }
26
+
27
+ }
app/code/community/Ispg/Seller/Block/Sellorders.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ispg_Seller_Block_Sellorders extends Mage_Core_Block_Template
3
+ {
4
+
5
+ /**
6
+ * Retrieve current product model
7
+ *
8
+ * @return Mage_Catalog_Model_Product
9
+ */
10
+ public function getSellProduct()
11
+ {
12
+ if (!Mage::registry('product') && $this->getProductId()) {
13
+ $product = Mage::getModel('catalog/product')->load($this->getProductId());
14
+ Mage::register('product', $product);
15
+ }
16
+ return Mage::registry('product');
17
+ }
18
+
19
+ public function getCustomerInfo()
20
+ {
21
+ return Mage::helper('seller')->getCustomerInfo();
22
+ }
23
+
24
+ public function customerOrders()
25
+ {
26
+ $custId=Mage::helper('seller')->getCustomerInfo()->getId();
27
+ return Mage::getModel('seller/seller')->getCustomerOrderDetails($custId);
28
+ }
29
+
30
+ public function orderDetails($ordId)
31
+ {
32
+ return Mage::getModel('seller/seller')->getProductDetails($ordId);
33
+ }
34
+
35
+ public function getPaymentStatus($stsId)
36
+ {
37
+ switch($stsId){
38
+ case 1:
39
+ $stsStatus="Pending";
40
+ break;
41
+ case 2:
42
+ $stsStatus="Done";
43
+ break;
44
+ }
45
+ return $stsStatus;
46
+ }
47
+
48
+ public function getOrderStatus($stsId)
49
+ {
50
+ switch($stsId){
51
+ case 1:
52
+ $stsStatus="Pending";
53
+ break;
54
+ case 2:
55
+ $stsStatus="Done";
56
+ break;
57
+ case 3:
58
+ $stsStatus="Rejected";
59
+ break;
60
+ }
61
+ return $stsStatus;
62
+ }
63
+
64
+ }
app/code/community/Ispg/Seller/Block/Submitseller.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ispg_Seller_Block_Submitseller extends Mage_Core_Block_Template
3
+ {
4
+
5
+ /**
6
+ * Retrieve current product model
7
+ *
8
+ * @return Mage_Catalog_Model_Product
9
+ */
10
+ /*public function getSellProduct()
11
+ {
12
+ if (!Mage::registry('product') && $this->getProductId()) {
13
+ $product = Mage::getModel('catalog/product')->load($this->getProductId());
14
+ Mage::register('product', $product);
15
+ }
16
+ return Mage::registry('product');
17
+ }
18
+
19
+ public function getCustomerInfo()
20
+ {
21
+ return Mage::helper('seller')->getCustomerInfo();
22
+ }
23
+
24
+ public function getSellerUrl()
25
+ {
26
+ if($this->getCustomerInfo()->getIsActive())
27
+ $sellerUrl=$this->getUrl('seller');
28
+ else
29
+ $sellerUrl=$this->getUrl('customer/account/login/');
30
+ return $sellerUrl;
31
+ }*/
32
+
33
+ }
app/code/community/Ispg/Seller/Helper/Data.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ public function getCustomerInfo()
7
+ {
8
+ $customer=Mage::getSingleton('customer/session')->getCustomer();
9
+ if(!$customer->getIsActive())
10
+ Mage::getSingleton('customer/session')->setBeforeAuthUrl(Mage::helper("core/url")->getCurrentUrl());
11
+ return $customer;
12
+ }
13
+
14
+ public function checkCustomerLogin()
15
+ {
16
+ if($this->getCustomerInfo()->getIsActive())
17
+ return true;
18
+ else
19
+ return false;
20
+ }
21
+
22
+ public function getPrdName($prdid)
23
+ {
24
+ $_product = Mage::getModel('catalog/product')->load($prdid);
25
+ return ($_product->getName());
26
+ }
27
+
28
+ public function getPrdPrice($prdid)
29
+ {
30
+ $_product = Mage::getModel('catalog/product')->load($prdid);
31
+ $original_price=$_product->getPrice();
32
+ $reduction_price=($this->getPriceReduction()/100)*$original_price;
33
+ return ($original_price-$reduction_price);
34
+ }
35
+
36
+ public function getPriceReduction()
37
+ {
38
+ $price_reduction=Mage::getStoreConfig('seller_option/sellprices/reduction');
39
+ if($price_reduction==''){
40
+ $price_reduction=0.0;
41
+ }
42
+ return $price_reduction;
43
+ }
44
+
45
+ public function getCartTotal($sellcart)
46
+ {
47
+ $total=0;
48
+ foreach($sellcart as $prdId=>$prdInfoArr){
49
+ $singlePrice=$this->getPrdPrice($prdId);
50
+ $qty=$prdInfoArr['quantity'];
51
+ $total=$total+($singlePrice*$qty);
52
+ }
53
+ return $total;
54
+ }
55
+
56
+ public function getTimestamp($datetime)
57
+ {
58
+ $datetimeArr=explode(" ",$datetime);
59
+ $dateArr=explode("-",$datetimeArr[0]);
60
+ $timeArr=explode(":",$datetimeArr[1]);
61
+ return mktime($timeArr[0],$timeArr[1],$timeArr[2],$dateArr[1],$dateArr[2],$dateArr[0]);
62
+ }
63
+
64
+ public function getCurrencySymbol()
65
+ {
66
+ return Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();
67
+ }
68
+
69
+ }
app/code/community/Ispg/Seller/Model/Mysql4/Seller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Model_Mysql4_Seller extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the seller_id refers to the key field in your database table.
8
+ $this->_init('seller/seller', 'seller_id');
9
+ }
10
+ }
app/code/community/Ispg/Seller/Model/Mysql4/Seller/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Model_Mysql4_Seller_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('seller/seller');
9
+ }
10
+ }
app/code/community/Ispg/Seller/Model/Mysql4/Sellerbank.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Model_Mysql4_Sellerbank extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the 'prdids' refers to the key field in your database table.
8
+ $this->_init('seller/sellerbank', 'bankinfoid');
9
+ }
10
+ }
app/code/community/Ispg/Seller/Model/Mysql4/Sellerbank/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Model_Mysql4_Sellerbank_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('seller/sellerbank');
9
+ }
10
+ }
app/code/community/Ispg/Seller/Model/Mysql4/Sellerproducts.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Model_Mysql4_Sellerproducts extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the 'prdids' refers to the key field in your database table.
8
+ $this->_init('seller/sellerproducts', 'prdids');
9
+ }
10
+ }
app/code/community/Ispg/Seller/Model/Mysql4/Sellerproducts/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Model_Mysql4_Sellerproducts_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('seller/sellerproducts');
9
+ }
10
+ }
app/code/community/Ispg/Seller/Model/Seller.php ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Model_Seller extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('seller/seller');
9
+ }
10
+
11
+ public function getOrderNumber()
12
+ {
13
+ $defaultOrder="1000";
14
+ $resource = Mage::getSingleton('core/resource');
15
+ $read= $resource->getConnection('core_read');
16
+
17
+ $sellersTable = $resource->getTableName('seller');
18
+
19
+
20
+ $selectHighestOrder = $read->select()
21
+ ->from($sellersTable,array('order_id'))
22
+ ->order('order_id DESC')
23
+ ->limit(1,0);
24
+
25
+ $sellers_orders = $read->fetchRow($selectHighestOrder);
26
+
27
+ //echo "<pre>";print_r($sellers_ordersaddress['order_id']);
28
+ if($sellers_orders['order_id']==''){
29
+ $new_orderId=$defaultOrder;
30
+ } else {
31
+ $new_orderId=$sellers_orders['order_id']+1;
32
+ }
33
+ //echo $new_orderId;exit;
34
+
35
+ return $new_orderId;
36
+ }
37
+
38
+ public function createOrder($sellCart)
39
+ {
40
+ $orderId=$this->insertOrder($this->getOrderNumber());
41
+ //$totalPrice=Mage::helper('seller')->getCartTotal($sellCart);
42
+ foreach($sellCart as $prId=>$prIdQtyArr){
43
+ //$_product = Mage::getModel('catalog/product')->load($prId);
44
+ $product_name=Mage::helper('seller')->getPrdName($prId);
45
+ $product_price=Mage::helper('seller')->getPrdPrice($prId);
46
+ $qty=$prIdQtyArr['quantity'];
47
+ $prdInfoArr=array(
48
+ 'prdids'=>'',
49
+ 'order_id'=>$orderId,
50
+ 'product_id'=>$prId,
51
+ 'name'=>$product_name,
52
+ 'price'=>$product_price,
53
+ 'qty'=>$qty,
54
+ 'subtotal'=>($product_price*$qty)
55
+ );
56
+ $this->insertProducts($prdInfoArr);
57
+ }
58
+ }
59
+
60
+ public function insertOrder($orderId)
61
+ {
62
+ $orderInfoArr=array(
63
+ 'seller_id'=>'',
64
+ 'order_id'=>$orderId,
65
+ 'customer_id'=>Mage::helper('seller')->getCustomerInfo()->getId(),
66
+ 'email'=>Mage::helper('seller')->getCustomerInfo()->getEmail(),
67
+ 'payment_status'=>1,
68
+ 'order_status'=>1,
69
+ 'status'=>1,
70
+ 'created_time'=>date('Y-m-d h:i:s'),
71
+ 'update_time'=>date('Y-m-d h:i:s')
72
+ );
73
+ //echo "<pre>";print_r($orderInfoArr);
74
+
75
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
76
+ $ordinfoTable = $connection->getTableName('seller');
77
+ $connection->beginTransaction();
78
+ $connection->insert($ordinfoTable,$orderInfoArr);
79
+ $connection->commit();
80
+
81
+ return $orderId;
82
+ }
83
+
84
+ public function insertProducts($prdInfoArr)
85
+ {
86
+ //echo "<pre>";print_r($prdInfoArr);
87
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
88
+ $prdsinfoTable = $connection->getTableName('sellerproducts');
89
+ $connection->beginTransaction();
90
+ $connection->insert($prdsinfoTable,$prdInfoArr);
91
+ $connection->commit();
92
+
93
+ }
94
+
95
+ public function insertBankinfo($bankInfoArr)
96
+ {
97
+ $customerId=Mage::helper('seller')->getCustomerInfo()->getId();
98
+ $bankInfoArr['bankinfoid']='';
99
+ $bankInfoArr['customer_id']=$customerId;
100
+ //echo "<pre>";print_r($bankInfoArr);
101
+
102
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
103
+ $bankinfoTable = $connection->getTableName('sellerbank');
104
+ $connection->beginTransaction();
105
+ if($this->checkCustomerExists($customerId)){
106
+ //echo "<pre>Exists";
107
+ unset($bankInfoArr['bankinfoid']);
108
+ $where = $connection->quoteInto('customer_id =?',$customerId);
109
+ $connection->update($bankinfoTable, $bankInfoArr, $where);
110
+ } else {
111
+ //echo "<pre>NoExists";
112
+ $connection->insert($bankinfoTable,$bankInfoArr);
113
+ }
114
+ $connection->commit();
115
+
116
+ }
117
+
118
+ public function checkCustomerExists($customerId)
119
+ {
120
+ $read = Mage::getSingleton('core/resource')->getConnection('core_read');
121
+ $bankinfoTable = $read->getTableName('sellerbank');
122
+
123
+ $cstArr = $read->select()
124
+ ->from($bankinfoTable,array('customer_id'))
125
+ ->where('customer_id=?',$customerId);
126
+
127
+ $csts = $read->fetchAll($cstArr);
128
+
129
+ if(count($csts)>0){
130
+ return true;
131
+ } else {
132
+ return false;
133
+ }
134
+ }
135
+
136
+ public function getOrderDetailsById($sellerId)
137
+ {
138
+ $read = Mage::getSingleton('core/resource')->getConnection('core_read');
139
+ $ordinfoTable = $read->getTableName('seller');
140
+
141
+ $cstArr = $read->select()
142
+ ->from($ordinfoTable,'*')
143
+ ->where('seller_id=?',$sellerId);
144
+
145
+ $csts = $read->fetchAll($cstArr);
146
+ return $csts[0];
147
+ }
148
+
149
+ public function getCustomerOrderDetails($custId)
150
+ {
151
+ $read = Mage::getSingleton('core/resource')->getConnection('core_read');
152
+ $ordinfoTable = $read->getTableName('seller');
153
+
154
+ $cstArr = $read->select()
155
+ ->from($ordinfoTable,'*')
156
+ ->where('customer_id=?',$custId)
157
+ ->order('seller_id DESC');
158
+
159
+ $csts = $read->fetchAll($cstArr);
160
+ return $csts;
161
+ }
162
+
163
+ public function getProductDetails($ordId)
164
+ {
165
+ $read = Mage::getSingleton('core/resource')->getConnection('core_read');
166
+ $prdsinfoTable = $read->getTableName('sellerproducts');
167
+
168
+ $cstArr = $read->select()
169
+ ->from($prdsinfoTable,'*')
170
+ ->where('order_id=?',$ordId);
171
+
172
+ $csts = $read->fetchAll($cstArr);
173
+ return $csts;
174
+ }
175
+
176
+ }
app/code/community/Ispg/Seller/Model/Sellerbank.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Model_Sellerbank extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('seller/sellerbank');
9
+ }
10
+
11
+
12
+ }
app/code/community/Ispg/Seller/Model/Sellerproducts.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Model_Sellerproducts extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('seller/sellerproducts');
9
+ }
10
+
11
+
12
+ }
app/code/community/Ispg/Seller/Model/Status.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Model_Status extends Varien_Object
4
+ {
5
+ const STATUS_ENABLED = 1;
6
+ const STATUS_DISABLED = 2;
7
+
8
+ static public function getOptionArray()
9
+ {
10
+ return array(
11
+ self::STATUS_ENABLED => Mage::helper('seller')->__('Enabled'),
12
+ self::STATUS_DISABLED => Mage::helper('seller')->__('Disabled')
13
+ );
14
+ }
15
+ }
app/code/community/Ispg/Seller/controllers/Adminhtml/SellerController.php ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ispg_Seller_Adminhtml_SellerController extends Mage_Adminhtml_Controller_action
4
+ {
5
+
6
+ protected function _initAction() {
7
+ $this->loadLayout()
8
+ ->_setActiveMenu('seller/items')
9
+ ->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
10
+
11
+ return $this;
12
+ }
13
+
14
+ public function indexAction() {
15
+ $this->_initAction()
16
+ ->renderLayout();
17
+ }
18
+
19
+ public function editAction() {
20
+ $id = $this->getRequest()->getParam('id');
21
+ $model = Mage::getModel('seller/seller')->load($id);
22
+
23
+ if ($model->getId() || $id == 0) {
24
+ $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
25
+ if (!empty($data)) {
26
+ $model->setData($data);
27
+ }
28
+
29
+ Mage::register('seller_data', $model);
30
+
31
+ $this->loadLayout();
32
+ $this->_setActiveMenu('seller/items');
33
+
34
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
35
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
36
+
37
+ $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
38
+
39
+ $this->_addContent($this->getLayout()->createBlock('seller/adminhtml_seller_edit'))
40
+ ->_addLeft($this->getLayout()->createBlock('seller/adminhtml_seller_edit_tabs'));
41
+
42
+ $this->renderLayout();
43
+ } else {
44
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('seller')->__('Item does not exist'));
45
+ $this->_redirect('*/*/');
46
+ }
47
+ }
48
+
49
+ public function newAction() {
50
+ $this->_forward('edit');
51
+ }
52
+
53
+ public function saveAction() {
54
+ if ($data = $this->getRequest()->getPost()) {
55
+
56
+ if(isset($_FILES['filename']['name']) && $_FILES['filename']['name'] != '') {
57
+ try {
58
+ /* Starting upload */
59
+ $uploader = new Varien_File_Uploader('filename');
60
+
61
+ // Any extention would work
62
+ $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
63
+ $uploader->setAllowRenameFiles(false);
64
+
65
+ // Set the file upload mode
66
+ // false -> get the file directly in the specified folder
67
+ // true -> get the file in the product like folders
68
+ // (file.jpg will go in something like /media/f/i/file.jpg)
69
+ $uploader->setFilesDispersion(false);
70
+
71
+ // We set media as the upload dir
72
+ $path = Mage::getBaseDir('media') . DS ;
73
+ $uploader->save($path, $_FILES['filename']['name'] );
74
+
75
+ } catch (Exception $e) {
76
+
77
+ }
78
+
79
+ //this way the name is saved in DB
80
+ $data['filename'] = $_FILES['filename']['name'];
81
+ }
82
+
83
+
84
+ $model = Mage::getModel('seller/seller');
85
+ $model->setData($data)
86
+ ->setId($this->getRequest()->getParam('id'));
87
+
88
+ try {
89
+ if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
90
+ $model->setCreatedTime(now())
91
+ ->setUpdateTime(now());
92
+ } else {
93
+ $model->setUpdateTime(now());
94
+ }
95
+
96
+ $model->save();
97
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('seller')->__('Item was successfully saved'));
98
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
99
+
100
+ if ($this->getRequest()->getParam('back')) {
101
+ $this->_redirect('*/*/edit', array('id' => $model->getId()));
102
+ return;
103
+ }
104
+ $this->_redirect('*/*/');
105
+ return;
106
+ } catch (Exception $e) {
107
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
108
+ Mage::getSingleton('adminhtml/session')->setFormData($data);
109
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
110
+ return;
111
+ }
112
+ }
113
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('seller')->__('Unable to find item to save'));
114
+ $this->_redirect('*/*/');
115
+ }
116
+
117
+ public function deleteAction() {
118
+ if( $this->getRequest()->getParam('id') > 0 ) {
119
+ try {
120
+ $model = Mage::getModel('seller/seller');
121
+
122
+ $model->setId($this->getRequest()->getParam('id'))
123
+ ->delete();
124
+
125
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
126
+ $this->_redirect('*/*/');
127
+ } catch (Exception $e) {
128
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
129
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
130
+ }
131
+ }
132
+ $this->_redirect('*/*/');
133
+ }
134
+
135
+ public function massDeleteAction() {
136
+ $sellerIds = $this->getRequest()->getParam('seller');
137
+ if(!is_array($sellerIds)) {
138
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
139
+ } else {
140
+ try {
141
+ foreach ($sellerIds as $sellerId) {
142
+ $seller = Mage::getModel('seller/seller')->load($sellerId);
143
+ $seller->delete();
144
+ }
145
+ Mage::getSingleton('adminhtml/session')->addSuccess(
146
+ Mage::helper('adminhtml')->__(
147
+ 'Total of %d record(s) were successfully deleted', count($sellerIds)
148
+ )
149
+ );
150
+ } catch (Exception $e) {
151
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
152
+ }
153
+ }
154
+ $this->_redirect('*/*/index');
155
+ }
156
+
157
+ public function massStatusAction()
158
+ {
159
+ $sellerIds = $this->getRequest()->getParam('seller');
160
+ if(!is_array($sellerIds)) {
161
+ Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
162
+ } else {
163
+ try {
164
+ foreach ($sellerIds as $sellerId) {
165
+ $seller = Mage::getSingleton('seller/seller')
166
+ ->load($sellerId)
167
+ ->setStatus($this->getRequest()->getParam('status'))
168
+ ->setIsMassupdate(true)
169
+ ->save();
170
+ }
171
+ $this->_getSession()->addSuccess(
172
+ $this->__('Total of %d record(s) were successfully updated', count($sellerIds))
173
+ );
174
+ } catch (Exception $e) {
175
+ $this->_getSession()->addError($e->getMessage());
176
+ }
177
+ }
178
+ $this->_redirect('*/*/index');
179
+ }
180
+
181
+ public function exportCsvAction()
182
+ {
183
+ $fileName = 'seller.csv';
184
+ $content = $this->getLayout()->createBlock('seller/adminhtml_seller_grid')
185
+ ->getCsv();
186
+
187
+ $this->_sendUploadResponse($fileName, $content);
188
+ }
189
+
190
+ public function exportXmlAction()
191
+ {
192
+ $fileName = 'seller.xml';
193
+ $content = $this->getLayout()->createBlock('seller/adminhtml_seller_grid')
194
+ ->getXml();
195
+
196
+ $this->_sendUploadResponse($fileName, $content);
197
+ }
198
+
199
+ protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream')
200
+ {
201
+ $response = $this->getResponse();
202
+ $response->setHeader('HTTP/1.1 200 OK','');
203
+ $response->setHeader('Pragma', 'public', true);
204
+ $response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
205
+ $response->setHeader('Content-Disposition', 'attachment; filename='.$fileName);
206
+ $response->setHeader('Last-Modified', date('r'));
207
+ $response->setHeader('Accept-Ranges', 'bytes');
208
+ $response->setHeader('Content-Length', strlen($content));
209
+ $response->setHeader('Content-type', $contentType);
210
+ $response->setBody($content);
211
+ $response->sendResponse();
212
+ die;
213
+ }
214
+ }
app/code/community/Ispg/Seller/controllers/IndexController.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ispg_Seller_IndexController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+
7
+ /*$ss = $this->getRequest()->getParam('ss');
8
+ if($ss==1){
9
+ Mage::getSingleton('core/session')->unsSellercart();
10
+ exit;
11
+ }*/
12
+
13
+ $postData = $this->getRequest()->getPost();
14
+ $sellFormData = $this->getRequest()->getPost('sellform');
15
+ //echo "<pre>";print_r($sellFormData);
16
+ //echo "SellForm-".count($sellFormData);
17
+ $sellCart=Mage::getSingleton('core/session')->getSellercart();
18
+
19
+ if(Mage::helper('seller')->checkCustomerLogin() && ($postData['prId']!='' || count($sellCart)>0)){
20
+
21
+ $customer_id=Mage::helper('seller')->getCustomerInfo()->getId();
22
+
23
+ if(array_key_exists($postData['prId'], $sellCart)){
24
+ $sellCart[$postData['prId']]['quantity']=$sellCart[$postData['prId']]['quantity']+1;
25
+ } elseif(count($sellFormData)>0) {
26
+ foreach($sellFormData as $sellprdId=>$sellqtyArr){
27
+ $sellCart[$sellprdId]['quantity']=$sellqtyArr['qty'];
28
+ }
29
+ } elseif($postData['prId']!='') {
30
+ $sellCart[$postData['prId']]=array(
31
+ 'product_id' => $postData['prId'],
32
+ 'quantity' => 1
33
+ );
34
+ }
35
+
36
+ Mage::getSingleton('core/session')->setSellercart($sellCart);
37
+ $sessionCart=Mage::getSingleton('core/session')->getSellercart();
38
+ Mage::register('sellcart', $sessionCart);
39
+ //echo "<pre>";print_r($sessionCart);
40
+ }
41
+
42
+ $this->loadLayout();
43
+ $this->renderLayout();
44
+
45
+
46
+ }
47
+
48
+ public function rmvfromcartAction()
49
+ {
50
+ $prdId = $this->getRequest()->getParam('ss');
51
+ $sessionCart=Mage::getSingleton('core/session')->getSellercart();
52
+ unset($sessionCart[$prdId]);
53
+ Mage::getSingleton('core/session')->setSellercart($sessionCart);
54
+ $this->_redirect('seller');
55
+ }
56
+
57
+ public function checkoutAction()
58
+ {
59
+ $sessionCart=Mage::getSingleton('core/session')->getSellercart();
60
+ if(count($sessionCart)==0)
61
+ $this->_redirect('seller');
62
+ Mage::register('sellcart', $sessionCart);
63
+
64
+ $this->loadLayout();
65
+ $this->renderLayout();
66
+
67
+ }
68
+
69
+ public function submitsellerAction()
70
+ {
71
+ $postData = $this->getRequest()->getPost();
72
+ $sessionCart=Mage::getSingleton('core/session')->getSellercart();
73
+ if(count($sessionCart)==0){
74
+ $this->_redirect('seller');
75
+ } else {
76
+ //Mage::register('sellcart', $sessionCart);
77
+ Mage::getModel('seller/seller')->createOrder($sessionCart);
78
+ Mage::getModel('seller/seller')->insertBankinfo($postData);
79
+ Mage::getSingleton('core/session')->unsSellercart();
80
+ }
81
+
82
+ $this->loadLayout();
83
+ $this->renderLayout();
84
+
85
+ }
86
+
87
+ public function sellordersAction()
88
+ {
89
+ if(!Mage::helper('seller')->checkCustomerLogin()){
90
+ $this->_redirect('customer/account/login/');
91
+ } else {
92
+ $this->loadLayout();
93
+ $this->renderLayout();
94
+ }
95
+ }
96
+
97
+ }
app/code/community/Ispg/Seller/etc/adminhtml.xml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <adminhtml>
3
+ <acl>
4
+ <resources>
5
+ <admin>
6
+ <children>
7
+ <system>
8
+ <children>
9
+ <config>
10
+ <children>
11
+ <seller_option translate="title" module="seller">
12
+ <title>Test Section ACL</title>
13
+ <sort_order>99</sort_order>
14
+ </seller_option>
15
+ </children>
16
+ </config>
17
+ </children>
18
+ </system>
19
+ </children>
20
+ </admin>
21
+ </resources>
22
+ </acl>
23
+ </adminhtml>
app/code/community/Ispg/Seller/etc/config.xml ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ispg_Seller>
5
+ <version>0.1.0</version>
6
+ </Ispg_Seller>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <seller>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Ispg_Seller</module>
14
+ <frontName>seller</frontName>
15
+ </args>
16
+ </seller>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <seller>
21
+ <file>seller.xml</file>
22
+ </seller>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <admin>
27
+ <routers>
28
+ <seller>
29
+ <use>admin</use>
30
+ <args>
31
+ <module>Ispg_Seller</module>
32
+ <frontName>seller</frontName>
33
+ </args>
34
+ </seller>
35
+ </routers>
36
+ </admin>
37
+ <adminhtml>
38
+ <menu>
39
+ <seller module="seller">
40
+ <title>Seller</title>
41
+ <sort_order>71</sort_order>
42
+ <children>
43
+ <items module="seller">
44
+ <title>Manage Orders</title>
45
+ <sort_order>0</sort_order>
46
+ <action>seller/adminhtml_seller</action>
47
+ </items>
48
+ </children>
49
+ </seller>
50
+ </menu>
51
+ <acl>
52
+ <resources>
53
+ <all>
54
+ <title>Allow Everything</title>
55
+ </all>
56
+ <admin>
57
+ <children>
58
+ <Ispg_Seller>
59
+ <title>Seller Module</title>
60
+ <sort_order>10</sort_order>
61
+ </Ispg_Seller>
62
+ </children>
63
+ </admin>
64
+ </resources>
65
+ </acl>
66
+ <layout>
67
+ <updates>
68
+ <seller>
69
+ <file>seller.xml</file>
70
+ </seller>
71
+ </updates>
72
+ </layout>
73
+ </adminhtml>
74
+ <global>
75
+ <models>
76
+ <seller>
77
+ <class>Ispg_Seller_Model</class>
78
+ <resourceModel>seller_mysql4</resourceModel>
79
+ </seller>
80
+ <seller_mysql4>
81
+ <class>Ispg_Seller_Model_Mysql4</class>
82
+ <entities>
83
+ <seller>
84
+ <table>seller</table>
85
+ </seller>
86
+ <sellerproducts>
87
+ <table>sellerproducts</table>
88
+ </sellerproducts>
89
+ <sellerbank>
90
+ <table>sellerbank</table>
91
+ </sellerbank>
92
+ </entities>
93
+ </seller_mysql4>
94
+ </models>
95
+ <resources>
96
+ <seller_setup>
97
+ <setup>
98
+ <module>Ispg_Seller</module>
99
+ </setup>
100
+ <connection>
101
+ <use>core_setup</use>
102
+ </connection>
103
+ </seller_setup>
104
+ <seller_write>
105
+ <connection>
106
+ <use>core_write</use>
107
+ </connection>
108
+ </seller_write>
109
+ <seller_read>
110
+ <connection>
111
+ <use>core_read</use>
112
+ </connection>
113
+ </seller_read>
114
+ </resources>
115
+ <blocks>
116
+ <seller>
117
+ <class>Ispg_Seller_Block</class>
118
+ </seller>
119
+ </blocks>
120
+ <helpers>
121
+ <seller>
122
+ <class>Ispg_Seller_Helper</class>
123
+ </seller>
124
+ </helpers>
125
+ </global>
126
+ </config>
app/code/community/Ispg/Seller/etc/system.xml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <config>
3
+ <tabs>
4
+ <seller translate="label" module="seller">
5
+ <label>Sellers</label>
6
+ <sort_order>140</sort_order>
7
+ </seller>
8
+ </tabs>
9
+ <sections>
10
+ <seller_option translate="label" module="seller">
11
+ <label>Sellers Information</label>
12
+ <tab>seller</tab>
13
+ <sort_order>100</sort_order>
14
+ <show_in_default>1</show_in_default>
15
+ <show_in_website>1</show_in_website>
16
+ <show_in_store>1</show_in_store>
17
+ <groups>
18
+ <sellprices translate="label">
19
+ <label>Sellers Information</label>
20
+ <sort_order>1</sort_order>
21
+ <show_in_default>1</show_in_default>
22
+ <show_in_website>1</show_in_website>
23
+ <show_in_store>1</show_in_store>
24
+ <fields>
25
+ <reduction translate="label price reduction">
26
+ <label>Price reduction (Percentage)</label>
27
+ <frontend_type>text</frontend_type>
28
+ <sort_order>1</sort_order>
29
+ <show_in_default>1</show_in_default>
30
+ <show_in_website>1</show_in_website>
31
+ <show_in_store>1</show_in_store>
32
+ </reduction>
33
+ </fields>
34
+ <fields>
35
+ <shipping translate="label shipping">
36
+ <label>Seller Shipping Address</label>
37
+ <frontend_type>text</frontend_type>
38
+ <sort_order>1</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
+ </shipping>
43
+ </fields>
44
+ </sellprices>
45
+ </groups>
46
+ </seller_option>
47
+ </sections>
48
+ </config>
app/code/community/Ispg/Seller/sql/seller_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("
8
+
9
+ -- DROP TABLE IF EXISTS {$this->getTable('seller')};
10
+ CREATE TABLE {$this->getTable('seller')} (
11
+ `seller_id` int(11) unsigned NOT NULL auto_increment,
12
+ `order_id` int(11) NOT NULL,
13
+ `customer_id` int(11) NOT NULL,
14
+ `email` varchar(500) NOT NULL,
15
+ `payment_status` smallint(6) NOT NULL,
16
+ `order_status` smallint(6) NOT NULL,
17
+ `status` smallint(6) NOT NULL default '0',
18
+ `created_time` datetime NULL,
19
+ `update_time` datetime NULL,
20
+ PRIMARY KEY (`seller_id`)
21
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
22
+
23
+ -- DROP TABLE IF EXISTS {$this->getTable('sellerbank')};
24
+ CREATE TABLE {$this->getTable('sellerbank')} (
25
+ `bankinfoid` int(11) unsigned NOT NULL auto_increment,
26
+ `customer_id` int(11) NOT NULL,
27
+ `firstname` varchar(100) NOT NULL,
28
+ `lastname` varchar(100) NOT NULL,
29
+ `telephone` varchar(100) NOT NULL,
30
+ `acc_name` varchar(100) NOT NULL,
31
+ `acc_num` varchar(100) NOT NULL,
32
+ `acc_bank` varchar(100) NOT NULL,
33
+ `acc_branch` varchar(100) NOT NULL,
34
+ `acc_ifsc` varchar(100) NOT NULL,
35
+ PRIMARY KEY (`bankinfoid`)
36
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
37
+
38
+ -- DROP TABLE IF EXISTS {$this->getTable('sellerproducts')};
39
+ CREATE TABLE {$this->getTable('sellerproducts')} (
40
+ `prdids` int(11) unsigned NOT NULL auto_increment,
41
+ `order_id` int(11) NOT NULL,
42
+ `product_id` int(11) NOT NULL,
43
+ `name` varchar(500) NOT NULL,
44
+ `price` decimal(12,4) NOT NULL,
45
+ `qty` int(11) NOT NULL,
46
+ `subtotal` decimal(12,4) NOT NULL,
47
+ PRIMARY KEY (`prdids`)
48
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
49
+
50
+ ");
51
+
52
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/seller.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <seller_adminhtml_seller_index>
4
+ <reference name="content">
5
+ <block type="seller/adminhtml_seller" name="seller" />
6
+ </reference>
7
+ </seller_adminhtml_seller_index>
8
+ </layout>
app/design/frontend/base/default/layout/seller.xml ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ </default>
5
+ <seller_index_index>
6
+ <reference name="root">
7
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
8
+ </reference>
9
+ <reference name="content">
10
+ <block type="seller/seller" name="seller" template="seller/seller.phtml" />
11
+ </reference>
12
+ </seller_index_index>
13
+ <seller_index_checkout>
14
+ <reference name="root">
15
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
16
+ </reference>
17
+ <reference name="content">
18
+ <block type="seller/checkout" name="checkout" template="seller/checkout.phtml" />
19
+ </reference>
20
+ </seller_index_checkout>
21
+ <seller_index_submitseller>
22
+ <reference name="root">
23
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
24
+ </reference>
25
+ <reference name="content">
26
+ <block type="seller/submitseller" name="submitseller" template="seller/submitseller.phtml" />
27
+ </reference>
28
+ </seller_index_submitseller>
29
+ <seller_index_sellorders>
30
+ <reference name="root">
31
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
32
+ </reference>
33
+ <reference name="content">
34
+ <block type="seller/sellorders" name="sellorders" template="seller/sellorders.phtml" />
35
+ </reference>
36
+ </seller_index_sellorders>
37
+
38
+ <catalog_product_view>
39
+ <!--<reference name="product.info.addtocart">
40
+ <block type="seller/button" name="sellerbtn" after="product.info.addtocart" template="seller/sellbtn.phtml" />
41
+ </reference>-->
42
+ <reference type="catalog/product_view_additional" name="product.info.additional">
43
+ <block type="seller/button" name="sellerbtn" after="product.info.additional" template="seller/sellbtn.phtml" />
44
+ </reference>
45
+ <!--<reference name="content">
46
+ <block type="seller/button" name="sellerbtn" after="product.info" template="seller/sellbtn.phtml" />
47
+ </reference>-->
48
+ </catalog_product_view>
49
+ </layout>
app/design/frontend/base/default/template/seller/checkout.phtml ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $sellerUrl=$this->getUrl('seller');
3
+ $sellCart=$this->getSellercart();
4
+ $currencySymbol=Mage::helper('seller')->getCurrencySymbol();
5
+ if(Mage::getStoreConfig('seller_option/sellprices/shipping')==''){
6
+ $sell_shipping="[ Seller Address should be filled in admin panel ]";
7
+ } else {
8
+ $sell_shipping=Mage::getStoreConfig('seller_option/sellprices/shipping');
9
+ }
10
+ ?>
11
+ <div class="page-title title-buttons">
12
+ <h1>Seller Checkout</h1>
13
+ <ul class="checkout-types">
14
+ <li>
15
+ </li>
16
+ </ul>
17
+ </div>
18
+
19
+
20
+ <div class="block block-cart">
21
+ <div class="block-title">
22
+ <strong><span>Seller Cart</span></strong>
23
+ </div>
24
+ <div class="block-content">
25
+ <?php
26
+ $totalPrice=Mage::helper('seller')->getCartTotal($sellCart);
27
+ foreach($sellCart as $prId=>$prIdQtyArr){
28
+ $_product = Mage::getModel('catalog/product')->load($prId);
29
+ $product_price=Mage::helper('seller')->getPrdPrice($prId);
30
+ ?>
31
+ <ol class="mini-products-list">
32
+ <li class="item last odd">
33
+ <a class="product-image" title="<?php echo $_product->getName(); ?>" href="<?php echo $_product->getProductUrl(); ?>">
34
+ <img width="50" height="50" alt="<?php echo $_product->getName(); ?>" src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail'); ?>">
35
+ </a>
36
+ <div class="product-details">
37
+ <p class="product-name"><a href="<?php echo $_product->getProductUrl(); ?>"><?php echo $_product->getName(); ?></a></p>
38
+ <strong><?php echo $prIdQtyArr['quantity']; ?></strong> x <span class="price"><?php echo $currencySymbol.$product_price; ?></span>
39
+ </div>
40
+ </li>
41
+ </ol>
42
+ <?php } ?>
43
+ <p class="block-subtitle">Grand Total: <?php echo $currencySymbol.$totalPrice; ?></p>
44
+ </div>
45
+ </div>
46
+
47
+ <div class="fieldset">
48
+ <h2 class="legend">Shipping Address</h2>
49
+ <ul class="form-list">
50
+ <li class="wide">
51
+ <label class="required" for="street_1"><em>*</em><?php echo $sell_shipping; ?></label>
52
+ </li>
53
+ </ul>
54
+ </div>
55
+
56
+ <form name="submitseller" id="submitseller" action="<?php echo $sellerUrl."index/submitseller/"; ?>" method="post">
57
+ <div class="fieldset">
58
+ <h2 class="legend">Contact Information</h2>
59
+ <ul class="form-list">
60
+ <li class="fields">
61
+ <div class="customer-name">
62
+ <div class="field name-firstname">
63
+ <label class="required" for="firstname"><em>*</em>First Name</label>
64
+ <div class="input-box">
65
+ <input type="text" class="input-text required-entry" maxlength="255" title="First Name" value="" name="firstname" id="firstname">
66
+ </div>
67
+ </div>
68
+ <div class="field name-lastname">
69
+ <label class="required" for="lastname"><em>*</em>Last Name</label>
70
+ <div class="input-box">
71
+ <input type="text" class="input-text required-entry" maxlength="255" title="Last Name" value="" name="lastname" id="lastname">
72
+ </div>
73
+ </div>
74
+ </div>
75
+ </li>
76
+ <li class="fields">
77
+ <div class="field">
78
+ <label class="required" for="telephone"><em>*</em>Telephone</label>
79
+ <div class="input-box">
80
+ <input type="text" id="telephone" class="input-text required-entry" title="Telephone" value="" name="telephone">
81
+ </div>
82
+ </div>
83
+ </li>
84
+ </ul>
85
+ </div>
86
+
87
+ <div class="fieldset">
88
+ <h2 class="legend">Bank Account Details</h2>
89
+ <ul class="form-list">
90
+ <li class="fields">
91
+ <div class="field">
92
+ <label class="required" for="acc_name"><em>*</em>Acc holder Name</label>
93
+ <div class="input-box">
94
+ <input type="text" name="acc_name" id="acc_name" class="input-text required-entry" title="Acc holder Name" value="">
95
+ </div>
96
+ </div>
97
+ <div class="field">
98
+ <label class="required" for="acc_num"><em>*</em>Acc number</label>
99
+ <div class="input-box">
100
+ <input type="text" name="acc_num" id="acc_num" class="input-text required-entry" title="Acc number" value="">
101
+ </div>
102
+ </div>
103
+ </li>
104
+ <li class="fields">
105
+ <div class="field">
106
+ <label class="required" for="acc_bank"><em>*</em>Bank name</label>
107
+ <div class="input-box">
108
+ <input type="text" name="acc_bank" id="acc_bank" class="input-text required-entry" title="Bank name" value="">
109
+ </div>
110
+ </div>
111
+ <div class="field">
112
+ <label class="required" for="acc_branch"><em>*</em>Branch</label>
113
+ <div class="input-box">
114
+ <input type="text" name="acc_branch" id="acc_branch" class="input-text required-entry" title="Branch" value="">
115
+ </div>
116
+ </div>
117
+ </li>
118
+ <li class="fields">
119
+ <div class="field">
120
+ <label class="required" for="acc_ifsc"><em>*</em>IFSC/RTGS code</label>
121
+ <div class="input-box">
122
+ <input type="text" name="acc_ifsc" id="acc_ifsc" class="input-text required-entry" title="IFSC/RTGS code" value="">
123
+ </div>
124
+ </div>
125
+ </li>
126
+ </ul>
127
+ </div>
128
+
129
+ <div class="buttons-set">
130
+ <p class="required">* Required Fields</p>
131
+ <button class="button" title="Submit" type="submit"><span><span>Submit</span></span></button>
132
+ </div>
133
+ </form>
134
+
135
+ <script type="text/javascript">
136
+ var dataForm = new VarienForm('submitseller', true);
137
+ </script>
app/design/frontend/base/default/template/seller/sellbtn.phtml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <div style="padding-top: 30px;">
2
+ <form name="sellform" id="sellform" action="<?php echo $this->getSellerUrl(); ?>" method="post">
3
+ <input type="hidden" name="prId" value="<?php echo $this->getSellProduct()->getId(); ?>" />
4
+ <button class="button btn-cart" title="<?php echo $this->__('SELL') ?>" type="submit">
5
+ <span><span><?php echo $this->__('SELL') ?></span></span>
6
+ </button>
7
+ </form>
8
+ </div>
app/design/frontend/base/default/template/seller/seller.phtml ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ //echo "<pre>";print_r($this->getSellercart());
3
+ $sellCart=$this->getSellercart();
4
+ $baseUrl=$this->getUrl('');
5
+ $sellerUrl=$this->getUrl('seller');
6
+ $currencySymbol=Mage::helper('seller')->getCurrencySymbol();
7
+
8
+ if(count($sellCart)>0){
9
+ ?>
10
+ <!-- Cart html -->
11
+ <div class="col-main">
12
+ <div class="cart">
13
+ <div class="page-title title-buttons">
14
+ <h1>Selling Cart</h1>
15
+ <ul class="checkout-types">
16
+ <li>
17
+ <button onclick="window.location='<?php echo $sellerUrl."index/checkout/"; ?>';" class="button btn-proceed-checkout btn-checkout" title="Proceed to Checkout" type="button">
18
+ <span>
19
+ <span>Proceed to Checkout</span>
20
+ </span>
21
+ </button>
22
+ </li>
23
+ </ul>
24
+ </div>
25
+ <!--<ul class="messages">
26
+ <li class="success-msg">
27
+ <ul>
28
+ <li>
29
+ <span>2003-09 Dodge Trucks L6-5.9L/6.7L was added to your shopping cart.</span>
30
+ </li>
31
+ </ul>
32
+ </li>
33
+ </ul>-->
34
+ <form method="post" action="<?php echo $sellerUrl; ?>">
35
+ <fieldset>
36
+ <table class="data-table cart-table">
37
+ <colgroup>
38
+ <col width="1">
39
+ <col>
40
+ <col width="1">
41
+ <col width="1">
42
+ <col width="1">
43
+ <col width="1">
44
+ <col width="1">
45
+ <col width="1">
46
+ </colgroup>
47
+ <thead>
48
+ <tr class="first last">
49
+ <th rowspan="1">&nbsp;</th>
50
+ <th rowspan="1"><span class="nobr">Product Name</span></th>
51
+ <th colspan="1" class="a-center"><span class="nobr">Unit Price</span></th>
52
+ <th class="a-center" rowspan="1">Qty</th>
53
+ <th colspan="1" class="a-center">Subtotal</th>
54
+ <th class="a-center" rowspan="1">&nbsp;</th>
55
+ </tr>
56
+ </thead>
57
+ <tfoot>
58
+ <tr class="first last">
59
+ <td class="a-right last" colspan="50">
60
+ <button onclick="setLocation('<?php echo $baseUrl; ?>')" class="button btn-continue" title="Continue Selling" type="button"><span><span>Continue Selling</span></span></button>
61
+ <button class="button btn-update" title="Update Selling Cart" value="update_qty" name="update_cart_action" type="submit"><span><span>Update Selling Cart</span></span></button>
62
+ </td>
63
+ </tr>
64
+ </tfoot>
65
+ <tbody>
66
+ <?php
67
+ $totalPrice=Mage::helper('seller')->getCartTotal($sellCart);
68
+ foreach($sellCart as $prId=>$prIdQtyArr){
69
+ $_product = Mage::getModel('catalog/product')->load($prId);
70
+ $product_price=Mage::helper('seller')->getPrdPrice($prId);
71
+ ?>
72
+ <tr class="first last odd">
73
+ <td>
74
+ <a class="product-image" title="<?php echo $_product->getName(); ?>" href="<?php echo $_product->getProductUrl(); ?>">
75
+ <img width="75" height="75" alt="<?php echo $_product->getName(); ?>" src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail'); ?>">
76
+ </a>
77
+ </td>
78
+ <td>
79
+ <h2 class="product-name">
80
+ <a href="<?php echo $_product->getProductUrl(); ?>"><?php echo $_product->getName(); ?></a>
81
+ </h2>
82
+ </td>
83
+ <td class="a-right">
84
+ <span class="cart-price">
85
+ <span class="price"><?php echo $currencySymbol.$product_price; ?></span>
86
+ </span>
87
+ </td>
88
+ <td class="a-center">
89
+ <input maxlength="12" class="input-text qty" title="Qty" size="4" value="<?php echo $prIdQtyArr['quantity']; ?>" name="sellform[<?php echo $prId; ?>][qty]">
90
+ </td>
91
+ <td class="a-right">
92
+ <span class="cart-price">
93
+ <span class="price"><?php echo $currencySymbol.$product_price*($prIdQtyArr['quantity']); ?></span>
94
+ </span>
95
+ </td>
96
+ <td class="a-center last">
97
+ <a class="btn-remove btn-remove2" title="Remove item" href="<?php echo $sellerUrl."index/rmvfromcart/ss/$prId"; ?>">Remove item</a>
98
+ </td>
99
+ </tr>
100
+ <?php } ?>
101
+ </tbody>
102
+ </table>
103
+ </fieldset>
104
+ </form>
105
+ <div class="cart-collaterals">
106
+ <div class="totals">
107
+ <table id="shopping-cart-totals-table">
108
+ <colgroup>
109
+ <col>
110
+ <col width="1">
111
+ </colgroup>
112
+ <tfoot>
113
+ <tr>
114
+ <td colspan="1" class="a-right" style=""><strong>Grand Total</strong></td>
115
+ <td class="a-right" style=""><strong><span class="price"><?php echo $currencySymbol.$totalPrice; ?></span></strong></td>
116
+ </tr>
117
+ </tfoot>
118
+ <tbody>
119
+ <tr>
120
+ <td colspan="1" class="a-right" style="">Subtotal</td>
121
+ <td class="a-right" style=""><span class="price"><?php echo $currencySymbol.$totalPrice; ?></span></td>
122
+ </tr>
123
+ </tbody>
124
+ </table>
125
+ <ul class="checkout-types">
126
+ <li>
127
+ <button onclick="window.location='<?php echo $sellerUrl."index/checkout/"; ?>';" class="button btn-proceed-checkout btn-checkout" title="Proceed to Checkout" type="button">
128
+ <span>
129
+ <span>Proceed to Checkout</span>
130
+ </span>
131
+ </button>
132
+ </li>
133
+ </ul>
134
+ </div>
135
+ </div>
136
+ </div>
137
+ </div>
138
+ <!-- Cart html -->
139
+ <?php
140
+ } else {
141
+ ?>
142
+ <div class="col-main">
143
+ <div class="cart">
144
+ <div class="page-title title-buttons">
145
+ <h1>Selling Cart</h1>
146
+ <ul class="checkout-types">
147
+ <li>
148
+ </li>
149
+ </ul>
150
+ </div>
151
+ <div>
152
+ Selling Cart is empty. <a href="<?php echo $sellerUrl."index/sellorders/"; ?>">Show Sell Orders...</a>
153
+ </div>
154
+ </div>
155
+ </div>
156
+ <?php
157
+ }
158
+ ?>
app/design/frontend/base/default/template/seller/sellorders.phtml ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $sellerUrl=$this->getUrl('seller');
3
+ $customerOrders=$this->customerOrders();
4
+ $currencySymbol=Mage::helper('seller')->getCurrencySymbol();
5
+ ?>
6
+ <div class="page-title title-buttons">
7
+ <h1>Sell Orders History</h1>
8
+ <ul class="checkout-types">
9
+ <li>
10
+ </li>
11
+ </ul>
12
+ </div>
13
+
14
+ <?php
15
+ if(count($customerOrders)>0){
16
+ foreach($customerOrders as $ordersArr){
17
+ ?>
18
+ <div class="block block-cart">
19
+ <div class="block-title">
20
+ <strong><span>Order Number: <?php echo $ordersArr['order_id']; ?></span></strong>
21
+ </div>
22
+ <div class="block-content">
23
+ <p class="block-subtitle">
24
+ Order Date and Time: <span class="product-name"><?php echo date("j F Y , h:m a",Mage::helper('seller')->getTimestamp($ordersArr['created_time'])); ?></span>&nbsp;&nbsp;&nbsp;
25
+ Payment Status: <span class="product-name"><?php echo $this->getPaymentStatus($ordersArr['payment_status']); ?></span>&nbsp;&nbsp;&nbsp;
26
+ Order Status: <span class="product-name"><?php echo $this->getOrderStatus($ordersArr['order_status']); ?></span>&nbsp;&nbsp;&nbsp;
27
+ [ <a href="javascript:dispPrds(<?php echo $ordersArr['order_id']; ?>);" id="prdsLink<?php echo $ordersArr['order_id']; ?>">Show Details</a> ]
28
+ </p>
29
+ </div>
30
+
31
+ <div class="block-content" id="prdsBlock<?php echo $ordersArr['order_id']; ?>" style="display:none;">
32
+ <?php
33
+ $total=0;
34
+ foreach($this->orderDetails($ordersArr['order_id']) as $prdDtlsArr){
35
+ $total=$total+$prdDtlsArr['subtotal'];
36
+ //$_product = Mage::getModel('catalog/product')->load($prId);
37
+ ?>
38
+ <ol class="mini-products-list">
39
+ <li class="item last odd">
40
+ <!--<a class="product-image" title="<?php //echo $_product->getName(); ?>" href="<?php //echo $_product->getProductUrl(); ?>">
41
+ <img width="50" height="50" alt="<?php //echo $_product->getName(); ?>" src="<?php //echo $this->helper('catalog/image')->init($_product, 'thumbnail'); ?>">
42
+ </a>-->
43
+ <div class="product-details">
44
+ <p class="product-name"><?php echo $prdDtlsArr['name']; ?></p>
45
+ <strong><?php echo $prdDtlsArr['qty']; ?></strong> x <span class="price"><?php echo $currencySymbol.$prdDtlsArr['price']; ?></span>
46
+ </div>
47
+ </li>
48
+ </ol>
49
+ <?php
50
+ }
51
+ ?>
52
+ <p class="block-subtitle">Grand Total: <?php echo $currencySymbol.$total; ?></p>
53
+ <p class="block-subtitle"></p>
54
+ </div>
55
+ </div>
56
+ <?php
57
+ }
58
+ } else {
59
+ echo "No Sell Orders";
60
+ }
61
+ ?>
62
+ <script type="text/javascript">
63
+ function dispPrds(id){
64
+ var prdObj=document.getElementById("prdsBlock"+id);
65
+ var linkObj=document.getElementById("prdsLink"+id);
66
+ if(prdObj.style.display=='none'){
67
+ prdObj.style.display='block';
68
+ linkObj.innerHTML='Hide Details';
69
+ } else {
70
+ prdObj.style.display='none';
71
+ linkObj.innerHTML='Show Details';
72
+ }
73
+ }
74
+ </script>
app/design/frontend/base/default/template/seller/submitseller.phtml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="col-main">
2
+ <div class="cart">
3
+ <div class="page-title title-buttons">
4
+ <h1>Seller Checkout Status</h1>
5
+ <ul class="checkout-types">
6
+ <li>
7
+ </li>
8
+ </ul>
9
+ </div>
10
+ <div>
11
+ Seller checkout is successful. <a href="<?php echo $this->getUrl("seller/index/sellorders/"); ?>">Show Sell Orders</a>
12
+ </div>
13
+ </div>
14
+ </div>
app/etc/modules/Ispg_Seller.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ispg_Seller>
5
+ <active>true</active>
6
+ <!--<codePool>local</codePool>-->
7
+ <codePool>community</codePool>
8
+ </Ispg_Seller>
9
+ </modules>
10
+ </config>
package.xml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Ispg_Seller</name>
4
+ <version>0.0.0.1</version>
5
+ <stability>stable</stability>
6
+ <license>OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Seller extension for Magento.</summary>
10
+ <description>It provides a feature for the 'buyer' to re-sell the product already bought. It has a 'Seller Cart','Checkout' pages just like for a buyer, but in this case you are selling back the product. By going to the (System-&gt;Configuration) section , the 'Price-reduction' percentage for the re-sold product can be setup.&#xD;
11
+ You can use the 'Sell' button in product details page to add products to the cart.&#xD;
12
+ The admin panel has a grid to view the seller orders (Seller-&gt;Manage Orders), and payment,order status of each can be managed.</description>
13
+ <notes>This extension has been tested.</notes>
14
+ <authors><author><name>Rahul K</name><user>krahul_ispg</user><email>rahul_kalyanpur@ispg.in</email></author></authors>
15
+ <date>2012-12-03</date>
16
+ <time>07:33:10</time>
17
+ <contents><target name="magecommunity"><dir name="Ispg"><dir name="Seller"><dir name="Block"><dir name="Adminhtml"><dir name="Seller"><dir name="Edit"><file name="Form.php" hash="5becd3d69e8afe813a9e85202ac1e000"/><dir name="Tab"><file name="Bankinfo.php" hash="977574afd36b18a2f1669d74ccc89431"/><file name="Form.php" hash="2ea45f68933ba3a4ea76ecde3c2a728e"/><file name="Products.php" hash="2490b4dc35ce3a57186be16a839e72cd"/></dir><file name="Tabs.php" hash="77715268bcb1ac776e8916d1a9bf116e"/></dir><file name="Edit.php" hash="31ff617771fcf809ed5ffe4a960b8760"/><file name="Grid.php" hash="32a6695220d1b5c70c2aa76318fb8f38"/></dir><file name="Seller.php" hash="e6c01f4c3d34555efa2445a42e6acc94"/></dir><file name="Button.php" hash="b103994a6ca17e7086b0bb47864840ec"/><file name="Checkout.php" hash="274a59cb31c3956ce7b997cf873512ac"/><file name="Seller.php" hash="833081a31da80c4dbcb85df877187af6"/><file name="Sellorders.php" hash="a0e9bd82faf29d84473830771058c850"/><file name="Submitseller.php" hash="9c6606a65deb1d67fef7fcff344aa875"/></dir><dir name="Helper"><file name="Data.php" hash="f4f1e502f25c7a98056e39d4b45fdce3"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Seller"><file name="Collection.php" hash="48506d035f4df62c886b34548529bb91"/></dir><file name="Seller.php" hash="1749cfcad143fdc39d58c78926b7ac03"/><dir name="Sellerbank"><file name="Collection.php" hash="ca128ee3f2ec2dec8cf5e77fc8f829a9"/></dir><file name="Sellerbank.php" hash="42b8a2af841a7999c4186d1a5d64ef1e"/><dir name="Sellerproducts"><file name="Collection.php" hash="54bcbb97b8a17e1b271b662bd22a294a"/></dir><file name="Sellerproducts.php" hash="7313ba1d2da16fff813c0d3a8eaa7deb"/></dir><file name="Seller.php" hash="b15316818dd741272462a383a2b7c44a"/><file name="Sellerbank.php" hash="0644b95d34082de58201788933d2bea1"/><file name="Sellerproducts.php" hash="a7e2a4ad1fc02307e5e318cb4f41b63d"/><file name="Status.php" hash="6395e0406cae3e3e4c4743e79dd3dc8c"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SellerController.php" hash="4b1425d2f99c51695ec20a70a101ad8e"/></dir><file name="IndexController.php" hash="849e3e55ab7d7fc290a5a4753e8bcc08"/></dir><dir name="etc"><file name="adminhtml.xml" hash="20c83511e908447bab585caddbfdfbb6"/><file name="config.xml" hash="467aba1d3fa4b8b994c6f223f4fdf8e6"/><file name="system.xml" hash="a5b12881b2e3e15384ea8fb0b9e66f25"/></dir><dir name="sql"><dir name="seller_setup"><file name="mysql4-install-0.1.0.php" hash="de81cb5123335afbd10c5e0eca051c1a"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="seller.xml" hash="b125963cfc76d69f6b50335082a3e52d"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="seller.xml" hash="8986bf2c0826866f31336bbd13934685"/></dir><dir name="template"><dir name="seller"><file name="checkout.phtml" hash="2ea1d8241518bacb259b12168771899f"/><file name="sellbtn.phtml" hash="9842fcb3b7e6d04bed26625e1ecc270d"/><file name="seller.phtml" hash="47ca633ad4b35916a1aeefb0720f7cd2"/><file name="sellorders.phtml" hash="615b11d4559ef2d62987a328654d592b"/><file name="submitseller.phtml" hash="aa1521a2a7ed60d22fbd22617a0435b8"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ispg_Seller.xml" hash="9cb31f016ed053b8e8ff56b57189cad1"/></dir></target></contents>
18
+ <compatible/>
19
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
20
+ </package>