Version Notes
KiyOh.nl-gebruikers kunnen met deze plug-in automatisch klantbeoordelingen verzamelen, publiceren en delen in social media. Wanneer een klant een bestelling heeft gemaakt in uw Magento Shop, wordt een e-mail uitnodiging automatisch na een paar dagen verstuurd om u te beoordelen. De e-mail wordt uit naam en e-mailadres van uw organisatie gestuurd, zodat uw klanten u herkennen. De e-mail tekst is aanpasbaar en bevat een persoonlijke en veilige link naar de pagina om te beoordelen. Vanaf nu worden de beoordelingen dus automatisch verzameld, gepubliceerd en gedeeld. Dat is nog eens handig!
Download this release
Release Info
Developer | Magento Core Team |
Extension | kiyoh_customerreview |
Version | 1.6.6.1 |
Comparing to | |
See all releases |
Code changes from version 1.6.4.4 to 1.6.6.1
- app/code/community/Kiyoh/Customerreview/Block/Adminhtml/Customerreview.php +12 -0
- app/code/community/Kiyoh/Customerreview/Block/Adminhtml/Customerreview/Edit.php +45 -0
- app/code/community/Kiyoh/Customerreview/Block/Adminhtml/Customerreview/Edit/Form.php +19 -0
- app/code/community/Kiyoh/Customerreview/Block/Adminhtml/Customerreview/Edit/Tab/Form.php +58 -0
- app/code/community/Kiyoh/Customerreview/Block/Adminhtml/Customerreview/Edit/Tabs.php +24 -0
- app/code/community/Kiyoh/Customerreview/Block/Adminhtml/Customerreview/Grid.php +116 -0
- app/code/community/Kiyoh/Customerreview/Block/Customerreview.php +17 -0
- app/code/community/Kiyoh/Customerreview/Model/Customerreview.php +10 -0
- app/code/community/Kiyoh/Customerreview/Model/Mysql4/Customerreview.php +10 -0
- app/code/community/Kiyoh/Customerreview/Model/Mysql4/Customerreview/Collection.php +10 -0
- app/code/community/Kiyoh/Customerreview/Model/Status.php +15 -0
- app/code/community/Kiyoh/Customerreview/controllers/Adminhtml/CustomerreviewController.php +7 -0
- app/code/community/Kiyoh/Customerreview/controllers/Adminhtml/Sales/Order/ShipmentController.php +124 -17
- app/code/community/Kiyoh/Customerreview/controllers/IndexController.php +47 -0
- app/code/community/Kiyoh/Customerreview/etc/system.xml +4 -4
- app/design/frontend/default/default/layout/customerreview.xml +2 -6
- app/design/frontend/default/default/template/kiyohcheckout/success.phtml +135 -47
- package.xml +4 -4
app/code/community/Kiyoh/Customerreview/Block/Adminhtml/Customerreview.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Kiyoh_Customerreview_Block_Adminhtml_Customerreview extends Mage_Adminhtml_Block_Widget_Grid_Container
|
3 |
+
{
|
4 |
+
public function __construct()
|
5 |
+
{
|
6 |
+
$this->_controller = 'adminhtml_customerreview';
|
7 |
+
$this->_blockGroup = 'customerreview';
|
8 |
+
$this->_headerText = Mage::helper('customerreview')->__('Item Manager');
|
9 |
+
$this->_addButtonLabel = Mage::helper('customerreview')->__('Add Item');
|
10 |
+
parent::__construct();
|
11 |
+
}
|
12 |
+
}
|
app/code/community/Kiyoh/Customerreview/Block/Adminhtml/Customerreview/Edit.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Kiyoh_Customerreview_Block_Adminhtml_Customerreview_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 = 'customerreview';
|
11 |
+
$this->_controller = 'adminhtml_customerreview';
|
12 |
+
|
13 |
+
$this->_updateButton('save', 'label', Mage::helper('customerreview')->__('Save Item'));
|
14 |
+
$this->_updateButton('delete', 'label', Mage::helper('customerreview')->__('Delete Item'));
|
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('customerreview_content') == null) {
|
25 |
+
tinyMCE.execCommand('mceAddControl', false, 'customerreview_content');
|
26 |
+
} else {
|
27 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'customerreview_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('customerreview_data') && Mage::registry('customerreview_data')->getId() ) {
|
40 |
+
return Mage::helper('customerreview')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('customerreview_data')->getTitle()));
|
41 |
+
} else {
|
42 |
+
return Mage::helper('customerreview')->__('Add Item');
|
43 |
+
}
|
44 |
+
}
|
45 |
+
}
|
app/code/community/Kiyoh/Customerreview/Block/Adminhtml/Customerreview/Edit/Form.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Kiyoh_Customerreview_Block_Adminhtml_Customerreview_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/Kiyoh/Customerreview/Block/Adminhtml/Customerreview/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Kiyoh_Customerreview_Block_Adminhtml_Customerreview_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('customerreview_form', array('legend'=>Mage::helper('customerreview')->__('Item information')));
|
10 |
+
|
11 |
+
$fieldset->addField('title', 'text', array(
|
12 |
+
'label' => Mage::helper('customerreview')->__('Title'),
|
13 |
+
'class' => 'required-entry',
|
14 |
+
'required' => true,
|
15 |
+
'name' => 'title',
|
16 |
+
));
|
17 |
+
|
18 |
+
$fieldset->addField('filename', 'file', array(
|
19 |
+
'label' => Mage::helper('customerreview')->__('File'),
|
20 |
+
'required' => false,
|
21 |
+
'name' => 'filename',
|
22 |
+
));
|
23 |
+
|
24 |
+
$fieldset->addField('status', 'select', array(
|
25 |
+
'label' => Mage::helper('customerreview')->__('Status'),
|
26 |
+
'name' => 'status',
|
27 |
+
'values' => array(
|
28 |
+
array(
|
29 |
+
'value' => 1,
|
30 |
+
'label' => Mage::helper('customerreview')->__('Enabled'),
|
31 |
+
),
|
32 |
+
|
33 |
+
array(
|
34 |
+
'value' => 2,
|
35 |
+
'label' => Mage::helper('customerreview')->__('Disabled'),
|
36 |
+
),
|
37 |
+
),
|
38 |
+
));
|
39 |
+
|
40 |
+
$fieldset->addField('content', 'editor', array(
|
41 |
+
'name' => 'content',
|
42 |
+
'label' => Mage::helper('customerreview')->__('Content'),
|
43 |
+
'title' => Mage::helper('customerreview')->__('Content'),
|
44 |
+
'style' => 'width:700px; height:500px;',
|
45 |
+
'wysiwyg' => false,
|
46 |
+
'required' => true,
|
47 |
+
));
|
48 |
+
|
49 |
+
if ( Mage::getSingleton('adminhtml/session')->getCustomerreviewData() )
|
50 |
+
{
|
51 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getCustomerreviewData());
|
52 |
+
Mage::getSingleton('adminhtml/session')->setCustomerreviewData(null);
|
53 |
+
} elseif ( Mage::registry('customerreview_data') ) {
|
54 |
+
$form->setValues(Mage::registry('customerreview_data')->getData());
|
55 |
+
}
|
56 |
+
return parent::_prepareForm();
|
57 |
+
}
|
58 |
+
}
|
app/code/community/Kiyoh/Customerreview/Block/Adminhtml/Customerreview/Edit/Tabs.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Kiyoh_Customerreview_Block_Adminhtml_Customerreview_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
4 |
+
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
$this->setId('customerreview_tabs');
|
10 |
+
$this->setDestElementId('edit_form');
|
11 |
+
$this->setTitle(Mage::helper('customerreview')->__('Item Information'));
|
12 |
+
}
|
13 |
+
|
14 |
+
protected function _beforeToHtml()
|
15 |
+
{
|
16 |
+
$this->addTab('form_section', array(
|
17 |
+
'label' => Mage::helper('customerreview')->__('Item Information'),
|
18 |
+
'title' => Mage::helper('customerreview')->__('Item Information'),
|
19 |
+
'content' => $this->getLayout()->createBlock('customerreview/adminhtml_customerreview_edit_tab_form')->toHtml(),
|
20 |
+
));
|
21 |
+
|
22 |
+
return parent::_beforeToHtml();
|
23 |
+
}
|
24 |
+
}
|
app/code/community/Kiyoh/Customerreview/Block/Adminhtml/Customerreview/Grid.php
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Kiyoh_Customerreview_Block_Adminhtml_Customerreview_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setId('customerreviewGrid');
|
9 |
+
$this->setDefaultSort('customerreview_id');
|
10 |
+
$this->setDefaultDir('ASC');
|
11 |
+
$this->setSaveParametersInSession(true);
|
12 |
+
}
|
13 |
+
|
14 |
+
protected function _prepareCollection()
|
15 |
+
{
|
16 |
+
$collection = Mage::getModel('customerreview/customerreview')->getCollection();
|
17 |
+
$this->setCollection($collection);
|
18 |
+
return parent::_prepareCollection();
|
19 |
+
}
|
20 |
+
|
21 |
+
protected function _prepareColumns()
|
22 |
+
{
|
23 |
+
$this->addColumn('customerreview_id', array(
|
24 |
+
'header' => Mage::helper('customerreview')->__('ID'),
|
25 |
+
'align' =>'right',
|
26 |
+
'width' => '50px',
|
27 |
+
'index' => 'customerreview_id',
|
28 |
+
));
|
29 |
+
|
30 |
+
$this->addColumn('title', array(
|
31 |
+
'header' => Mage::helper('customerreview')->__('Title'),
|
32 |
+
'align' =>'left',
|
33 |
+
'index' => 'title',
|
34 |
+
));
|
35 |
+
|
36 |
+
/*
|
37 |
+
$this->addColumn('content', array(
|
38 |
+
'header' => Mage::helper('customerreview')->__('Item Content'),
|
39 |
+
'width' => '150px',
|
40 |
+
'index' => 'content',
|
41 |
+
));
|
42 |
+
*/
|
43 |
+
|
44 |
+
$this->addColumn('status', array(
|
45 |
+
'header' => Mage::helper('customerreview')->__('Status'),
|
46 |
+
'align' => 'left',
|
47 |
+
'width' => '80px',
|
48 |
+
'index' => 'status',
|
49 |
+
'type' => 'options',
|
50 |
+
'options' => array(
|
51 |
+
1 => 'Enabled',
|
52 |
+
2 => 'Disabled',
|
53 |
+
),
|
54 |
+
));
|
55 |
+
|
56 |
+
$this->addColumn('action',
|
57 |
+
array(
|
58 |
+
'header' => Mage::helper('customerreview')->__('Action'),
|
59 |
+
'width' => '100',
|
60 |
+
'type' => 'action',
|
61 |
+
'getter' => 'getId',
|
62 |
+
'actions' => array(
|
63 |
+
array(
|
64 |
+
'caption' => Mage::helper('customerreview')->__('Edit'),
|
65 |
+
'url' => array('base'=> '*/*/edit'),
|
66 |
+
'field' => 'id'
|
67 |
+
)
|
68 |
+
),
|
69 |
+
'filter' => false,
|
70 |
+
'sortable' => false,
|
71 |
+
'index' => 'stores',
|
72 |
+
'is_system' => true,
|
73 |
+
));
|
74 |
+
|
75 |
+
$this->addExportType('*/*/exportCsv', Mage::helper('customerreview')->__('CSV'));
|
76 |
+
$this->addExportType('*/*/exportXml', Mage::helper('customerreview')->__('XML'));
|
77 |
+
|
78 |
+
return parent::_prepareColumns();
|
79 |
+
}
|
80 |
+
|
81 |
+
protected function _prepareMassaction()
|
82 |
+
{
|
83 |
+
$this->setMassactionIdField('customerreview_id');
|
84 |
+
$this->getMassactionBlock()->setFormFieldName('customerreview');
|
85 |
+
|
86 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
87 |
+
'label' => Mage::helper('customerreview')->__('Delete'),
|
88 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
89 |
+
'confirm' => Mage::helper('customerreview')->__('Are you sure?')
|
90 |
+
));
|
91 |
+
|
92 |
+
$statuses = Mage::getSingleton('customerreview/status')->getOptionArray();
|
93 |
+
|
94 |
+
array_unshift($statuses, array('label'=>'', 'value'=>''));
|
95 |
+
$this->getMassactionBlock()->addItem('status', array(
|
96 |
+
'label'=> Mage::helper('customerreview')->__('Change status'),
|
97 |
+
'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
|
98 |
+
'additional' => array(
|
99 |
+
'visibility' => array(
|
100 |
+
'name' => 'status',
|
101 |
+
'type' => 'select',
|
102 |
+
'class' => 'required-entry',
|
103 |
+
'label' => Mage::helper('customerreview')->__('Status'),
|
104 |
+
'values' => $statuses
|
105 |
+
)
|
106 |
+
)
|
107 |
+
));
|
108 |
+
return $this;
|
109 |
+
}
|
110 |
+
|
111 |
+
public function getRowUrl($row)
|
112 |
+
{
|
113 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
114 |
+
}
|
115 |
+
|
116 |
+
}
|
app/code/community/Kiyoh/Customerreview/Block/Customerreview.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Kiyoh_Customerreview_Block_Customerreview extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
public function _prepareLayout()
|
5 |
+
{
|
6 |
+
return parent::_prepareLayout();
|
7 |
+
}
|
8 |
+
|
9 |
+
public function getCustomerreview()
|
10 |
+
{
|
11 |
+
if (!$this->hasData('customerreview')) {
|
12 |
+
$this->setData('customerreview', Mage::registry('customerreview'));
|
13 |
+
}
|
14 |
+
return $this->getData('customerreview');
|
15 |
+
|
16 |
+
}
|
17 |
+
}
|
app/code/community/Kiyoh/Customerreview/Model/Customerreview.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Kiyoh_Customerreview_Model_Customerreview extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('customerreview/customerreview');
|
9 |
+
}
|
10 |
+
}
|
app/code/community/Kiyoh/Customerreview/Model/Mysql4/Customerreview.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Kiyoh_Customerreview_Model_Mysql4_Customerreview extends Mage_Core_Model_Mysql4_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
// Note that the customerreview_id refers to the key field in your database table.
|
8 |
+
$this->_init('customerreview/customerreview', 'customerreview_id');
|
9 |
+
}
|
10 |
+
}
|
app/code/community/Kiyoh/Customerreview/Model/Mysql4/Customerreview/Collection.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Kiyoh_Customerreview_Model_Mysql4_Customerreview_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('customerreview/customerreview');
|
9 |
+
}
|
10 |
+
}
|
app/code/community/Kiyoh/Customerreview/Model/Status.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Kiyoh_Customerreview_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('customerreview')->__('Enabled'),
|
12 |
+
self::STATUS_DISABLED => Mage::helper('customerreview')->__('Disabled')
|
13 |
+
);
|
14 |
+
}
|
15 |
+
}
|
app/code/community/Kiyoh/Customerreview/controllers/Adminhtml/CustomerreviewController.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Kiyoh_Customerreview_Adminhtml_CustomerreviewController extends Mage_Adminhtml_Controller_Action
|
4 |
+
{
|
5 |
+
|
6 |
+
|
7 |
+
}
|
app/code/community/Kiyoh/Customerreview/controllers/Adminhtml/Sales/Order/ShipmentController.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
require_once 'Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php';
|
3 |
|
4 |
/**
|
@@ -46,8 +47,12 @@ class Kiyoh_Customerreview_Adminhtml_Sales_Order_ShipmentController extends Mage
|
|
46 |
*/
|
47 |
public function saveAction()
|
48 |
{
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
|
|
51 |
$data = $this->getRequest()->getPost('shipment');
|
52 |
if (!empty($data['comment_text'])) {
|
53 |
Mage::getSingleton('adminhtml/session')->setCommentText($data['comment_text']);
|
@@ -75,34 +80,136 @@ class Kiyoh_Customerreview_Adminhtml_Sales_Order_ShipmentController extends Mage
|
|
75 |
|
76 |
/*********************autoreview work****************/
|
77 |
$cuId = $shipment->getData();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
$idss = $cuId['customer_id'];
|
|
|
79 |
$model = Mage::getModel('customer/customer')->load($idss);
|
80 |
-
|
81 |
$collection = $model->getCollection();
|
|
|
|
|
|
|
|
|
82 |
|
83 |
-
foreach($collection as $item)
|
84 |
-
{
|
85 |
-
$data11 = $item->getData();
|
86 |
-
}
|
87 |
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
|
91 |
|
92 |
-
if($
|
93 |
{
|
94 |
-
$connector = Mage::getStoreConfig('customconfig/review_group/custom_connector');
|
95 |
-
$action = Mage::getStoreConfig('customconfig/review_group/custom_action');
|
96 |
-
$user = Mage::getStoreConfig('customconfig/review_group/custom_user');
|
97 |
-
$delay = Mage::getStoreConfig('customconfig/review_group/custom_delay');
|
98 |
|
99 |
////call url
|
100 |
// create a new cURL resource
|
101 |
//Create a curl handle
|
102 |
-
$url = 'https://www.kiyoh.nl/set.php?user='.$
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
// create a new cURL resource
|
107 |
$curl = curl_init();
|
108 |
|
1 |
<?php
|
2 |
+
|
3 |
require_once 'Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php';
|
4 |
|
5 |
/**
|
47 |
*/
|
48 |
public function saveAction()
|
49 |
{
|
50 |
+
$kiyoh_tablePrefix = Mage::getConfig()->getTablePrefix();
|
51 |
+
$kiyoh_read = Mage::getSingleton('core/resource')->getConnection('core_read');
|
52 |
+
/**
|
53 |
+
*Find shipment configuration
|
54 |
+
*According to store Id
|
55 |
+
*/
|
56 |
$data = $this->getRequest()->getPost('shipment');
|
57 |
if (!empty($data['comment_text'])) {
|
58 |
Mage::getSingleton('adminhtml/session')->setCommentText($data['comment_text']);
|
80 |
|
81 |
/*********************autoreview work****************/
|
82 |
$cuId = $shipment->getData();
|
83 |
+
/**
|
84 |
+
*Create multisite and multistore concept
|
85 |
+
*/
|
86 |
+
/**
|
87 |
+
*define section of kiyoh configuration variable
|
88 |
+
*start coding
|
89 |
+
*/
|
90 |
+
|
91 |
+
$kiyoh_status = '';
|
92 |
+
$kiyoh_eventval='';
|
93 |
+
$kiyoh_connector = '';
|
94 |
+
$kiyoh_action = '';
|
95 |
+
$kiyoh_user = '';
|
96 |
+
$kiyoh_delay ='';
|
97 |
+
$kiyoh_eventval = '';
|
98 |
+
|
99 |
+
/**
|
100 |
+
*Create multisite and multistore concept
|
101 |
+
*/
|
102 |
+
|
103 |
+
$kiyoh_storeId = $cuId['store_id'];
|
104 |
+
|
105 |
+
/**
|
106 |
+
*core connection in magento
|
107 |
+
*/
|
108 |
+
|
109 |
+
$kiyoh_val_detail = $kiyoh_read->fetchAll("SELECT * FROM ".$kiyoh_tablePrefix."core_store where store_id = '".$kiyoh_storeId."'");
|
110 |
+
|
111 |
+
|
112 |
+
$kiyoh_websiteId = $kiyoh_val_detail[0]['website_id'];
|
113 |
+
$kiyoh_core_detail = $kiyoh_read->fetchAll("SELECT * FROM ".$kiyoh_tablePrefix."core_config_data where scope_id = '".$kiyoh_storeId."'");
|
114 |
+
|
115 |
+
|
116 |
+
|
117 |
+
foreach($kiyoh_core_detail as $value)
|
118 |
+
{
|
119 |
+
|
120 |
+
if($value['path'] == 'customconfig/review_group/custom_enable')
|
121 |
+
{
|
122 |
+
$kiyoh_status = $value['value'];
|
123 |
+
}
|
124 |
+
if($value['path'] == 'customconfig/review_group/custom_connector')
|
125 |
+
{
|
126 |
+
$kiyoh_connector = $value['value'];
|
127 |
+
}
|
128 |
+
if($value['path'] == 'customconfig/review_group/custom_action')
|
129 |
+
{
|
130 |
+
$kiyoh_action = $value['value'];
|
131 |
+
}
|
132 |
+
if($value['path'] == 'customconfig/review_group/custom_user')
|
133 |
+
{
|
134 |
+
$kiyoh_user = $value['value'];
|
135 |
+
}
|
136 |
+
if($value['path'] == 'customconfig/review_group/custom_delay')
|
137 |
+
{
|
138 |
+
$kiyoh_delay = $value['value'];
|
139 |
+
}
|
140 |
+
if($value['path'] == 'customconfig/review_group/custom_event')
|
141 |
+
{
|
142 |
+
$kiyoh_eventval = $value['value'];
|
143 |
+
}
|
144 |
+
|
145 |
+
}
|
146 |
+
|
147 |
+
if($kiyoh_status == '')
|
148 |
+
{
|
149 |
+
$kiyoh_status = Mage::getStoreConfig('customconfig/review_group/custom_enable');
|
150 |
+
}
|
151 |
+
if($kiyoh_eventval == '')
|
152 |
+
{
|
153 |
+
$kiyoh_eventval = Mage::getStoreConfig('customconfig/review_group/custom_event');
|
154 |
+
}
|
155 |
+
if($kiyoh_connector == '')
|
156 |
+
{
|
157 |
+
$kiyoh_connector = Mage::getStoreConfig('customconfig/review_group/custom_connector');
|
158 |
+
}
|
159 |
+
if($kiyoh_action == '')
|
160 |
+
{
|
161 |
+
$kiyoh_action = Mage::getStoreConfig('customconfig/review_group/custom_action');
|
162 |
+
}
|
163 |
+
if($kiyoh_user == '')
|
164 |
+
{
|
165 |
+
$kiyoh_user = Mage::getStoreConfig('customconfig/review_group/custom_user');
|
166 |
+
}
|
167 |
+
if($kiyoh_delay == '')
|
168 |
+
{
|
169 |
+
$kiyoh_delay = Mage::getStoreConfig('customconfig/review_group/custom_delay');
|
170 |
+
}
|
171 |
+
|
172 |
+
|
173 |
+
|
174 |
+
|
175 |
+
|
176 |
$idss = $cuId['customer_id'];
|
177 |
+
|
178 |
$model = Mage::getModel('customer/customer')->load($idss);
|
|
|
179 |
$collection = $model->getCollection();
|
180 |
+
foreach($collection as $item)
|
181 |
+
{
|
182 |
+
$data11 = $item->getData();
|
183 |
+
}
|
184 |
|
|
|
|
|
|
|
|
|
185 |
|
186 |
+
|
187 |
+
if($cuId['customer_id'] == '')
|
188 |
+
{
|
189 |
+
$orderidss = $cuId['order_id'];
|
190 |
+
|
191 |
+
|
192 |
+
$order = Mage::getModel('sales/order');
|
193 |
+
|
194 |
+
$dateO = $order->load($orderidss);
|
195 |
+
$detailMail = $dateO->getdata();
|
196 |
+
|
197 |
+
$kiyoh_email = $detailMail['customer_email'];
|
198 |
+
}
|
199 |
+
else
|
200 |
+
{
|
201 |
+
$kiyoh_email = $data11['email'];
|
202 |
+
}
|
203 |
|
204 |
|
205 |
|
206 |
+
if($kiyoh_eventval == 'Shipping' && $kiyoh_status =='1')
|
207 |
{
|
|
|
|
|
|
|
|
|
208 |
|
209 |
////call url
|
210 |
// create a new cURL resource
|
211 |
//Create a curl handle
|
212 |
+
$url = 'https://www.kiyoh.nl/set.php?user='.$kiyoh_user.'&connector='.$kiyoh_connector.'&action='.$kiyoh_action.'&targetMail='.$kiyoh_email.'&delay='.$kiyoh_delay;
|
|
|
|
|
|
|
213 |
// create a new cURL resource
|
214 |
$curl = curl_init();
|
215 |
|
app/code/community/Kiyoh/Customerreview/controllers/IndexController.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Kiyoh_Customerreview_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
public function indexAction()
|
5 |
+
{
|
6 |
+
|
7 |
+
/*
|
8 |
+
* Load an object by id
|
9 |
+
* Request looking like:
|
10 |
+
* http://site.com/customerreview?id=15
|
11 |
+
* or
|
12 |
+
* http://site.com/customerreview/id/15
|
13 |
+
*/
|
14 |
+
/*
|
15 |
+
$customerreview_id = $this->getRequest()->getParam('id');
|
16 |
+
|
17 |
+
if($customerreview_id != null && $customerreview_id != '') {
|
18 |
+
$customerreview = Mage::getModel('customerreview/customerreview')->load($customerreview_id)->getData();
|
19 |
+
} else {
|
20 |
+
$customerreview = null;
|
21 |
+
}
|
22 |
+
*/
|
23 |
+
|
24 |
+
/*
|
25 |
+
* If no param we load a the last created item
|
26 |
+
*/
|
27 |
+
/*
|
28 |
+
if($customerreview == null) {
|
29 |
+
$resource = Mage::getSingleton('core/resource');
|
30 |
+
$read= $resource->getConnection('core_read');
|
31 |
+
$customerreviewTable = $resource->getTableName('customerreview');
|
32 |
+
|
33 |
+
$select = $read->select()
|
34 |
+
->from($customerreviewTable,array('customerreview_id','title','content','status'))
|
35 |
+
->where('status',1)
|
36 |
+
->order('created_time DESC') ;
|
37 |
+
|
38 |
+
$customerreview = $read->fetchRow($select);
|
39 |
+
}
|
40 |
+
Mage::register('customerreview', $customerreview);
|
41 |
+
*/
|
42 |
+
|
43 |
+
|
44 |
+
$this->loadLayout();
|
45 |
+
$this->renderLayout();
|
46 |
+
}
|
47 |
+
}
|
app/code/community/Kiyoh/Customerreview/etc/system.xml
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
</tabs>
|
9 |
<sections>
|
10 |
<customconfig module="customerreview" translate="label">
|
11 |
-
<label>
|
12 |
<sort_order>200</sort_order>
|
13 |
<show_in_default>1</show_in_default>
|
14 |
<show_in_website>1</show_in_website>
|
@@ -48,9 +48,9 @@
|
|
48 |
|
49 |
<frontend_type>hidden</frontend_type>
|
50 |
<sort_order>2</sort_order>
|
51 |
-
<show_in_default>
|
52 |
-
<show_in_website>
|
53 |
-
<show_in_store>
|
54 |
|
55 |
</custom_action>
|
56 |
<custom_user translate="label tooltip comment">
|
8 |
</tabs>
|
9 |
<sections>
|
10 |
<customconfig module="customerreview" translate="label">
|
11 |
+
<label>Kiyoh beoordelingen</label>
|
12 |
<sort_order>200</sort_order>
|
13 |
<show_in_default>1</show_in_default>
|
14 |
<show_in_website>1</show_in_website>
|
48 |
|
49 |
<frontend_type>hidden</frontend_type>
|
50 |
<sort_order>2</sort_order>
|
51 |
+
<show_in_default>0</show_in_default>
|
52 |
+
<show_in_website>0</show_in_website>
|
53 |
+
<show_in_store>0</show_in_store>
|
54 |
|
55 |
</custom_action>
|
56 |
<custom_user translate="label tooltip comment">
|
app/design/frontend/default/default/layout/customerreview.xml
CHANGED
@@ -8,12 +8,8 @@
|
|
8 |
</reference>
|
9 |
</customerreview_index_index>
|
10 |
<checkout_onepage_success translate="label">
|
11 |
-
|
12 |
-
|
13 |
-
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
|
14 |
-
</reference>
|
15 |
-
<reference name="content">
|
16 |
-
<block type="checkout/onepage_success" name="checkout.success" template="kiyohcheckout/success.phtml"/>
|
17 |
</reference>
|
18 |
</checkout_onepage_success>
|
19 |
</layout>
|
8 |
</reference>
|
9 |
</customerreview_index_index>
|
10 |
<checkout_onepage_success translate="label">
|
11 |
+
<reference name="content">
|
12 |
+
<block type="checkout/onepage_success" name="checkout.success1" template="kiyohcheckout/success.phtml"/>
|
|
|
|
|
|
|
|
|
13 |
</reference>
|
14 |
</checkout_onepage_success>
|
15 |
</layout>
|
app/design/frontend/default/default/template/kiyohcheckout/success.phtml
CHANGED
@@ -25,28 +25,154 @@
|
|
25 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
26 |
*/
|
27 |
/***************connect***************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
if (Mage::isInstalled() && Mage::getSingleton('customer/session')->isLoggedIn()) {
|
29 |
$this->_data['email'] = $this->__($this->htmlEscape(Mage::getSingleton('customer/session')->getCustomer()->getEmail()));
|
30 |
}
|
31 |
$email = $this->_data['email'];
|
32 |
-
$eventval = Mage::getStoreConfig('customconfig/review_group/custom_event');
|
33 |
-
$status = Mage::getStoreConfig('customconfig/review_group/custom_enable');
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
-
|
|
|
|
|
|
|
|
|
37 |
{
|
38 |
-
$
|
39 |
-
$
|
40 |
-
$
|
41 |
-
|
|
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
////call url
|
45 |
|
46 |
// create a new cURL resource
|
|
|
47 |
|
48 |
// Create a curl handle
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
|
52 |
|
@@ -87,42 +213,4 @@ curl_close($ch);
|
|
87 |
/***************connect***************/
|
88 |
|
89 |
?>
|
90 |
-
|
91 |
-
<div class="page-title">
|
92 |
-
<h1><?php echo $this->__('Your order has been received') ?></h1>
|
93 |
-
</div>
|
94 |
-
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
95 |
-
<h2 class="sub-title"><?php echo $this->__('Thank you for your purchase!') ?></h2>
|
96 |
-
|
97 |
-
<?php if ($this->getOrderId()):?>
|
98 |
-
<?php if ($this->getCanViewOrder()) :?>
|
99 |
-
<p><?php echo $this->__('Your order # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getViewOrderUrl()), $this->escapeHtml($this->getOrderId()))) ?></p>
|
100 |
-
<?php else :?>
|
101 |
-
<p><?php echo $this->__('Your order # is: %s.', $this->escapeHtml($this->getOrderId())) ?>.</p>
|
102 |
-
<?php endif;?>
|
103 |
-
<p><?php echo $this->__('You will receive an order confirmation email with details of your order and a link to track its progress.') ?></p>
|
104 |
-
<?php if ($this->getViewOrder() && $this->getCanPrintOrder()) :?>
|
105 |
-
<p>
|
106 |
-
<?php echo $this->__('Click <a href="%s" onclick="this.target=\'_blank\'">here to print</a> a copy of your order confirmation.', $this->getPrintUrl()) ?>
|
107 |
-
<?php echo $this->getChildHtml() ?>
|
108 |
-
</p>
|
109 |
-
<?php endif;?>
|
110 |
-
<?php endif;?>
|
111 |
-
|
112 |
-
<?php if ($this->getAgreementRefId()): ?>
|
113 |
-
<p><?php echo $this->__('Your billing agreement # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getAgreementUrl()), $this->escapeHtml($this->getAgreementRefId())))?></p>
|
114 |
-
<?php endif;?>
|
115 |
-
|
116 |
-
<?php if ($profiles = $this->getRecurringProfiles()):?>
|
117 |
-
<p><?php echo $this->__('Your recurring payment profiles:'); ?></p>
|
118 |
-
<ul class="disc">
|
119 |
-
<?php foreach($profiles as $profile):?>
|
120 |
-
<?php $profileIdHtml = ($this->getCanViewProfiles() ? sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getProfileUrl($profile)), $this->escapeHtml($this->getObjectData($profile, 'reference_id'))) : $this->escapeHtml($this->getObjectData($profile, 'reference_id')));?>
|
121 |
-
<li><?php echo $this->__('Payment profile # %s: "%s".', $profileIdHtml, $this->escapeHtml($this->getObjectData($profile, 'schedule_description')))?></li>
|
122 |
-
<?php endforeach;?>
|
123 |
-
</ul>
|
124 |
-
<?php endif;?>
|
125 |
-
|
126 |
-
<div class="buttons-set">
|
127 |
-
<button type="button" class="button" title="<?php echo $this->__('Continue Shopping') ?>" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
|
128 |
-
</div>
|
25 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
26 |
*/
|
27 |
/***************connect***************/
|
28 |
+
/**
|
29 |
+
*getting database connection instance
|
30 |
+
*/
|
31 |
+
$kiyoh_read = Mage::getSingleton('core/resource')->getConnection('core_read');
|
32 |
+
/**
|
33 |
+
*getting database connection instance
|
34 |
+
*/
|
35 |
+
/**
|
36 |
+
*Getting table prefix
|
37 |
+
*Of database
|
38 |
+
*/
|
39 |
+
$kiyoh_tablePrefix = Mage::getConfig()->getTablePrefix();
|
40 |
+
/**
|
41 |
+
*Getting table prefix
|
42 |
+
*Of database
|
43 |
+
*/
|
44 |
+
|
45 |
if (Mage::isInstalled() && Mage::getSingleton('customer/session')->isLoggedIn()) {
|
46 |
$this->_data['email'] = $this->__($this->htmlEscape(Mage::getSingleton('customer/session')->getCustomer()->getEmail()));
|
47 |
}
|
48 |
$email = $this->_data['email'];
|
|
|
|
|
49 |
|
50 |
+
/**
|
51 |
+
*Support to multidomain code
|
52 |
+
*Start to multidomain
|
53 |
+
*/
|
54 |
+
$kiyoh_multicount = 'false';
|
55 |
+
/*$_SERVER['MAGE_RUN_CODE'] = 'domain1_com';
|
56 |
+
$_SERVER['MAGE_RUN_TYPE'] = 'website';
|
57 |
+
*/
|
58 |
+
|
59 |
+
if(!isset($_SERVER['MAGE_RUN_CODE']) && !isset($_SERVER['MAGE_RUN_TYPE']))
|
60 |
+
{
|
61 |
+
$kiyoh_eventval = Mage::getStoreConfig('customconfig/review_group/custom_event');
|
62 |
+
$kiyoh_status = Mage::getStoreConfig('customconfig/review_group/custom_enable');
|
63 |
+
}
|
64 |
+
else
|
65 |
+
{
|
66 |
+
if($_SERVER['MAGE_RUN_TYPE'] == 'website')
|
67 |
+
{
|
68 |
|
69 |
+
$kiyoh_results = $kiyoh_read->fetchAll("SELECT website_id FROM ".$kiyoh_tablePrefix."core_website where code = '".$_SERVER['MAGE_RUN_CODE']."'");
|
70 |
+
$kiyoh_websiteId = $kiyoh_results[0]['website_id'];
|
71 |
+
$kiyoh_multicount = 'true';
|
72 |
+
}
|
73 |
+
if($_SERVER['MAGE_RUN_TYPE'] == 'store')
|
74 |
{
|
75 |
+
$kiyoh_results = $kiyoh_read->fetchAll("SELECT store_id FROM ".$kiyoh_tablePrefix."core_store where code = '".$_SERVER['MAGE_RUN_CODE']."'");
|
76 |
+
$kiyoh_websiteId = $kiyoh_results[0]['store_id'];
|
77 |
+
$kiyoh_multicount = 'true';
|
78 |
+
}
|
79 |
+
}
|
80 |
|
81 |
+
/**
|
82 |
+
*Block To Find kiyoh setting for present store
|
83 |
+
*/
|
84 |
+
|
85 |
+
if($kiyoh_multicount == 'true')
|
86 |
+
{
|
87 |
+
$kiyoh_findTocoreconfig = $kiyoh_read->fetchAll("SELECT * FROM ".$kiyoh_tablePrefix."core_config_data where scope_id = ".$kiyoh_websiteId);
|
88 |
+
foreach($kiyoh_findTocoreconfig as $value)
|
89 |
+
{
|
90 |
+
if($value['path'] == 'customconfig/review_group/custom_enable')
|
91 |
+
{
|
92 |
+
$kiyoh_status = $value['value'];
|
93 |
+
}
|
94 |
+
if($value['path'] == 'customconfig/review_group/custom_connector')
|
95 |
+
{
|
96 |
+
$kiyoh_connector = $value['value'];
|
97 |
+
}
|
98 |
+
if($value['path'] == 'customconfig/review_group/custom_action')
|
99 |
+
{
|
100 |
+
$kiyoh_action = $value['value'];
|
101 |
+
}
|
102 |
+
if($value['path'] == 'customconfig/review_group/custom_user')
|
103 |
+
{
|
104 |
+
$kiyoh_user = $value['value'];
|
105 |
+
}
|
106 |
+
if($value['path'] == 'customconfig/review_group/custom_delay')
|
107 |
+
{
|
108 |
+
$kiyoh_delay = $value['value'];
|
109 |
+
}
|
110 |
+
if($value['path'] == 'customconfig/review_group/custom_event')
|
111 |
+
{
|
112 |
+
$kiyoh_eventval = $value['value'];
|
113 |
+
}
|
114 |
+
}
|
115 |
+
}
|
116 |
+
if(!isset($kiyoh_connector))
|
117 |
+
{
|
118 |
+
$kiyoh_connector = Mage::getStoreConfig('customconfig/review_group/custom_connector');
|
119 |
+
}
|
120 |
+
if(!isset($kiyoh_action))
|
121 |
+
{
|
122 |
+
$kiyoh_action = Mage::getStoreConfig('customconfig/review_group/custom_action');
|
123 |
+
}
|
124 |
+
if(!isset($kiyoh_user))
|
125 |
+
{
|
126 |
+
$kiyoh_user = Mage::getStoreConfig('customconfig/review_group/custom_user');
|
127 |
+
}
|
128 |
+
if(!isset($kiyoh_delay))
|
129 |
+
{
|
130 |
+
$kiyoh_delay = Mage::getStoreConfig('customconfig/review_group/custom_delay');
|
131 |
+
}
|
132 |
+
if(!isset($kiyoh_eventval))
|
133 |
+
{
|
134 |
+
$kiyoh_eventval = Mage::getStoreConfig('customconfig/review_group/custom_event');
|
135 |
+
}
|
136 |
+
if(!isset($kiyoh_status))
|
137 |
+
{
|
138 |
+
$kiyoh_status = Mage::getStoreConfig('customconfig/review_group/custom_enable');
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
*Block To Find kiyoh setting for present store
|
143 |
+
*/
|
144 |
+
|
145 |
+
if($kiyoh_eventval == 'Purchase' && $kiyoh_status == '1')
|
146 |
+
{
|
147 |
|
148 |
////call url
|
149 |
|
150 |
// create a new cURL resource
|
151 |
+
|
152 |
|
153 |
// Create a curl handle
|
154 |
+
|
155 |
+
/**
|
156 |
+
*Find Guest Email address
|
157 |
+
*/
|
158 |
+
if($email == '')
|
159 |
+
{
|
160 |
+
$_customerId = Mage::getSingleton('customer/session')->getCustomerId();
|
161 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
162 |
+
$lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
|
163 |
+
$order = Mage::getSingleton('sales/order');
|
164 |
+
$order->load($lastOrderId);
|
165 |
+
$_totalData = $order->getData();
|
166 |
+
$_details = $customer->getData();
|
167 |
+
|
168 |
+
$email = $_totalData['customer_email']; //Retrieves guest e-mail
|
169 |
+
// $name = $order->getBillingAddress()->getName(); //Retrieves guest name
|
170 |
+
}
|
171 |
+
|
172 |
+
|
173 |
+
|
174 |
+
|
175 |
+
$url = 'https://www.kiyoh.nl/set.php?user='.$kiyoh_user.'&connector='.$kiyoh_connector.'&action='.$kiyoh_action.'&targetMail='.$email.'&delay='.$kiyoh_delay;
|
176 |
|
177 |
|
178 |
|
213 |
/***************connect***************/
|
214 |
|
215 |
?>
|
216 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>kiyoh_customerreview</name>
|
4 |
-
<version>1.6.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>KiyOh.nl-gebruikers kunnen met deze plug-in automatisch klantbeoordelingen verzamelen, publiceren en delen in social media. Wanneer een klant een bestelling heeft gemaakt in uw Magento Shop, wordt een e-mail uitnodiging automatisch na een paar dagen verstuurd om u te beoordelen. De e-mail wordt uit naam en e-mailadres van uw organisatie gestuurd, zodat uw klanten u herkennen. De e-mail tekst is aanpasbaar en bevat een persoonlijke en veilige link naar de pagina om te beoordelen. Vanaf nu worden de beoordelingen dus automatisch verzameld, gepubliceerd en gedeeld. Dat is nog eens handig!</description>
|
11 |
<notes>KiyOh.nl-gebruikers kunnen met deze plug-in automatisch klantbeoordelingen verzamelen, publiceren en delen in social media. Wanneer een klant een bestelling heeft gemaakt in uw Magento Shop, wordt een e-mail uitnodiging automatisch na een paar dagen verstuurd om u te beoordelen. De e-mail wordt uit naam en e-mailadres van uw organisatie gestuurd, zodat uw klanten u herkennen. De e-mail tekst is aanpasbaar en bevat een persoonlijke en veilige link naar de pagina om te beoordelen. Vanaf nu worden de beoordelingen dus automatisch verzameld, gepubliceerd en gedeeld. Dat is nog eens handig!</notes>
|
12 |
<authors><author><name>kiyoh_m</name><user>auto-converted</user><email>kiyoh.autoreview@gmail.com</email></author></authors>
|
13 |
-
<date>2011-
|
14 |
-
<time>
|
15 |
-
<contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="Kiyoh"><dir name="Customerreview"><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Reviewevents.php" hash="ebcb4f837723a3e1cd7d3e0996fa81ca"/></dir></dir></dir></dir></dir><dir name="
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>kiyoh_customerreview</name>
|
4 |
+
<version>1.6.6.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
10 |
<description>KiyOh.nl-gebruikers kunnen met deze plug-in automatisch klantbeoordelingen verzamelen, publiceren en delen in social media. Wanneer een klant een bestelling heeft gemaakt in uw Magento Shop, wordt een e-mail uitnodiging automatisch na een paar dagen verstuurd om u te beoordelen. De e-mail wordt uit naam en e-mailadres van uw organisatie gestuurd, zodat uw klanten u herkennen. De e-mail tekst is aanpasbaar en bevat een persoonlijke en veilige link naar de pagina om te beoordelen. Vanaf nu worden de beoordelingen dus automatisch verzameld, gepubliceerd en gedeeld. Dat is nog eens handig!</description>
|
11 |
<notes>KiyOh.nl-gebruikers kunnen met deze plug-in automatisch klantbeoordelingen verzamelen, publiceren en delen in social media. Wanneer een klant een bestelling heeft gemaakt in uw Magento Shop, wordt een e-mail uitnodiging automatisch na een paar dagen verstuurd om u te beoordelen. De e-mail wordt uit naam en e-mailadres van uw organisatie gestuurd, zodat uw klanten u herkennen. De e-mail tekst is aanpasbaar en bevat een persoonlijke en veilige link naar de pagina om te beoordelen. Vanaf nu worden de beoordelingen dus automatisch verzameld, gepubliceerd en gedeeld. Dat is nog eens handig!</notes>
|
12 |
<authors><author><name>kiyoh_m</name><user>auto-converted</user><email>kiyoh.autoreview@gmail.com</email></author></authors>
|
13 |
+
<date>2011-07-16</date>
|
14 |
+
<time>01:14:05</time>
|
15 |
+
<contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="Kiyoh"><dir name="Customerreview"><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Reviewevents.php" hash="ebcb4f837723a3e1cd7d3e0996fa81ca"/></dir></dir></dir></dir></dir><dir name="Block"><dir name="Adminhtml"><dir name="Customerreview"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="a50cb6d28768e5a0161753a0ed360cb5"/></dir><file name="Form.php" hash="f852059f7d07e8d0a93c65359d79cd08"/><file name="Tabs.php" hash="11eb0974977b5b27004e5b015d46680b"/></dir><file name="Edit.php" hash="673f999d1aa63b9477769a97d816f3e1"/><file name="Grid.php" hash="2ee706abce845bc76b9afadca49aacda"/></dir><file name="Customerreview.php" hash="b18441bf48af3c809d68193b0e31e4a6"/></dir><file name="Customerreview.php" hash="be8fa564fc669477445c9d8d1c7fba5c"/></dir><dir name="Helper"><file name="Data.php" hash="fda5c34b4da4ade55e107f88fc7c6287"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Customerreview"><file name="Collection.php" hash="d5a6959c3f95e2c72742512b7a5ffc77"/></dir><file name="Customerreview.php" hash="b61962026b3eec52549160689f3ea106"/></dir><file name="Customerreview.php" hash="fb2f4a070079adce2670b871c1a4cd6a"/><file name="Status.php" hash="8f23938b83ae9fa9cd404c99aa5716e7"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="ShipmentController.php" hash="2c5d783e8071bbc818218e7a132d74cc"/></dir></dir><file name="CustomerreviewController.php" hash="97e3276700572cb2470f1c33011cd783"/></dir><file name="IndexController.php" hash="2c3974763eac5929e0610afeb7fe252f"/></dir><dir name="etc"><file name="adminhtml.xml" hash="6cf979d01f8317d9dd7a177747ab24f2"/><file name="config.xml" hash="1eb598985cdc2d0d5c79a5b3c5e66cee"/><file name="system.xml" hash="b82856ce2cd2e3af37cabe7a844fe83d"/></dir></dir></dir></dir></dir><dir name="design"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="customerreview.xml" hash="6243b98b49e4a1da50b0dae968b4d171"/></dir><dir name="template"><dir name="customerreview"><file name="customerreview.phtml" hash="c692037d1baf7c41be15ff9a2b0e126e"/></dir><dir name="kiyohcheckout"><file name="success.phtml" hash="6eee2cad002a5c947daad23efa803ef1"/></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Kiyoh_Customerreview.xml" hash="bbaf093738bc2b0835c48341a8849acb"/></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|