Magazento_PriceProposal - Version 1.0.0

Version Notes

1.0.0

Download this release

Release Info

Developer Magento Core Team
Extension Magazento_PriceProposal
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (44) hide show
  1. app/code/community/Magazento/Priceproposal/Block/Admin/Item.php +22 -0
  2. app/code/community/Magazento/Priceproposal/Block/Admin/Item/Edit.php +58 -0
  3. app/code/community/Magazento/Priceproposal/Block/Admin/Item/Edit/Form.php +52 -0
  4. app/code/community/Magazento/Priceproposal/Block/Admin/Item/Edit/Tab/Form.php +110 -0
  5. app/code/community/Magazento/Priceproposal/Block/Admin/Item/Edit/Tab/Other.php +34 -0
  6. app/code/community/Magazento/Priceproposal/Block/Admin/Item/Edit/Tabs.php +35 -0
  7. app/code/community/Magazento/Priceproposal/Block/Admin/Item/Grid.php +170 -0
  8. app/code/community/Magazento/Priceproposal/Block/Admin/Item/Grid/Renderer/Action.php +32 -0
  9. app/code/community/Magazento/Priceproposal/Block/Developer.php +65 -0
  10. app/code/community/Magazento/Priceproposal/Block/Request.php +13 -0
  11. app/code/community/Magazento/Priceproposal/Helper/Data.php +85 -0
  12. app/code/community/Magazento/Priceproposal/Model/Data.php +41 -0
  13. app/code/community/Magazento/Priceproposal/Model/Item.php +49 -0
  14. app/code/community/Magazento/Priceproposal/Model/Mysql4/Item.php +71 -0
  15. app/code/community/Magazento/Priceproposal/Model/Mysql4/Item/Collection.php +41 -0
  16. app/code/community/Magazento/Priceproposal/Model/Wysiwyg/Config.php +26 -0
  17. app/code/community/Magazento/Priceproposal/controllers/Admin/ItemController.php +171 -0
  18. app/code/community/Magazento/Priceproposal/controllers/IndexController.php +23 -0
  19. app/code/community/Magazento/Priceproposal/etc/config.xml +158 -0
  20. app/code/community/Magazento/Priceproposal/etc/system.xml +55 -0
  21. app/code/community/Magazento/Priceproposal/sql/priceproposal_setup/mysql4-install-1.0.0.php +50 -0
  22. app/design/frontend/default/default/layout/magazento_priceproposal.xml +20 -0
  23. app/design/frontend/default/default/template/magazento/priceproposal/data.phtml +51 -0
  24. app/etc/modules/Magazento_Priceproposal.xml +9 -0
  25. app/locale/en_US/Magazento_Priceproposal.csv +1 -0
  26. package.xml +20 -0
  27. skin/frontend/default/default/magazento/priceproposal/colorbox.css +82 -0
  28. skin/frontend/default/default/magazento/priceproposal/help_desk.png +0 -0
  29. skin/frontend/default/default/magazento/priceproposal/images/border.png +0 -0
  30. skin/frontend/default/default/magazento/priceproposal/images/controls.png +0 -0
  31. skin/frontend/default/default/magazento/priceproposal/images/ie6/borderBottomCenter.png +0 -0
  32. skin/frontend/default/default/magazento/priceproposal/images/ie6/borderBottomLeft.png +0 -0
  33. skin/frontend/default/default/magazento/priceproposal/images/ie6/borderBottomRight.png +0 -0
  34. skin/frontend/default/default/magazento/priceproposal/images/ie6/borderMiddleLeft.png +0 -0
  35. skin/frontend/default/default/magazento/priceproposal/images/ie6/borderMiddleRight.png +0 -0
  36. skin/frontend/default/default/magazento/priceproposal/images/ie6/borderTopCenter.png +0 -0
  37. skin/frontend/default/default/magazento/priceproposal/images/ie6/borderTopLeft.png +0 -0
  38. skin/frontend/default/default/magazento/priceproposal/images/ie6/borderTopRight.png +0 -0
  39. skin/frontend/default/default/magazento/priceproposal/images/loading.gif +0 -0
  40. skin/frontend/default/default/magazento/priceproposal/images/loading_background.png +0 -0
  41. skin/frontend/default/default/magazento/priceproposal/images/overlay.png +0 -0
  42. skin/frontend/default/default/magazento/priceproposal/jquery.colorbox.js +815 -0
  43. skin/frontend/default/default/magazento/priceproposal/promo.jpg +0 -0
  44. skin/frontend/default/default/magazento/priceproposal/style.css +48 -0
app/code/community/Magazento/Priceproposal/Block/Admin/Item.php ADDED
@@ -0,0 +1,22 @@
1
+ <?php
2
+ /*
3
+ * Created on May 3, 2011
4
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
5
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
6
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
7
+ */
8
+ ?>
9
+ <?php
10
+
11
+ class Magazento_Priceproposal_Block_Admin_Item extends Mage_Adminhtml_Block_Widget_Grid_Container
12
+ {
13
+
14
+ public function __construct()
15
+ {
16
+ $this->_controller = 'admin_item';
17
+ $this->_blockGroup = 'priceproposal';
18
+ $this->_headerText = Mage::helper('priceproposal')->__('Priceproposal grid');
19
+ $this->setTemplate('widget/grid/container.phtml');
20
+ }
21
+
22
+ }
app/code/community/Magazento/Priceproposal/Block/Admin/Item/Edit.php ADDED
@@ -0,0 +1,58 @@
1
+ <?php
2
+ /*
3
+ * Created on May 3, 2011
4
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
5
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
6
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
7
+ */
8
+ ?>
9
+ <?php
10
+
11
+ class Magazento_Priceproposal_Block_Admin_Item_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
12
+ {
13
+
14
+ public function __construct()
15
+ {
16
+ $this->_objectId = 'item_id';
17
+ $this->_controller = 'admin_item';
18
+ $this->_blockGroup = 'priceproposal';
19
+
20
+ parent::__construct();
21
+
22
+ $this->_updateButton('save', 'label', Mage::helper('priceproposal')->__('Save Item'));
23
+ $this->_updateButton('delete', 'label', Mage::helper('priceproposal')->__('Delete Item'));
24
+
25
+ $this->_addButton('saveandcontinue', array(
26
+ 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
27
+ 'onclick' => 'saveAndContinueEdit()',
28
+ 'class' => 'save',
29
+ ), -100);
30
+
31
+
32
+ $this->_formScripts[] = "
33
+ function toggleEditor() {
34
+ if (tinyMCE.getInstanceById('block_content') == null) {
35
+ tinyMCE.execCommand('mceAddControl', false, 'block_content');
36
+ } else {
37
+ tinyMCE.execCommand('mceRemoveControl', false, 'block_content');
38
+ }
39
+ }
40
+
41
+ function saveAndContinueEdit(){
42
+ editForm.submit($('edit_form').action+'back/edit/');
43
+ }
44
+
45
+ ";
46
+ }
47
+
48
+ public function getHeaderText()
49
+ {
50
+ if (Mage::registry('priceproposal_item')->getId()) {
51
+ return Mage::helper('priceproposal')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('priceproposal_item')->getTitle()));
52
+ }
53
+ else {
54
+ return Mage::helper('priceproposal')->__('New Item');
55
+ }
56
+ }
57
+
58
+ }
app/code/community/Magazento/Priceproposal/Block/Admin/Item/Edit/Form.php ADDED
@@ -0,0 +1,52 @@
1
+ <?php
2
+ /*
3
+ * Created on May 3, 2011
4
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
5
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
6
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
7
+ */
8
+ ?>
9
+ <?php
10
+
11
+ class Magazento_Priceproposal_Block_Admin_Item_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
12
+ {
13
+
14
+
15
+ protected function _prepareLayout() {
16
+ parent::_prepareLayout();
17
+ if (Mage::helper('priceproposal')->versionUseWysiwig()) {
18
+ if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
19
+ $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
20
+
21
+ $this->getLayout()->getBlock('head')->addJs('mage/adminhtml/variables.js');
22
+ $this->getLayout()->getBlock('head')->addJs('mage/adminhtml/wysiwyg/widget.js');
23
+ $this->getLayout()->getBlock('head')->addJs('lib/flex.js');
24
+ $this->getLayout()->getBlock('head')->addJs('lib/FABridge.js');
25
+ $this->getLayout()->getBlock('head')->addJs('mage/adminhtml/flexuploader.js');
26
+ $this->getLayout()->getBlock('head')->addJs('mage/adminhtml/browser.js');
27
+ $this->getLayout()->getBlock('head')->addJs('extjs/ext-tree.js');
28
+ $this->getLayout()->getBlock('head')->addJs('extjs/ext-tree-checkbox.js');
29
+
30
+ $this->getLayout()->getBlock('head')->addItem('js_css', 'extjs/resources/css/ext-all.css');
31
+ $this->getLayout()->getBlock('head')->addItem('js_css', 'extjs/resources/css/ytheme-magento.css');
32
+ $this->getLayout()->getBlock('head')->addItem('js_css', 'prototype/windows/themes/default.css');
33
+ $this->getLayout()->getBlock('head')->addItem('js_css', 'prototype/windows/themes/magento.css');
34
+ }
35
+ }
36
+ }
37
+
38
+ protected function _prepareForm()
39
+ {
40
+ $form = new Varien_Data_Form(array(
41
+ 'id' => 'edit_form',
42
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
43
+ 'method' => 'post',
44
+ 'enctype' => 'multipart/form-data'
45
+ )
46
+ );
47
+
48
+ $form->setUseContainer(true);
49
+ $this->setForm($form);
50
+ return parent::_prepareForm();
51
+ }
52
+ }
app/code/community/Magazento/Priceproposal/Block/Admin/Item/Edit/Tab/Form.php ADDED
@@ -0,0 +1,110 @@
1
+ <?php
2
+ /*
3
+ * Created on May 3, 2011
4
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
5
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
6
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
7
+ */
8
+ ?>
9
+ <?php
10
+
11
+ class Magazento_Priceproposal_Block_Admin_Item_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
12
+
13
+
14
+ protected function _prepareForm() {
15
+ $model = Mage::registry('priceproposal_item');
16
+ $form = new Varien_Data_Form(array('id' => 'edit_form_item', 'action' => $this->getData('action'), 'method' => 'post'));
17
+ $form->setHtmlIdPrefix('item_');
18
+ $fieldset = $form->addFieldset('base_fieldset', array('legend' => Mage::helper('priceproposal')->__('General Information'), 'class' => 'fieldset-wide'));
19
+ if ($model->getItemId()) {
20
+ $fieldset->addField('item_id', 'hidden', array(
21
+ 'name' => 'item_id',
22
+ ));
23
+ }
24
+
25
+ $fieldset->addField('title', 'text', array(
26
+ 'name' => 'title',
27
+ 'label' => Mage::helper('priceproposal')->__('Title'),
28
+ 'title' => Mage::helper('priceproposal')->__('Title'),
29
+ 'required' => true,
30
+ ));
31
+ $fieldset->addField('url', 'text', array(
32
+ 'name' => 'url',
33
+ 'label' => Mage::helper('priceproposal')->__('Url'),
34
+ 'title' => Mage::helper('priceproposal')->__('Url'),
35
+ 'required' => false,
36
+ ));
37
+ $fieldset->addField('image', 'text', array(
38
+ 'name' => 'image',
39
+ 'label' => Mage::helper('priceproposal')->__('Image'),
40
+ 'title' => Mage::helper('priceproposal')->__('Image'),
41
+ 'required' => false,
42
+ ));
43
+
44
+ $fieldset->addField('position', 'select', array(
45
+ 'name' => 'position',
46
+ 'label' => Mage::helper('priceproposal')->__('Position'),
47
+ 'title' => Mage::helper('priceproposal')->__('Position'),
48
+ 'required' => true,
49
+ 'options' => Mage::helper('priceproposal')->numberArray(20,Mage::helper('priceproposal')->__('')),
50
+ ));
51
+ if (!Mage::app()->isSingleStoreMode()) {
52
+ $fieldset->addField('store_id', 'multiselect', array(
53
+ 'name' => 'stores[]',
54
+ 'label' => Mage::helper('priceproposal')->__('Store View'),
55
+ 'title' => Mage::helper('priceproposal')->__('Store View'),
56
+ 'required' => true,
57
+ 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
58
+ 'style' => 'height:150px',
59
+ ));
60
+ } else {
61
+ $fieldset->addField('store_id', 'hidden', array(
62
+ 'name' => 'stores[]',
63
+ 'value' => Mage::app()->getStore(true)->getId()
64
+ ));
65
+ $model->setStoreId(Mage::app()->getStore(true)->getId());
66
+ }
67
+
68
+
69
+ $fieldset->addField('is_active', 'select', array(
70
+ 'label' => Mage::helper('priceproposal')->__('Status'),
71
+ 'title' => Mage::helper('priceproposal')->__('Status'),
72
+ 'name' => 'is_active',
73
+ 'required' => true,
74
+ 'options' => array(
75
+ '1' => Mage::helper('priceproposal')->__('Enabled'),
76
+ '0' => Mage::helper('priceproposal')->__('Disabled'),
77
+ ),
78
+ ));
79
+
80
+ $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
81
+ $fieldset->addField('from_time', 'date', array(
82
+ 'name' => 'from_time',
83
+ 'time' => true,
84
+ 'label' => Mage::helper('priceproposal')->__('From Time'),
85
+ 'title' => Mage::helper('priceproposal')->__('From Time'),
86
+ 'image' => $this->getSkinUrl('images/grid-cal.gif'),
87
+ 'input_format' => Varien_Date::DATETIME_INTERNAL_FORMAT,
88
+ 'format' => $dateFormatIso,
89
+ ));
90
+
91
+ $fieldset->addField('to_time', 'date', array(
92
+ 'name' => 'to_time',
93
+ 'time' => true,
94
+ 'label' => Mage::helper('priceproposal')->__('To Time'),
95
+ 'title' => Mage::helper('priceproposal')->__('To Time'),
96
+ 'image' => $this->getSkinUrl('images/grid-cal.gif'),
97
+ 'input_format' => Varien_Date::DATETIME_INTERNAL_FORMAT,
98
+ 'format' => $dateFormatIso,
99
+ ));
100
+
101
+ // print_r($model->getData());
102
+ // exit();
103
+ // $form->setUseContainer(true);
104
+ $form->setValues($model->getData());
105
+ $this->setForm($form);
106
+
107
+ return parent::_prepareForm();
108
+ }
109
+
110
+ }
app/code/community/Magazento/Priceproposal/Block/Admin/Item/Edit/Tab/Other.php ADDED
@@ -0,0 +1,34 @@
1
+ <?php
2
+ /*
3
+ * Created on May 3, 2011
4
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
5
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
6
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
7
+ */
8
+ ?>
9
+ <?php
10
+ class Magazento_Priceproposal_Block_Admin_Item_Edit_Tab_Other extends Mage_Adminhtml_Block_Widget_Form
11
+ {
12
+ protected function _prepareForm()
13
+ {
14
+ $model = Mage::registry('priceproposal_item');
15
+ $form = new Varien_Data_Form();
16
+ $this->setForm($form);
17
+ $fieldset = $form->addFieldset('additional_form', array('legend'=>Mage::helper('priceproposal')->__('Additional information ')));
18
+
19
+
20
+
21
+ $fieldset->addField('samplefield', 'text', array(
22
+ 'name' => 'samplefield',
23
+ 'label' => Mage::helper('priceproposal')->__('Samplefield'),
24
+ 'title' => Mage::helper('priceproposal')->__('Samplefield'),
25
+ 'required' => false,
26
+ ));
27
+
28
+ // $form->setUseContainer(true);
29
+ $form->setValues($model->getData());
30
+ $this->setForm($form);
31
+
32
+ return parent::_prepareForm();
33
+ }
34
+ }
app/code/community/Magazento/Priceproposal/Block/Admin/Item/Edit/Tabs.php ADDED
@@ -0,0 +1,35 @@
1
+ <?php
2
+ /*
3
+ * Created on May 3, 2011
4
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
5
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
6
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
7
+ */
8
+ ?>
9
+ <?php
10
+
11
+ class Magazento_Priceproposal_Block_Admin_Item_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
12
+
13
+ public function __construct() {
14
+ parent::__construct();
15
+ $this->setId('priceproposal_tabs');
16
+ $this->setDestElementId('edit_form');
17
+ $this->setTitle(Mage::helper('priceproposal')->__('Item Information'));
18
+ }
19
+
20
+ protected function _beforeToHtml() {
21
+ $this->addTab('form_section_item', array(
22
+ 'label' => Mage::helper('priceproposal')->__('Item Information'),
23
+ 'title' => Mage::helper('priceproposal')->__('Item Information'),
24
+ 'content' => $this->getLayout()->createBlock('priceproposal/admin_item_edit_tab_form')->toHtml(),
25
+ ));
26
+ // $this->addTab('form_section_other', array(
27
+ // 'label' => Mage::helper('priceproposal')->__('Item Information additional'),
28
+ // 'title' => Mage::helper('priceproposal')->__('Item Information additional'),
29
+ // 'content' => $this->getLayout()->createBlock('priceproposal/admin_item_edit_tab_other')->toHtml(),
30
+ // ));
31
+
32
+ return parent::_beforeToHtml();
33
+ }
34
+
35
+ }
app/code/community/Magazento/Priceproposal/Block/Admin/Item/Grid.php ADDED
@@ -0,0 +1,170 @@
1
+ <?php
2
+
3
+ /*
4
+ * Created on May 3, 2011
5
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
6
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
7
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
8
+ */
9
+ ?>
10
+ <?php
11
+
12
+ class Magazento_Priceproposal_Block_Admin_Item_Grid extends Mage_Adminhtml_Block_Widget_Grid {
13
+
14
+ public function __construct() {
15
+ parent::__construct();
16
+ $this->setId('PriceproposalGrid');
17
+ $this->setDefaultSort('item_id');
18
+ $this->setDefaultDir('ASC');
19
+ }
20
+
21
+ protected function _prepareCollection() {
22
+ $collection = Mage::getModel('priceproposal/item')->getCollection();
23
+ $this->setCollection($collection);
24
+ return parent::_prepareCollection();
25
+ }
26
+
27
+ protected function _prepareColumns() {
28
+
29
+ $baseUrl = $this->getUrl();
30
+ $this->addColumn('item_id', array(
31
+ 'header' => Mage::helper('priceproposal')->__('ID'),
32
+ 'align' => 'left',
33
+ 'index' => 'item_id',
34
+ ));
35
+ // $this->addColumn('product_id', array(
36
+ // 'header' => Mage::helper('priceproposal')->__('Product ID'),
37
+ // 'align' => 'left',
38
+ // 'index' => 'product_id',
39
+ // ));
40
+ $this->addColumn('product_name', array(
41
+ 'header' => Mage::helper('priceproposal')->__('Product'),
42
+ 'align' => 'left',
43
+ 'index' => 'product_name',
44
+ ));
45
+
46
+ $this->addColumn('competitior_name', array(
47
+ 'header' => Mage::helper('priceproposal')->__('Name'),
48
+ 'align' => 'left',
49
+ 'index' => 'competitior_name',
50
+ ));
51
+
52
+ $this->addColumn('competitior_price', array(
53
+ 'header' => Mage::helper('priceproposal')->__('Price'),
54
+ 'align' => 'left',
55
+ 'index' => 'competitior_price',
56
+ ));
57
+ $this->addColumn('competitior_link', array(
58
+ 'header' => Mage::helper('priceproposal')->__('URL'),
59
+ 'align' => 'left',
60
+ 'index' => 'competitior_link',
61
+ ));
62
+ $this->addColumn('user_email', array(
63
+ 'header' => Mage::helper('priceproposal')->__('Email'),
64
+ 'align' => 'left',
65
+ 'index' => 'user_email',
66
+ ));
67
+ $this->addColumn('user_phone', array(
68
+ 'header' => Mage::helper('priceproposal')->__('Phone'),
69
+ 'align' => 'left',
70
+ 'index' => 'user_phone',
71
+ ));
72
+ $this->addColumn('user_skype', array(
73
+ 'header' => Mage::helper('priceproposal')->__('Skype'),
74
+ 'align' => 'left',
75
+ 'index' => 'user_skype',
76
+ ));
77
+ $this->addColumn('comment', array(
78
+ 'header' => Mage::helper('priceproposal')->__('Comment'),
79
+ 'align' => 'left',
80
+ 'index' => 'comment',
81
+ ));
82
+ $this->addColumn('status', array(
83
+ 'header' => Mage::helper('priceproposal')->__('Status'),
84
+ 'index' => 'status',
85
+ 'type' => 'options',
86
+ 'options' => array(
87
+ 0 => Mage::helper('priceproposal')->__('New'),
88
+ 1 => Mage::helper('priceproposal')->__('Seen'),
89
+ ),
90
+ ));
91
+
92
+ if (!Mage::app()->isSingleStoreMode()) {
93
+ $this->addColumn('store_id', array(
94
+ 'header' => Mage::helper('priceproposal')->__('Store View'),
95
+ 'index' => 'store_id',
96
+ 'type' => 'store',
97
+ 'store_all' => true,
98
+ 'store_view' => true,
99
+ 'sortable' => false,
100
+ 'filter_condition_callback'
101
+ => array($this, '_filterStoreCondition'),
102
+ ));
103
+ }
104
+
105
+ $this->addColumn('from_time', array(
106
+ 'header' => Mage::helper('priceproposal')->__('Time'),
107
+ 'index' => 'from_time',
108
+ 'type' => 'datetime',
109
+ ));
110
+
111
+ $this->addColumn('action',
112
+ array(
113
+ 'header' => Mage::helper('priceproposal')->__('Action'),
114
+ 'index' => 'item_id',
115
+ 'sortable' => false,
116
+ 'filter' => false,
117
+ 'no_link' => true,
118
+ 'width' => '100px',
119
+ 'renderer' => 'priceproposal/admin_item_grid_renderer_action'
120
+ ));
121
+ $this->addExportType('*/*/exportCsv', Mage::helper('priceproposal')->__('CSV'));
122
+ $this->addExportType('*/*/exportXml', Mage::helper('priceproposal')->__('XML'));
123
+ return parent::_prepareColumns();
124
+ }
125
+
126
+ protected function _afterLoadCollection() {
127
+ $this->getCollection()->walk('afterLoad');
128
+ parent::_afterLoadCollection();
129
+ }
130
+
131
+ protected function _filterStoreCondition($collection, $column) {
132
+ if (!$value = $column->getFilter()->getValue()) {
133
+ return;
134
+ }
135
+ $this->getCollection()->addStoreFilter($value);
136
+ }
137
+
138
+ protected function _prepareMassaction() {
139
+ $this->setMassactionIdField('item_id');
140
+ $this->getMassactionBlock()->setFormFieldName('massaction');
141
+ $this->getMassactionBlock()->addItem('delete', array(
142
+ 'label' => Mage::helper('priceproposal')->__('Delete'),
143
+ 'url' => $this->getUrl('*/*/massDelete'),
144
+ 'confirm' => Mage::helper('priceproposal')->__('Are you sure?')
145
+ ));
146
+
147
+ $this->getMassactionBlock()->addItem('status', array(
148
+ 'label' => Mage::helper('priceproposal')->__('Change status'),
149
+ 'url' => $this->getUrl('*/*/massStatus', array('_current' => true)),
150
+ 'additional' => array(
151
+ 'visibility' => array(
152
+ 'name' => 'status',
153
+ 'type' => 'select',
154
+ 'class' => 'required-entry',
155
+ 'label' => Mage::helper('priceproposal')->__('Status'),
156
+ 'values' => array(
157
+ 0 => Mage::helper('priceproposal')->__('New'),
158
+ 1 => Mage::helper('priceproposal')->__('Seen'),
159
+ ),
160
+ )
161
+ )
162
+ ));
163
+ return $this;
164
+ }
165
+
166
+ // public function getRowUrl($row) {
167
+ // return $this->getUrl('*/*/edit', array('item_id' => $row->getId()));
168
+ // }
169
+
170
+ }
app/code/community/Magazento/Priceproposal/Block/Admin/Item/Grid/Renderer/Action.php ADDED
@@ -0,0 +1,32 @@
1
+ <?php
2
+ /*
3
+ * Created on May 3, 2011
4
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
5
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
6
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
7
+ */
8
+ ?>
9
+ <?php
10
+
11
+
12
+ class Magazento_Priceproposal_Block_Admin_Item_Grid_Renderer_Action extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action
13
+ {
14
+ public function render(Varien_Object $row)
15
+ {
16
+
17
+ $actions[] = array(
18
+ 'url' => $this->getUrl('*/*/seen', array('item_id' => $row->getId())),
19
+ 'caption' => Mage::helper('priceproposal')->__('Seen')
20
+ );
21
+
22
+ $actions[] = array(
23
+ 'url' => $this->getUrl('*/*/delete', array('item_id' => $row->getId())),
24
+ 'caption' => Mage::helper('priceproposal')->__('Delete'),
25
+ 'confirm' => Mage::helper('priceproposal')->__('Are you sure you want to delete this item ?')
26
+ );
27
+
28
+ $this->getColumn()->setActions($actions);
29
+
30
+ return parent::render($row);
31
+ }
32
+ }
app/code/community/Magazento/Priceproposal/Block/Developer.php ADDED
@@ -0,0 +1,65 @@
1
+ <?php
2
+
3
+ class Magazento_Priceproposal_Block_Developer extends Mage_Adminhtml_Block_System_Config_Form_Fieldset {
4
+
5
+ public function render(Varien_Data_Form_Element_Abstract $element) {
6
+ $content = '<p></p>';
7
+ $content.= '<style>';
8
+ $content.= '.magazento {
9
+ background:#FAFAFA;
10
+ border: 1px solid #CCCCCC;
11
+ margin-bottom: 10px;
12
+ padding: 10px;
13
+ height:auto;
14
+
15
+ }
16
+ .magazento h3 {
17
+ color: #EA7601;
18
+ }
19
+ .contact-type {
20
+ color: #EA7601;
21
+ font-weight:bold;
22
+ }
23
+ .magazento img {
24
+ border: 1px solid #CCCCCC;
25
+ float:left;
26
+ height:235px;
27
+ }
28
+ .magazento .info {
29
+ border: 1px solid #CCCCCC;
30
+ background:#E7EFEF;
31
+ padding: 5px 10px 0 5px;
32
+ margin-left:210px;
33
+ height:230px;
34
+ }
35
+ ';
36
+ $content.= '</style>';
37
+
38
+
39
+ $content.= '<div class="magazento">';
40
+ $content.= '<a href="http://www.magazento.com/" target="_blank"><img src="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN).'frontend/default/default/magazento/priceproposal/promo.jpg" alt="www.magazento.com" /></a>';
41
+ $content.= '<div class="info">';
42
+ $content.= '<h3>Magento extensions</h3>';
43
+ $content.= '<p><a href="http://www.magazento.com/" target="_blank">www.magazento.com</a> - experts are specializing in custom extension development for the world\'s fastest growing eCommerce platform - Magento. <br/>';
44
+ $content.= 'All extensions are designed for the Magento CMS archetecture, using native libraries and only the most efficient approaches to development.<br/>';
45
+ $content.= 'If you need Magento development or have a concept for an extension you\'d like developed for the Magento CMS platform, please contact us.</br></p>';
46
+ $content.= '--------------------------------------------------------<br>';
47
+ $content.= '<span class="contact-type">Company website:</span> <a href="http://www.magazento.com/" target="_blank">www.magazento.com</a> <br/>';
48
+ $content.= '<span class="contact-type">E-mail:</span> magazento@gmail.com <br/>';
49
+ $content.= '<span class="contact-type">Skype:</span> volgodark <br/>';
50
+ $content.= '<span class="contact-type">Phone:</span> +7 909389 2222 <br/>';
51
+ $content.= '<span class="contact-type">Magento:</span> <a href="http://www.magentocommerce.com/magento-connect/developer/Magazento" target="_blank">visit</a> <br/>';
52
+ $content.= '<span class="contact-type">Facebook:</span> <a href="http://www.facebook.com/ivan.proskuryakov" target="_blank">visit</a> <br/>';
53
+ // $content.= '<span class="contact-type">LinkedIn:</span> <a href="http://www.linkedin.com/pub/ivan-proskuryakov/31/200/316" target="_blank">visit</a> <br/>';
54
+
55
+ $content.= '</div>';
56
+
57
+ $content.= '</div>';
58
+
59
+ return $content;
60
+
61
+
62
+ }
63
+
64
+
65
+ }
app/code/community/Magazento/Priceproposal/Block/Request.php ADDED
@@ -0,0 +1,13 @@
1
+ <?php
2
+ /*
3
+ * Created on May 3, 2011
4
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
5
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
6
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
7
+ */
8
+ ?>
9
+
10
+ <?php
11
+ class Magazento_Priceproposal_Block_Request extends Mage_Core_Block_Template {
12
+
13
+ }
app/code/community/Magazento/Priceproposal/Helper/Data.php ADDED
@@ -0,0 +1,85 @@
1
+ <?php
2
+ /*
3
+ * Created on May 3, 2011
4
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
5
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
6
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
7
+ */
8
+ ?>
9
+ <?php class Magazento_Priceproposal_Helper_Data extends Mage_Core_Helper_Abstract {
10
+
11
+ public function formdata() {
12
+ $html = '
13
+ <div class="form-add-proposal" >
14
+ <form id="review-form" method="post" >
15
+ <fieldset class="proposal">
16
+ <ul class="form-list">
17
+ <!-- -->
18
+ <li>
19
+ <div class="field">
20
+ <label class="required" for="competitor_name"><em>*</em>Competitor name</label>
21
+ <div class="input-box">
22
+ <input type="text" value="" class="input-text" id="competitor_name" name="competitor_name">
23
+ </div>
24
+ </div>
25
+ <div class="field">
26
+ <label for="user_email">Your e-mail</label>
27
+ <div class="input-box">
28
+ <input type="text" value="" class="input-text" id="user_email" name="user_email">
29
+ </div>
30
+ </div>
31
+ </li>
32
+ <!-- -->
33
+ <li>
34
+ <div class="field">
35
+ <label class="required" for="competitor_price"><em>*</em>Product price</label>
36
+ <div class="input-box">
37
+ <input type="text" value="" class="input-text" id="competitor_price" name="competitor_price">
38
+ </div>
39
+ </div>
40
+ <div class="field">
41
+ <label for="user_phone">Your phone</label>
42
+ <div class="input-box">
43
+ <input type="text" value="" class="input-text" id="user_phone" name="user_phone">
44
+ </div>
45
+ </div>
46
+ </li>
47
+ <!-- -->
48
+ <li>
49
+ <div class="field">
50
+ <label class="required" for="competitor_url"><em>*</em>Product url</label>
51
+ <div class="input-box">
52
+ <input type="text" value="" class="input-text" id="competitor_url" name="competitor_url">
53
+ </div>
54
+ </div>
55
+ <div class="field">
56
+ <label for="user_skype">Your skype</label>
57
+ <div class="input-box">
58
+ <input type="text" value="" class="input-text" id="user_skype" name="user_skype">
59
+ </div>
60
+ </div>
61
+ </li>
62
+ <li>
63
+ <label for="comment">Your comment</label>
64
+ <div class="input-box">
65
+ <textarea class="required-entry" rows="3" cols="5" id="review_field" name="comment"></textarea>
66
+ </div>
67
+ </li>
68
+ </ul>
69
+ </fieldset>
70
+ <div class="proposal-information"> &nbsp; </div>
71
+ <div class="buttons-set">
72
+
73
+ <a href="javascript:submitForm();" class="proposal-btn" > Submit </a>
74
+
75
+ </div>
76
+ </form>
77
+ </div>
78
+
79
+ ';
80
+ return $html;
81
+ }
82
+
83
+
84
+
85
+ }
app/code/community/Magazento/Priceproposal/Model/Data.php ADDED
@@ -0,0 +1,41 @@
1
+ <?php
2
+ /*
3
+ * Created on May 3, 2011
4
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
5
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
6
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
7
+ */
8
+ ?>
9
+ <?php
10
+ Class Magazento_Priceproposal_Model_Data {
11
+
12
+ protected function getItemModel() {
13
+ return Mage::getModel('priceproposal/item');
14
+ }
15
+
16
+ protected function getItemCollection() {
17
+ $storeId = Mage::app()->getStore()->getId();
18
+ $collection = $this->getItemModel()->getCollection();
19
+ $collection->addFilter('is_active', 1);
20
+ $collection->addStoreFilter($storeId);
21
+ $collection->addOrder('position', 'ASC');
22
+
23
+ $ext = 'priceproposal';
24
+ $configserial = $ext.'/licence/serial';
25
+ $configlicence= $ext.'/licence/email';
26
+ $salt = 'magazento.com';
27
+ $serialmd5 = Mage::getStoreConfig($configserial);
28
+ $email = Mage::getStoreConfig($configlicence);
29
+ $emailmd5 = md5(md5($email.'.'.$ext.'.'.$salt));
30
+ $emailmd5 = mb_substr($emailmd5,2,24);
31
+ if ($emailmd5 != $serialmd5) {
32
+ Mage::getSingleton('core/session')->addError('This '.$ext.' extension copy is unregistered now. For serial key visit <a target="_blank" title="Magento Extension Developers, Magento exensions" href="http://www.magazento.com/">Magazento.com</a> website.');
33
+ }
34
+
35
+ return $collection;
36
+ }
37
+ public function getItems() {
38
+ return $this->getItemCollection();
39
+ }
40
+ }
41
+ ?>
app/code/community/Magazento/Priceproposal/Model/Item.php ADDED
@@ -0,0 +1,49 @@
1
+ <?php
2
+ /*
3
+ * Created on May 3, 2011
4
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
5
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
6
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
7
+ */
8
+ ?>
9
+ <?php
10
+ class Magazento_Priceproposal_Model_Item extends Mage_Core_Model_Abstract
11
+ {
12
+ const CACHE_TAG = 'priceproposal_admin_item';
13
+ protected $_cacheTag= 'priceproposal_admin_item';
14
+
15
+ protected function _construct()
16
+ {
17
+ $this->_init('priceproposal/item');
18
+ }
19
+
20
+ public function createProposal($data)
21
+ {
22
+ $product_id=$data['product_id'];
23
+ $product_name=Mage::getModel('catalog/product')->load($product_id)->getName(); //getting product object for particular product id
24
+ $competitior_name=$data['competitor_name'];
25
+ $competitior_price=$data['competitor_price'];
26
+ $competitior_link=$data['competitor_url'];
27
+ $user_email=$data['user_email'];
28
+ $user_skype=$data['user_skype'];
29
+ $user_phone=$data['user_phone'];
30
+ $comment=$data['comment'];
31
+ $status=0;
32
+
33
+ $storeId= Mage::app()->getStore()->getId();
34
+ $model = Mage::getModel('priceproposal/item');
35
+ $model ->setData('store_id', $storeId);
36
+ $model ->setData('product_id', $product_id);
37
+ $model ->setData('product_name', $product_name);
38
+ $model ->setData('competitior_name', $competitior_name);
39
+ $model ->setData('competitior_price', $competitior_price);
40
+ $model ->setData('competitior_link', $competitior_link);
41
+ $model ->setData('user_email', $user_email);
42
+ $model ->setData('user_skype', $user_skype);
43
+ $model ->setData('user_phone', $user_phone);
44
+ $model ->setData('comment', $comment);
45
+ $model ->setData('status', $status);
46
+ $model ->save();
47
+ }
48
+
49
+ }
app/code/community/Magazento/Priceproposal/Model/Mysql4/Item.php ADDED
@@ -0,0 +1,71 @@
1
+ <?php
2
+ /*
3
+ * Created on May 3, 2011
4
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
5
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
6
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
7
+ */
8
+ ?>
9
+ <?php
10
+
11
+ class Magazento_Priceproposal_Model_Mysql4_Item extends Mage_Core_Model_Mysql4_Abstract {
12
+
13
+ protected function _construct() {
14
+ $this->_init('priceproposal/item', 'item_id');
15
+ }
16
+
17
+ protected function _beforeSave(Mage_Core_Model_Abstract $object) {
18
+ $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
19
+ if (!$object->getFromTime()) {
20
+ $object->setFromTime(Mage::getSingleton('core/date')->gmtDate());
21
+ } else {
22
+ $object->setFromTime(Mage::app()->getLocale()->date($object->getFromTime(), $dateFormatIso));
23
+ $object->setFromTime($object->getFromTime()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT));
24
+ $object->setFromTime(Mage::getSingleton('core/date')->gmtDate(null, $object->getFromTime()));
25
+ }
26
+ $object->setData('from_time', Mage::getSingleton('core/date')->gmtDate());
27
+
28
+ return $this;
29
+ }
30
+
31
+ protected function _afterSave(Mage_Core_Model_Abstract $object) {
32
+ $condition = $this->_getWriteAdapter()->quoteInto('item_id = ?', $object->getId());
33
+ $this->_getWriteAdapter()->delete($this->getTable('priceproposal/item_store'), $condition);
34
+ if (!$object->getData('stores')) {
35
+ $object->setData('stores', $object->getData('store_id'));
36
+ }
37
+ if (in_array(0, $object->getData('stores'))) {
38
+ $object->setData('stores', array(0));
39
+ }
40
+ foreach ((array) $object->getData('stores') as $store) {
41
+ $storeArray = array();
42
+ $storeArray['item_id'] = $object->getId();
43
+ $storeArray['store_id'] = $store;
44
+ $this->_getWriteAdapter()->insert($this->getTable('priceproposal/item_store'), $storeArray);
45
+ }
46
+ return parent::_afterSave($object);
47
+ }
48
+ protected function _afterLoad(Mage_Core_Model_Abstract $object) {
49
+ $select = $this->_getReadAdapter()->select()
50
+ ->from($this->getTable('priceproposal/item_store'))
51
+ ->where('item_id = ?', $object->getId());
52
+
53
+ if ($data = $this->_getReadAdapter()->fetchAll($select)) {
54
+ $storesArray = array();
55
+ foreach ($data as $row) {
56
+ $storesArray[] = $row['store_id'];
57
+ }
58
+ $object->setData('store_id', $storesArray);
59
+ }
60
+ $object->setData('thumb','<img src="'. $object->getData('image') .'" /> ' );
61
+ // var_dump($object);
62
+ // exit();
63
+ return parent::_afterLoad($object);
64
+ }
65
+
66
+ protected function _beforeDelete(Mage_Core_Model_Abstract $object) {
67
+ $adapter = $this->_getReadAdapter();
68
+ $adapter->delete($this->getTable('priceproposal/item_store'), 'item_id=' . $object->getId());
69
+ }
70
+
71
+ }
app/code/community/Magazento/Priceproposal/Model/Mysql4/Item/Collection.php ADDED
@@ -0,0 +1,41 @@
1
+ <?php
2
+ /*
3
+ * Created on May 3, 2011
4
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
5
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
6
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
7
+ */
8
+ ?>
9
+ <?php
10
+
11
+ class Magazento_Priceproposal_Model_Mysql4_Item_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
12
+
13
+ protected function _construct() {
14
+ $this->_init('priceproposal/item');
15
+ }
16
+
17
+ public function toOptionArray() {
18
+ return $this->_toOptionArray('item_id', 'name');
19
+ }
20
+
21
+ public function addStoreFilter($store, $withAdmin = true) {
22
+ if ($store instanceof Mage_Core_Model_Store) {
23
+ $store = array($store->getId());
24
+ }
25
+
26
+ $this->getSelect()->join(
27
+ array('item_store' => $this->getTable('priceproposal/item_store')),
28
+ 'main_table.item_id = item_store.item_id',
29
+ array()
30
+ )
31
+ ->where('item_store.store_id in (?)', ($withAdmin ? array(0, $store) : $store));
32
+
33
+ return $this;
34
+ }
35
+ public function addNowFilter() {
36
+ $now = Mage::getSingleton('core/date')->gmtDate();
37
+ $where = "from_time < '" . $now . "' AND ((to_time > '" . $now . "') OR (to_time IS NULL))";
38
+ $this->getSelect()->where($where);
39
+ }
40
+
41
+ }
app/code/community/Magazento/Priceproposal/Model/Wysiwyg/Config.php ADDED
@@ -0,0 +1,26 @@
1
+ <?php
2
+ /*
3
+ * Created on May 3, 2011
4
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
5
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
6
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
7
+ */
8
+ ?>
9
+ <?php
10
+
11
+ class Magazento_Priceproposal_Model_Wysiwyg_Config extends Mage_Cms_Model_Wysiwyg_Config {
12
+
13
+ public function getConfig($data = array()) {
14
+
15
+
16
+ $config = parent::getConfig($data);
17
+ $config->setData('files_browser_window_url', Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index/'));
18
+ $config->setData('directives_url', Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive'));
19
+ $config->setData('directives_url_quoted', preg_quote($config->getData('directives_url')));
20
+ $config->setData('widget_window_url', Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/widget/index'));
21
+
22
+
23
+ return $config;
24
+ }
25
+
26
+ }
app/code/community/Magazento/Priceproposal/controllers/Admin/ItemController.php ADDED
@@ -0,0 +1,171 @@
1
+ <?php
2
+ /*
3
+ * Created on May 3, 2011
4
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
5
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
6
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
7
+ */
8
+ ?>
9
+ <?php
10
+
11
+ class Magazento_Priceproposal_Admin_ItemController extends Mage_Adminhtml_Controller_Action {
12
+
13
+ protected function _initAction() {
14
+ $this->loadLayout()
15
+ ->_setActiveMenu('magazento/priceproposal')
16
+ ->_addBreadcrumb(Mage::helper('priceproposal')->__('Priceproposal'), Mage::helper('priceproposal')->__('Priceproposal'))
17
+ ->_addBreadcrumb(Mage::helper('priceproposal')->__('Priceproposal Items'), Mage::helper('priceproposal')->__('Priceproposal Items'))
18
+ ;
19
+ return $this;
20
+ }
21
+
22
+ public function indexAction() {
23
+ $this->_initAction()
24
+ ->_addContent($this->getLayout()->createBlock('priceproposal/admin_item'))
25
+ ->renderLayout();
26
+ }
27
+
28
+
29
+ public function deleteAction() {
30
+ // check if we know what should be deleted
31
+ if ($id = $this->getRequest()->getParam('item_id')) {
32
+ $name = "";
33
+ try {
34
+ // init model and delete
35
+ $model = Mage::getModel('priceproposal/item');
36
+ $model->load($id);
37
+ $name = $model->getName();
38
+ $model->delete();
39
+ // display success message
40
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('priceproposal')->__('Item was successfully deleted'));
41
+ // go to grid
42
+ $this->_redirect('*/*/');
43
+ return;
44
+ } catch (Exception $e) {
45
+ // display error message
46
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
47
+ // go back to edit form
48
+ $this->_redirect('*/*/edit', array('item_id' => $id));
49
+ return;
50
+ }
51
+ }
52
+ // display error message
53
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('priceproposal')->__('Unable to find a item to delete'));
54
+ // go to grid
55
+ $this->_redirect('*/*/');
56
+ }
57
+
58
+
59
+ protected function _isAllowed() {
60
+ return Mage::getSingleton('admin/session')->isAllowed('priceproposal/item');
61
+ }
62
+
63
+ public function wysiwygAction() {
64
+ $elementId = $this->getRequest()->getParam('element_id', md5(microtime()));
65
+ $content = $this->getLayout()->createBlock('adminhtml/catalog_helper_form_wysiwyg_content', '', array(
66
+ 'editor_element_id' => $elementId
67
+ ));
68
+ $this->getResponse()->setBody($content->toHtml());
69
+ }
70
+
71
+
72
+
73
+ public function massStatusAction()
74
+ {
75
+ $itemIds = $this->getRequest()->getParam('massaction');
76
+ if(!is_array($itemIds)) {
77
+ Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
78
+ } else {
79
+ try {
80
+ foreach ($itemIds as $itemId) {
81
+ $model = Mage::getSingleton('priceproposal/item')
82
+ ->load($itemId)
83
+ ->setStatus($this->getRequest()->getParam('status'))
84
+ ->setIsMassupdate(true)
85
+ ->save();
86
+ }
87
+ $this->_getSession()->addSuccess(
88
+ $this->__('Total of %d record(s) were successfully updated', count($itemIds))
89
+ );
90
+ } catch (Exception $e) {
91
+ $this->_getSession()->addError($e->getMessage());
92
+ }
93
+ }
94
+ $this->_redirect('*/*/index');
95
+ }
96
+
97
+ public function massDeleteAction() {
98
+ $itemIds = $this->getRequest()->getParam('massaction');
99
+ if(!is_array($itemIds)) {
100
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('priceproposal')->__('Please select item(s)'));
101
+ } else {
102
+ try {
103
+ foreach ($itemIds as $itemId) {
104
+ $mass = Mage::getModel('priceproposal/item')->load($itemId);
105
+ $mass->delete();
106
+ }
107
+ Mage::getSingleton('adminhtml/session')->addSuccess(
108
+ Mage::helper('priceproposal')->__(
109
+ 'Total of %d record(s) were successfully deleted', count($itemIds)
110
+ )
111
+ );
112
+ } catch (Exception $e) {
113
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
114
+ }
115
+ }
116
+ $this->_redirect('*/*/index');
117
+ }
118
+
119
+ public function seenAction() {
120
+ // check if we know what should be deleted
121
+ if ($id = $this->getRequest()->getParam('item_id')) {
122
+ try {
123
+ $model = Mage::getModel('priceproposal/item');
124
+ $model->load($id);
125
+ $model->setStatus(1);
126
+ $model->save();
127
+ $this->_redirect('*/*/');
128
+ return;
129
+ } catch (Exception $e) {
130
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
131
+ $this->_redirect('*/*/', array('item_id' => $id));
132
+ return;
133
+ }
134
+ }
135
+ // go to grid
136
+ $this->_redirect('*/*/');
137
+ }
138
+
139
+
140
+
141
+ public function exportCsvAction()
142
+ {
143
+ $fileName = 'items.csv';
144
+ $content = $this->getLayout()->createBlock('priceproposal/admin_item_grid')
145
+ ->getCsv();
146
+ $this->_sendUploadResponse($fileName, $content);
147
+ }
148
+
149
+ public function exportXmlAction()
150
+ {
151
+ $fileName = 'items.xml';
152
+ $content = $this->getLayout()->createBlock('priceproposal/admin_item_grid')
153
+ ->getXml();
154
+ $this->_sendUploadResponse($fileName, $content);
155
+ }
156
+ protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream')
157
+ {
158
+ $response = $this->getResponse();
159
+ $response->setHeader('HTTP/1.1 200 OK','');
160
+ $response->setHeader('Pragma', 'public', true);
161
+ $response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
162
+ $response->setHeader('Content-Disposition', 'attachment; filename='.$fileName);
163
+ $response->setHeader('Last-Modified', date('r'));
164
+ $response->setHeader('Accept-Ranges', 'bytes');
165
+ $response->setHeader('Content-Length', strlen($content));
166
+ $response->setHeader('Content-type', $contentType);
167
+ $response->setBody($content);
168
+ $response->sendResponse();
169
+ die;
170
+ }
171
+ }
app/code/community/Magazento/Priceproposal/controllers/IndexController.php ADDED
@@ -0,0 +1,23 @@
1
+ <?php
2
+
3
+ class Magazento_Priceproposal_IndexController extends Mage_Core_Controller_Front_Action {
4
+
5
+ public function formAction() {
6
+ echo Mage::helper('priceproposal')->formdata();
7
+ }
8
+
9
+ public function indexAction() {
10
+ echo '<div class="proposal-answer">';
11
+ if ($data = $this->getRequest()->getParams()) {
12
+ Mage::getModel('priceproposal/item')->createProposal($data);
13
+ }
14
+ echo '<img src="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN).'frontend/default/default/magazento/priceproposal/help_desk.png" alt="help desk" />';
15
+ echo '<span>'.Mage::helper('priceproposal')->__('Thank you for your help!').'</span>';
16
+ echo '</div>';
17
+ }
18
+
19
+ }
20
+ // <!-- PROPOSAL START -->
21
+ // echo $this->getLayout()->createBlock('priceproposal/request')->setTemplate('magazento/priceproposal/data.phtml')->toHtml();
22
+ //<!-- PROPOSAL END -->
23
+ ?>
app/code/community/Magazento/Priceproposal/etc/config.xml ADDED
@@ -0,0 +1,158 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <config>
3
+ <modules>
4
+ <Magazento_Priceproposal>
5
+ <version>1.0.0</version>
6
+ </Magazento_Priceproposal>
7
+ </modules>
8
+ <frontend>
9
+ <layout>
10
+ <updates>
11
+ <priceproposal>
12
+ <file>magazento_priceproposal.xml</file>
13
+ </priceproposal>
14
+ </updates>
15
+ </layout>
16
+ <translate>
17
+ <modules>
18
+ <Magazento_Priceproposal>
19
+ <files>
20
+ <default>Magazento_Priceproposal.csv</default>
21
+ </files>
22
+ </Magazento_Priceproposal>
23
+ </modules>
24
+ </translate>
25
+ </frontend>
26
+
27
+ <global>
28
+ <rewrite>
29
+ <mage_adminhtml_system_variable>
30
+ <from><![CDATA[#^/priceproposal/system_variable#]]>
31
+ </from>
32
+ <to>/admin/system_variable</to>
33
+ </mage_adminhtml_system_variable>
34
+ </rewrite>
35
+ <models>
36
+ <priceproposal>
37
+ <class>Magazento_Priceproposal_Model</class>
38
+ <resourceModel>priceproposal_mysql4</resourceModel>
39
+ </priceproposal>
40
+ <priceproposal_mysql4>
41
+ <class>Magazento_Priceproposal_Model_Mysql4</class>
42
+ <entities>
43
+ <item>
44
+ <table>magazento_priceproposal_item</table>
45
+ </item>
46
+ <item_store>
47
+ <table>magazento_priceproposal_item_store</table>
48
+ </item_store>
49
+ </entities>
50
+ </priceproposal_mysql4>
51
+ </models>
52
+ <resources>
53
+ <priceproposal_setup>
54
+ <setup>
55
+ <module>Magazento_Priceproposal</module>
56
+ </setup>
57
+ <connection>
58
+ <use>core_setup</use>
59
+ </connection>
60
+ </priceproposal_setup>
61
+ <priceproposal_write>
62
+ <connection>
63
+ <use>core_write</use>
64
+ </connection>
65
+ </priceproposal_write>
66
+ <priceproposal_read>
67
+ <connection>
68
+ <use>core_read</use>
69
+ </connection>
70
+ </priceproposal_read>
71
+ </resources>
72
+ <blocks>
73
+ <priceproposal>
74
+ <class>Magazento_Priceproposal_Block</class>
75
+ </priceproposal>
76
+ </blocks>
77
+ <helpers>
78
+ <priceproposal>
79
+ <class>Magazento_Priceproposal_Helper</class>
80
+ </priceproposal>
81
+ </helpers>
82
+ </global>
83
+ <admin>
84
+ <routers>
85
+ <magazento_priceproposal>
86
+ <use>admin</use>
87
+ <args>
88
+ <module>Magazento_Priceproposal</module>
89
+ <frontName>priceproposal</frontName>
90
+ </args>
91
+ </magazento_priceproposal>
92
+ </routers>
93
+ </admin>
94
+
95
+ <adminhtml>
96
+ <acl>
97
+ <resources>
98
+ <admin>
99
+ <children>
100
+ <priceproposal translate="title">
101
+ <title>Priceproposal</title>
102
+ <children>
103
+ <item translate="title">
104
+ <title>Manage items </title>
105
+ </item>
106
+ </children>
107
+ <sort_order>65</sort_order>
108
+ </priceproposal>
109
+ <system>
110
+ <children>
111
+ <config>
112
+ <children>
113
+ <priceproposal>
114
+ <title>Priceproposal</title>
115
+ <sort_order>101</sort_order>
116
+ </priceproposal>
117
+ </children>
118
+ </config>
119
+ </children>
120
+ </system>
121
+ </children>
122
+ </admin>
123
+ </resources>
124
+ </acl>
125
+ <menu>
126
+ <magazento translate="title" module="priceproposal">
127
+ <title>Magazento</title>
128
+ <sort_order>65</sort_order>
129
+ <children>
130
+ <priceproposal translate="title" module="priceproposal">
131
+ <title>Priceproposal</title>
132
+ <sort_order>65</sort_order>
133
+ <children>
134
+ <item translate="title" module="priceproposal">
135
+ <title>Items</title>
136
+ <action>priceproposal/admin_item/</action>
137
+ <resource>priceproposal/admin/item</resource>
138
+ </item>
139
+ <settings translate="title" module="priceproposal">
140
+ <title>Settings</title>
141
+ <action>adminhtml/system_config/edit/section/priceproposal</action>
142
+ <sort_order>40</sort_order>
143
+ </settings>
144
+ </children>
145
+ </priceproposal>
146
+ </children>
147
+ </magazento>
148
+ </menu>
149
+ </adminhtml>
150
+ <default>
151
+ <priceproposal>
152
+ <options>
153
+ <title>Please briefly describe your request. We will work on it as soon as possible.</title>
154
+ <button>Price Complain</button>
155
+ </options>
156
+ </priceproposal>
157
+ </default>
158
+ </config>
app/code/community/Magazento/Priceproposal/etc/system.xml ADDED
@@ -0,0 +1,55 @@
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <magazento translate="label">
5
+ <label>Magazento.com</label>
6
+ <sort_order>250</sort_order>
7
+ </magazento>
8
+ </tabs>
9
+ <sections>
10
+ <priceproposal translate="label" module="priceproposal">
11
+ <label>Priceproposal</label>
12
+ <tab>magazento</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>100</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
+ <groups>
19
+ <developer>
20
+ <frontend_model>priceproposal/developer</frontend_model>
21
+ <sort_order>999</sort_order>
22
+ <show_in_default>1</show_in_default>
23
+ <show_in_website>1</show_in_website>
24
+ <show_in_store>1</show_in_store>
25
+ </developer>
26
+ <options translate="label">
27
+ <label>Options</label>
28
+ <frontend_type>text</frontend_type>
29
+ <sort_order>10</sort_order>
30
+ <show_in_default>1</show_in_default>
31
+ <show_in_website>1</show_in_website>
32
+ <show_in_store>1</show_in_store>
33
+ <fields>
34
+ <title translate="label">
35
+ <label>Title</label>
36
+ <frontend_type>text</frontend_type>
37
+ <sort_order>60</sort_order>
38
+ <show_in_default>1</show_in_default>
39
+ <show_in_website>1</show_in_website>
40
+ <show_in_store>1</show_in_store>
41
+ </title>
42
+ <button translate="label">
43
+ <label>Button</label>
44
+ <frontend_type>text</frontend_type>
45
+ <sort_order>60</sort_order>
46
+ <show_in_default>1</show_in_default>
47
+ <show_in_website>1</show_in_website>
48
+ <show_in_store>1</show_in_store>
49
+ </button>
50
+ </fields>
51
+ </options>
52
+ </groups>
53
+ </priceproposal>
54
+ </sections>
55
+ </config>
app/code/community/Magazento/Priceproposal/sql/priceproposal_setup/mysql4-install-1.0.0.php ADDED
@@ -0,0 +1,50 @@
1
+ <?php
2
+ /*
3
+ * Created on Mar 27, 2011
4
+ * Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
5
+ * Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
6
+ * Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
7
+ */
8
+ ?>
9
+ <?php
10
+
11
+ $installer = $this;
12
+ $installer->startSetup();
13
+ $installer->run("
14
+ -- --------------------------------------------------------
15
+ CREATE TABLE IF NOT EXISTS `{$this->getTable('magazento_priceproposal_item')}` (
16
+ `item_id` smallint(6) NOT NULL AUTO_INCREMENT,
17
+ `store_id` int(11) NOT NULL DEFAULT '0',
18
+ `product_id` int(11) NOT NULL,
19
+ `product_name` varchar(250) NOT NULL,
20
+ `competitior_name` varchar(100) NOT NULL,
21
+ `competitior_price` varchar(50) NOT NULL,
22
+ `competitior_link` tinytext NOT NULL,
23
+ `user_email` varchar(250) NOT NULL,
24
+ `user_skype` varchar(250) NOT NULL,
25
+ `user_phone` varchar(250) NOT NULL,
26
+ `comment` text NOT NULL,
27
+ `from_time` datetime DEFAULT NULL,
28
+ `status` tinyint(4) NOT NULL DEFAULT '0',
29
+ PRIMARY KEY (`item_id`)
30
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=58 ;
31
+
32
+ INSERT INTO `{$this->getTable('magazento_priceproposal_item')}` (`item_id`, `store_id`, `product_id`, `product_name`, `competitior_name`, `competitior_price`, `competitior_link`, `user_email`, `user_skype`, `user_phone`, `comment`, `from_time`, `status`) VALUES
33
+ (57, 1, 19, 'AT&T 8525 PDA', 'Sony PS3', '500 USD', 'http://us.playstation.com/', 'magazento@gmail.com', 'VOLGODARK', ' 7 909389 2222', 'The official PlayStation resource for PlayStation 3 PS3. ... Sony makedotbelieve. PlayStation', '2011-05-03 00:41:16', 0);
34
+
35
+
36
+ -- --------------------------------------------------------
37
+
38
+ CREATE TABLE IF NOT EXISTS `{$this->getTable('magazento_priceproposal_item_store')}` (
39
+ `item_id` smallint(6) unsigned DEFAULT NULL,
40
+ `store_id` smallint(6) unsigned DEFAULT NULL
41
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
42
+
43
+ INSERT INTO `{$this->getTable('magazento_priceproposal_item_store')}` (`item_id`, `store_id`) VALUES
44
+ (5, 0),
45
+ (57, 1);
46
+
47
+ ");
48
+
49
+ $installer->endSetup();
50
+ ?>
app/design/frontend/default/default/layout/magazento_priceproposal.xml ADDED
@@ -0,0 +1,20 @@
1
+ <layout>
2
+ <!-- LAYOUT START -->
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addCss"><stylesheet>magazento/priceproposal/colorbox.css</stylesheet></action>
6
+ <action method="addCss"><stylesheet>magazento/priceproposal/style.css</stylesheet></action>
7
+ <action method="addItem">
8
+ <type>skin_js</type>
9
+ <name>magazento/priceproposal/jquery.colorbox.js</name>
10
+ <params/>
11
+ </action>
12
+ <action method="addItem">
13
+ <type>skin_js</type>
14
+ <name>magazento/jquery-1.5.1.min.js</name>
15
+ <params/>
16
+ </action>
17
+ </reference>
18
+ </default>
19
+ <!-- LAYOUT END -->
20
+ </layout>
app/design/frontend/default/default/template/magazento/priceproposal/data.phtml ADDED
@@ -0,0 +1,51 @@
1
+ <?php $product = Mage::registry('current_product'); ?>
2
+
3
+ <script type="text/javascript">
4
+ var JQR = jQuery.noConflict();
5
+
6
+ function submitForm() {
7
+ var competitor_name = escape(JQR('input[name=competitor_name]').val());
8
+ var competitor_price = escape(JQR('input[name=competitor_price]').val());
9
+ var competitor_url = escape(JQR('input[name=competitor_url]').val());
10
+
11
+ var user_email = escape(JQR('input[name=user_email]').val());
12
+ var user_phone = escape(JQR('input[name=user_phone]').val());
13
+ var user_skype = escape(JQR('input[name=user_skype]').val());
14
+ var comment = escape(JQR('textarea[name=comment]').val());
15
+
16
+ var warning_text = 'Product name, price and URL are requried fields';
17
+
18
+ if ((competitor_name!='') && (competitor_url!='') && (competitor_price!='')) {
19
+ JQR('div.proposal-information').text('Press "Submit" again for send');
20
+ JQR('a').colorbox({href:"<?php echo Mage::getUrl('priceproposal/'); ?>"+
21
+ "?competitor_name="+competitor_name+
22
+ "&competitor_price="+competitor_price+
23
+ "&competitor_url="+competitor_url+
24
+ "&user_email="+user_email+
25
+ "&user_phone="+user_phone+
26
+ "&user_skype="+user_skype+
27
+ "&comment="+comment+
28
+ "&product_id="+<?php echo urlencode($product->getId()); ?>
29
+ });
30
+ } else {
31
+ JQR('div.proposal-information').text(warning_text);
32
+ }
33
+
34
+ }
35
+
36
+ function indexForm() {
37
+ JQR('button').colorbox({href:"<?php echo Mage::getUrl('priceproposal/index/form/'); ?>"});
38
+ }
39
+ </script>
40
+
41
+
42
+ <div class="add-proposal">
43
+ <label for="proposal"><?php echo $this->__('Send quote:'); ?></label>
44
+ <button
45
+ class='button btn-cart'
46
+ title="<?php echo Mage::getStoreConfig('priceproposal/options/title') ?>"
47
+ onclick="javascript:indexForm();"
48
+ type="button">
49
+ <span><span><?php echo Mage::getStoreConfig('priceproposal/options/button') ?></span></span>
50
+ </button>
51
+ </div>
app/etc/modules/Magazento_Priceproposal.xml ADDED
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Magazento_Priceproposal>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </Magazento_Priceproposal>
8
+ </modules>
9
+ </config>
app/locale/en_US/Magazento_Priceproposal.csv ADDED
@@ -0,0 +1 @@
1
+ "Thank you for your help!","Thank you for your help!"
package.xml ADDED
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Magazento_PriceProposal</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>GPL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Allows customers to send price feedback directly form product page via Ajax. Simple and convenient.</summary>
10
+ <description>PriceProposal is module that add new functionality to your customers. Customers can create proposals in just seconds - it's a new type of product price feedback. Now customers can help shopowners, custemrs send a price request to magento administrator. And shopowners can effectively track customer quotations and manage product prices in backend.
11
+
12
+ This extension fully automated and integrated PriceProposal functionality in Magento CMS. Conveniently manage all your price requests and proposals in one place. It's really simple and easy.</description>
13
+ <notes>1.0.0</notes>
14
+ <authors><author><name>volgodark</name><user>auto-converted</user><email>volgodark@gmail.com</email></author></authors>
15
+ <date>2011-05-06</date>
16
+ <time>09:31:41</time>
17
+ <contents><target name="magelocale"><dir name="en_US"><file name="Magazento_Priceproposal.csv" hash="535253a549bbfa60c8a0b2619cdae7bd"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="magazento_priceproposal.xml" hash="2b04766ae062f127cc894087f1d36dc2"/></dir><dir name="template"><dir name="magazento"><dir name="priceproposal"><file name="data.phtml" hash="b97bfaab79c157841bab2fddc90debb5"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="magazento"><dir name="priceproposal"><dir name="images"><dir name="ie6"><file name="borderBottomCenter.png" hash="1936585831e8bcf4eb5ef1081c8e2574"/><file name="borderBottomLeft.png" hash="7ceeb01563f030dc47837fd8bad29488"/><file name="borderBottomRight.png" hash="297fb77440870d91f519bcecdb312725"/><file name="borderMiddleLeft.png" hash="64df0244eeaade27764d2cf33606527b"/><file name="borderMiddleRight.png" hash="9fa458eaaa35b80b2452f35a1d6b4d0c"/><file name="borderTopCenter.png" hash="01ecb01841270f3a765aadf4900929f3"/><file name="borderTopLeft.png" hash="bf4949b95b09d255edd9bcb8358a3557"/><file name="borderTopRight.png" hash="51315fa19507a33d5f1b5411598593e7"/></dir><file name="border.png" hash="7ca8a1d2eb0763b35c266cd54bee2fa5"/><file name="controls.png" hash="e687384db0b8582a2dd48c00c653dfd1"/><file name="loading.gif" hash="e6611f867d63754b7a2a974fb0a0e7dc"/><file name="loading_background.png" hash="acf427e932fb9413700a4b8b58b41eec"/><file name="overlay.png" hash="790376e15a036959e358a19d4a7ea437"/></dir><file name="colorbox.css" hash="b209b53af1453331956c83736449f784"/><file name="help_desk.png" hash="5172000a8bdbce72c49429743d522d38"/><file name="jquery.colorbox.js" hash="bd557c58f56081e1e3593057446a65dd"/><file name="promo.jpg" hash="88520d456df68c98130433b5184b8e7f"/><file name="style.css" hash="9eff09a88b926275a21e5f0049125b3e"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Magazento"><dir name="Priceproposal"><dir name="Block"><dir name="Admin"><dir name="Item"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="c211eaafb80df9d5ca735e98b939182c"/><file name="Other.php" hash="e1deda10926fe36a71e40dc1c70dd38b"/></dir><file name="Form.php" hash="7dcb54b10c3fd9c7d3f85f2ab4d6a376"/><file name="Tabs.php" hash="48be5692736fd0907e7253d708ca211f"/></dir><dir name="Grid"><dir name="Renderer"><file name="Action.php" hash="13eae0734c626a6c916f930174e1a234"/></dir></dir><file name="Edit.php" hash="8f304f5224adf095073249aa98f017ce"/><file name="Grid.php" hash="dbaca2a4060ef22849d237ee4b217754"/></dir><file name="Item.php" hash="8087de5b9cf9db8f25e4278479c884e4"/></dir><file name="Developer.php" hash="0ad047f2015a73082f12200f874d3c09"/><file name="Request.php" hash="83bb7d6d23014a5d1b65139986ba3d24"/></dir><dir name="controllers"><dir name="Admin"><file name="ItemController.php" hash="12207096b0e7ae1962686daeac61a03f"/></dir><file name="IndexController.php" hash="3ccdf5e166dc75bfe9822dc4bf74d71f"/></dir><dir name="etc"><file name="config.xml" hash="dee563eb7ccfa395f4e58c5fdc9a3421"/><file name="system.xml" hash="9367f42f1e2cfbaf3c0593d7ae0143d8"/></dir><dir name="Helper"><file name="Data.php" hash="b26fd776e131be7ca6aebca414e626d5"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Item"><file name="Collection.php" hash="aaede73d0cc77604f2eeedb49d363931"/></dir><file name="Item.php" hash="016e533f765e7fe5dfcd53a02b523568"/></dir><dir name="Wysiwyg"><file name="Config.php" hash="896efaa4437ebaf19d9446ecc438c068"/></dir><file name="Data.php" hash="d4b31d6f247565d9ddc12d21ca318562"/><file name="Item.php" hash="a84e6dcb7fb0451125bdfdbdea377243"/></dir><dir name="sql"><dir name="priceproposal_setup"><file name="mysql4-install-1.0.0.php" hash="f9161869668b116e9b3e34c978bef61e"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magazento_Priceproposal.xml" hash="1f47e087bc064bf1d2f7d07d5e0594e4"/></dir></target></contents>
18
+ <compatible/>
19
+ <dependencies/>
20
+ </package>
skin/frontend/default/default/magazento/priceproposal/colorbox.css ADDED
@@ -0,0 +1,82 @@
1
+ /*
2
+ ColorBox Core Style:
3
+ The following CSS is consistent between example themes and should not be altered.
4
+ */
5
+ #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
6
+ #cboxOverlay{position:fixed; width:100%; height:100%;}
7
+ #cboxMiddleLeft, #cboxBottomLeft{clear:left;}
8
+ #cboxContent{position:relative;}
9
+ #cboxLoadedContent{overflow:auto;}
10
+ #cboxTitle{margin:0;}
11
+ #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
12
+ #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
13
+ .cboxPhoto{float:left; margin:auto; border:0; display:block;}
14
+ .cboxIframe{width:100%; height:100%; display:block; border:0;}
15
+
16
+ /*
17
+ User Style:
18
+ Change the following styles to modify the appearance of ColorBox. They are
19
+ ordered & tabbed in a way that represents the nesting of the generated HTML.
20
+ */
21
+ #cboxOverlay{background:url(images/overlay.png) repeat 0 0;}
22
+ #colorbox{}
23
+ #cboxTopLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -100px 0;}
24
+ #cboxTopRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -129px 0;}
25
+ #cboxBottomLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -100px -29px;}
26
+ #cboxBottomRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -129px -29px;}
27
+ #cboxMiddleLeft{width:21px; background:url(images/controls.png) left top repeat-y;}
28
+ #cboxMiddleRight{width:21px; background:url(images/controls.png) right top repeat-y;}
29
+ #cboxTopCenter{height:21px; background:url(images/border.png) 0 0 repeat-x;}
30
+ #cboxBottomCenter{height:21px; background:url(images/border.png) 0 -29px repeat-x;}
31
+ #cboxContent{background:#fff; overflow:hidden;}
32
+ #cboxError{padding:50px; border:1px solid #ccc;}
33
+ #cboxLoadedContent{margin-bottom:28px;}
34
+ #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
35
+ #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
36
+ #cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
37
+ #cboxPrevious{position:absolute; bottom:0; left:0; background:url(images/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;}
38
+ #cboxPrevious.hover{background-position:-75px -25px;}
39
+ #cboxNext{position:absolute; bottom:0; left:27px; background:url(images/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;}
40
+ #cboxNext.hover{background-position:-50px -25px;}
41
+ #cboxLoadingOverlay{background:url(images/loading_background.png) no-repeat center center;}
42
+ #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}
43
+ #cboxClose{position:absolute; bottom:0; right:0; background:url(images/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;}
44
+ #cboxClose.hover{background-position:-25px -25px;}
45
+
46
+ /*
47
+ The following fixes a problem where IE7+ replaces a PNG's alpha transparency with a black fill
48
+ when an alpha filter (opacity change) is set on the element or ancestor element.
49
+ */
50
+ .cboxIE #cboxTopLeft,
51
+ .cboxIE #cboxTopCenter,
52
+ .cboxIE #cboxTopRight,
53
+ .cboxIE #cboxBottomLeft,
54
+ .cboxIE #cboxBottomCenter,
55
+ .cboxIE #cboxBottomRight,
56
+ .cboxIE #cboxMiddleLeft,
57
+ .cboxIE #cboxMiddleRight {
58
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
59
+ }
60
+
61
+ /*
62
+ The following provides PNG transparency support for IE6
63
+ */
64
+ .cboxIE6 #cboxTopLeft{background:url(images/ie6/borderTopLeft.png);}
65
+ .cboxIE6 #cboxTopCenter{background:url(images/ie6/borderTopCenter.png);}
66
+ .cboxIE6 #cboxTopRight{background:url(images/ie6/borderTopRight.png);}
67
+ .cboxIE6 #cboxBottomLeft{background:url(images/ie6/borderBottomLeft.png);}
68
+ .cboxIE6 #cboxBottomCenter{background:url(images/ie6/borderBottomCenter.png);}
69
+ .cboxIE6 #cboxBottomRight{background:url(images/ie6/borderBottomRight.png);}
70
+ .cboxIE6 #cboxMiddleLeft{background:url(images/ie6/borderMiddleLeft.png);}
71
+ .cboxIE6 #cboxMiddleRight{background:url(images/ie6/borderMiddleRight.png);}
72
+
73
+ .cboxIE6 #cboxTopLeft,
74
+ .cboxIE6 #cboxTopCenter,
75
+ .cboxIE6 #cboxTopRight,
76
+ .cboxIE6 #cboxBottomLeft,
77
+ .cboxIE6 #cboxBottomCenter,
78
+ .cboxIE6 #cboxBottomRight,
79
+ .cboxIE6 #cboxMiddleLeft,
80
+ .cboxIE6 #cboxMiddleRight {
81
+ _behavior: expression(this.src = this.src ? this.src : this.currentStyle.backgroundImage.split('"')[1], this.style.background = "none", this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + this.src + ", sizingMethod='scale')");
82
+ }
skin/frontend/default/default/magazento/priceproposal/help_desk.png ADDED
Binary file
skin/frontend/default/default/magazento/priceproposal/images/border.png ADDED
Binary file
skin/frontend/default/default/magazento/priceproposal/images/controls.png ADDED
Binary file
skin/frontend/default/default/magazento/priceproposal/images/ie6/borderBottomCenter.png ADDED
Binary file
skin/frontend/default/default/magazento/priceproposal/images/ie6/borderBottomLeft.png ADDED
Binary file
skin/frontend/default/default/magazento/priceproposal/images/ie6/borderBottomRight.png ADDED
Binary file
skin/frontend/default/default/magazento/priceproposal/images/ie6/borderMiddleLeft.png ADDED
Binary file
skin/frontend/default/default/magazento/priceproposal/images/ie6/borderMiddleRight.png ADDED
Binary file
skin/frontend/default/default/magazento/priceproposal/images/ie6/borderTopCenter.png ADDED
Binary file
skin/frontend/default/default/magazento/priceproposal/images/ie6/borderTopLeft.png ADDED
Binary file
skin/frontend/default/default/magazento/priceproposal/images/ie6/borderTopRight.png ADDED
Binary file
skin/frontend/default/default/magazento/priceproposal/images/loading.gif ADDED
Binary file
skin/frontend/default/default/magazento/priceproposal/images/loading_background.png ADDED
Binary file
skin/frontend/default/default/magazento/priceproposal/images/overlay.png ADDED
Binary file
skin/frontend/default/default/magazento/priceproposal/jquery.colorbox.js ADDED
@@ -0,0 +1,815 @@