Version Notes
First stable release
Download this release
Release Info
Developer | Magento Core Team |
Extension | Magmodules_Feedbackcompany |
Version | 1.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.3.0 to 1.3.1
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbacklog.php +1 -2
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbacklog/Grid.php +2 -0
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Buttons/{Test.php → Productreviews.php} +10 -8
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Grid/Log.php +8 -0
- app/code/community/Magmodules/Feedbackcompany/Model/Api.php +120 -32
- app/code/community/Magmodules/Feedbackcompany/Model/Log.php +21 -10
- app/code/community/Magmodules/Feedbackcompany/Model/Observer.php +21 -0
- app/code/community/Magmodules/Feedbackcompany/Model/Productreviews.php +105 -0
- app/code/community/Magmodules/Feedbackcompany/Model/Reviews.php +69 -0
- app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Reviewrating.php +33 -0
- app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Reviewstatus.php +28 -0
- app/code/community/Magmodules/Feedbackcompany/controllers/Adminhtml/FeedbacklogController.php +7 -12
- app/code/community/Magmodules/Feedbackcompany/controllers/Adminhtml/FeedbackreviewsController.php +52 -11
- app/code/community/Magmodules/Feedbackcompany/etc/config.xml +5 -1
- app/code/community/Magmodules/Feedbackcompany/etc/system.xml +141 -39
- app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-upgrade-1.3.0-1.3.1.php +26 -0
- app/locale/en_US/Magmodules_Feedbackcompany.csv +17 -6
- app/locale/nl_NL/Magmodules_Feedbackcompany.csv +21 -8
- package.xml +4 -4
- skin/frontend/base/default/magmodules/feedbackcompany/sidebar.css +44 -167
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbacklog.php
CHANGED
@@ -28,10 +28,9 @@ class Magmodules_Feedbackcompany_Block_Adminhtml_Feedbacklog extends Mage_Adminh
|
|
28 |
parent::__construct();
|
29 |
$this->_removeButton('add');
|
30 |
|
31 |
-
$this->_addButton('
|
32 |
'label' => Mage::helper('feedbackcompany')->__('Cleanup Log'),
|
33 |
'onclick' => "setLocation('{$this->getUrl('adminhtml/feedbacklog/clean')}')",
|
34 |
-
'confirm' => Mage::helper('feedbackcompany')->__('Are you sure you want to cleanup logfiles?'),
|
35 |
));
|
36 |
|
37 |
}
|
28 |
parent::__construct();
|
29 |
$this->_removeButton('add');
|
30 |
|
31 |
+
$this->_addButton('feedbackcompany_log', array(
|
32 |
'label' => Mage::helper('feedbackcompany')->__('Cleanup Log'),
|
33 |
'onclick' => "setLocation('{$this->getUrl('adminhtml/feedbacklog/clean')}')",
|
|
|
34 |
));
|
35 |
|
36 |
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbacklog/Grid.php
CHANGED
@@ -51,6 +51,7 @@ class Magmodules_Feedbackcompany_Block_Adminhtml_Feedbacklog_Grid extends Mage_A
|
|
51 |
'type' => 'options',
|
52 |
'options'=> array(
|
53 |
'reviews' => Mage::helper('feedbackcompany')->__('Reviews'),
|
|
|
54 |
'invitation' => Mage::helper('feedbackcompany')->__('Invitation Call'),
|
55 |
),
|
56 |
));
|
@@ -84,6 +85,7 @@ class Magmodules_Feedbackcompany_Block_Adminhtml_Feedbacklog_Grid extends Mage_A
|
|
84 |
'' => Mage::helper('feedbackcompany')->__('Manual'),
|
85 |
'stats' => Mage::helper('feedbackcompany')->__('Stats Cron'),
|
86 |
'reviews' => Mage::helper('feedbackcompany')->__('Reviews Cron'),
|
|
|
87 |
'orderupdate' => Mage::helper('feedbackcompany')->__('Invitation'),
|
88 |
),
|
89 |
));
|
51 |
'type' => 'options',
|
52 |
'options'=> array(
|
53 |
'reviews' => Mage::helper('feedbackcompany')->__('Reviews'),
|
54 |
+
'productreviews'=> Mage::helper('feedbackcompany')->__('Productreviews'),
|
55 |
'invitation' => Mage::helper('feedbackcompany')->__('Invitation Call'),
|
56 |
),
|
57 |
));
|
85 |
'' => Mage::helper('feedbackcompany')->__('Manual'),
|
86 |
'stats' => Mage::helper('feedbackcompany')->__('Stats Cron'),
|
87 |
'reviews' => Mage::helper('feedbackcompany')->__('Reviews Cron'),
|
88 |
+
'productreviews'=> Mage::helper('feedbackcompany')->__('Producteviews Cron'),
|
89 |
'orderupdate' => Mage::helper('feedbackcompany')->__('Invitation'),
|
90 |
),
|
91 |
));
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Buttons/{Test.php → Productreviews.php}
RENAMED
@@ -19,17 +19,19 @@
|
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
22 |
-
class
|
23 |
-
|
24 |
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
|
25 |
$this->setElement($element);
|
26 |
-
$url = $this->getUrl('*/feedbackreviews/
|
|
|
27 |
$html = $this->getLayout()->createBlock('adminhtml/widget_button')
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
33 |
return $html;
|
34 |
}
|
35 |
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
22 |
+
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Buttons_Productreviews extends Mage_Adminhtml_Block_System_Config_Form_Field {
|
23 |
+
|
24 |
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
|
25 |
$this->setElement($element);
|
26 |
+
$url = $this->getUrl('*/feedbackreviews/productreviews');
|
27 |
+
|
28 |
$html = $this->getLayout()->createBlock('adminhtml/widget_button')
|
29 |
+
->setType('button')
|
30 |
+
->setClass('scalable')
|
31 |
+
->setLabel(Mage::helper('feedbackcompany')->__('Process Manually'))
|
32 |
+
->setOnClick("setLocation('$url')")
|
33 |
+
->toHtml();
|
34 |
+
|
35 |
return $html;
|
36 |
}
|
37 |
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Grid/Log.php
CHANGED
@@ -44,6 +44,14 @@ class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Grid_Log extends Mage_Ad
|
|
44 |
$msg .= Mage::helper('feedbackcompany')->__('total score updated');
|
45 |
}
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
if($type == 'invitation') {
|
48 |
if($row->getOrderId()) {
|
49 |
$order = Mage::getModel('sales/order')->load($row->getOrderId());
|
44 |
$msg .= Mage::helper('feedbackcompany')->__('total score updated');
|
45 |
}
|
46 |
|
47 |
+
if($type == 'productreviews') {
|
48 |
+
if($row->getReviewNew() > 0) {
|
49 |
+
$msg = Mage::helper('feedbackcompany')->__('%s new productreview(s) imported', $row->getReviewNew());
|
50 |
+
} else {
|
51 |
+
$msg = '';
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
if($type == 'invitation') {
|
56 |
if($row->getOrderId()) {
|
57 |
$order = Mage::getModel('sales/order')->load($row->getOrderId());
|
app/code/community/Magmodules/Feedbackcompany/Model/Api.php
CHANGED
@@ -27,35 +27,67 @@ class Magmodules_Feedbackcompany_Model_Api extends Mage_Core_Model_Abstract {
|
|
27 |
$results = Mage::getModel('feedbackcompany/reviews')->processFeed($feed, $storeid, $type);
|
28 |
$results['stats'] = Mage::getModel('feedbackcompany/stats')->processFeed($feed, $storeid);
|
29 |
return $results;
|
30 |
-
} else {
|
31 |
-
return false;
|
32 |
}
|
|
|
33 |
}
|
34 |
|
35 |
-
public function getFeed($storeid, $type = '')
|
36 |
{
|
37 |
-
$
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
$
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
} else {
|
54 |
-
|
|
|
|
|
55 |
}
|
56 |
} else {
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
60 |
|
61 |
public function sendInvitation($order)
|
@@ -222,19 +254,75 @@ class Magmodules_Feedbackcompany_Model_Api extends Mage_Core_Model_Abstract {
|
|
222 |
return false;
|
223 |
}
|
224 |
|
225 |
-
public function getStoreIds()
|
226 |
{
|
227 |
-
$store_ids =
|
228 |
$stores = Mage::getModel('core/store')->getCollection();
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
$
|
234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
}
|
|
|
236 |
}
|
237 |
-
return $store_ids;
|
238 |
}
|
239 |
|
240 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
$results = Mage::getModel('feedbackcompany/reviews')->processFeed($feed, $storeid, $type);
|
28 |
$results['stats'] = Mage::getModel('feedbackcompany/stats')->processFeed($feed, $storeid);
|
29 |
return $results;
|
|
|
|
|
30 |
}
|
31 |
+
return false;
|
32 |
}
|
33 |
|
34 |
+
public function getFeed($storeid, $type = '', $interval = '')
|
35 |
{
|
36 |
+
if($type == 'productreviews') {
|
37 |
+
$result = array();
|
38 |
+
$client_token = Mage::getStoreConfig('feedbackcompany/productreviews/client_token', $storeid);
|
39 |
+
if(!$client_token) {
|
40 |
+
$client_token = $this->getOauthToken($storeid);
|
41 |
+
if($client_token['status'] == 'ERROR') {
|
42 |
+
return $client_token;
|
43 |
+
} else {
|
44 |
+
$client_token = $client_token['client_token'];
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
$request = curl_init();
|
49 |
+
curl_setopt($request, CURLOPT_SSL_VERIFYPEER, false);
|
50 |
+
curl_setopt($request, CURLOPT_URL, 'https://beoordelingen.feedbackcompany.nl/api/v1/review/getrecent/?interval=' . $interval . '&type=product');
|
51 |
+
curl_setopt($request, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $client_token));
|
52 |
+
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
|
53 |
+
$api_result = json_decode($content = curl_exec($request));
|
54 |
+
if($api_result) {
|
55 |
+
if($api_result->message == 'OK') {
|
56 |
+
$result['status'] = 'OK';
|
57 |
+
$result['feed'] = $api_result->data[0];
|
58 |
+
return $result;
|
59 |
+
} else {
|
60 |
+
$config = new Mage_Core_Model_Config();
|
61 |
+
$config->saveConfig('feedbackcompany/productreviews/client_token', '', 'stores', $storeid);
|
62 |
+
Mage::app()->getCacheInstance()->cleanType('config');
|
63 |
+
$result['status'] = 'ERROR';
|
64 |
+
$result['error'] = $api_result->error;
|
65 |
+
return $result;
|
66 |
+
}
|
67 |
} else {
|
68 |
+
$result['status'] = 'ERROR';
|
69 |
+
$result['error'] = Mage::helper('feedbackcompany')->__('Error connect to the API.');
|
70 |
+
return $result;
|
71 |
}
|
72 |
} else {
|
73 |
+
$api_id = trim(Mage::getStoreConfig('feedbackcompany/general/api_id', $storeid));
|
74 |
+
if($type == 'stats') {
|
75 |
+
$api_url = 'https://beoordelingen.feedbackcompany.nl/samenvoordeel/scripts/flexreview/getreviewxml.cfm?ws=' . $api_id . '&publishDetails=0&nor=0&Basescore=10';
|
76 |
+
}
|
77 |
+
if($type == 'reviews') {
|
78 |
+
$api_url = 'https://beoordelingen.feedbackcompany.nl/samenvoordeel/scripts/flexreview/getreviewxml.cfm?ws=' . $api_id . '&publishIDs=1&nor=50&publishDetails=1&publishOnHold=0&sort=desc&emlpass=test&publishCompResponse=1&Basescore=10';
|
79 |
+
}
|
80 |
+
if($type == 'history') {
|
81 |
+
$api_url = 'https://beoordelingen.feedbackcompany.nl/samenvoordeel/scripts/flexreview/getreviewxml.cfm?ws=' . $api_id . '&publishIDs=1&nor=5000&publishDetails=1&publishOnHold=0&sort=desc&emlpass=test&publishCompResponse=1&Basescore=10';
|
82 |
+
}
|
83 |
+
if($api_id) {
|
84 |
+
$xml = simplexml_load_file($api_url);
|
85 |
+
if($xml) {
|
86 |
+
return $xml;
|
87 |
+
}
|
88 |
+
}
|
89 |
+
}
|
90 |
+
return false;
|
91 |
}
|
92 |
|
93 |
public function sendInvitation($order)
|
254 |
return false;
|
255 |
}
|
256 |
|
257 |
+
public function getStoreIds($type = '')
|
258 |
{
|
259 |
+
$store_ids = array();
|
260 |
$stores = Mage::getModel('core/store')->getCollection();
|
261 |
+
if($type == 'oauth') {
|
262 |
+
foreach ($stores as $store) {
|
263 |
+
if($store->getIsActive()) {
|
264 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/productreviews/enabled', $store->getId());
|
265 |
+
$client_id = Mage::getStoreConfig('feedbackcompany/productreviews/client_id', $store->getId());
|
266 |
+
if($enabled && $client_id) {
|
267 |
+
$store_ids[] = $store->getId();
|
268 |
+
}
|
269 |
+
}
|
270 |
+
}
|
271 |
+
return $store_ids;
|
272 |
+
} else {
|
273 |
+
$api_ids = array();
|
274 |
+
foreach ($stores as $store) {
|
275 |
+
if($store->getIsActive()) {
|
276 |
+
$api_id = Mage::getStoreConfig('feedbackcompany/general/api_id', $store->getId());
|
277 |
+
if(!in_array($api_id, $api_ids)) {
|
278 |
+
$api_ids[] = $api_id; $store_ids[] = $store->getId();
|
279 |
+
}
|
280 |
+
}
|
281 |
}
|
282 |
+
return $store_ids;
|
283 |
}
|
|
|
284 |
}
|
285 |
|
286 |
+
public function getOauthToken($storeid)
|
287 |
+
{
|
288 |
+
$client_id = Mage::getStoreConfig('feedbackcompany/productreviews/client_id', $storeid);
|
289 |
+
$client_secret = Mage::getStoreConfig('feedbackcompany/productreviews/client_secret', $storeid);
|
290 |
+
$result = array();
|
291 |
+
if(!empty($client_id) && !empty($client_secret)) {
|
292 |
+
$url = "https://beoordelingen.feedbackcompany.nl/api/v1/oauth2/token";
|
293 |
+
$get_array = array("client_id" => $client_id, "client_secret" => $client_secret, "grant_type" => "authorization_code");
|
294 |
+
$feedbackconnect = curl_init($url . '?' . http_build_query($get_array));
|
295 |
+
curl_setopt($feedbackconnect, CURLOPT_VERBOSE, 1);
|
296 |
+
curl_setopt($feedbackconnect, CURLOPT_FAILONERROR, false);
|
297 |
+
curl_setopt($feedbackconnect, CURLOPT_HEADER, 0);
|
298 |
+
curl_setopt($feedbackconnect, CURLOPT_FOLLOWLOCATION, 1);
|
299 |
+
curl_setopt($feedbackconnect, CURLOPT_RETURNTRANSFER, 1);
|
300 |
+
curl_setopt($feedbackconnect, CURLOPT_SSL_VERIFYPEER, false);
|
301 |
+
$response = curl_exec($feedbackconnect);
|
302 |
+
curl_close($feedbackconnect);
|
303 |
+
$response = json_decode($response);
|
304 |
+
if(isset($response->access_token)) {
|
305 |
+
$store_ids = Mage::getModel('feedbackcompany/productreviews')->getAllStoreViews($storeid);
|
306 |
+
$config = new Mage_Core_Model_Config();
|
307 |
+
foreach($store_ids as $store_id) {
|
308 |
+
$config->saveConfig('feedbackcompany/productreviews/client_token', $response->access_token, 'stores', $store_id);
|
309 |
+
}
|
310 |
+
Mage::app()->getCacheInstance()->cleanType('config');
|
311 |
+
$result = array();
|
312 |
+
$result['status'] = 'OK';
|
313 |
+
$result['client_token'] = $response->access_token;
|
314 |
+
return $result;
|
315 |
+
} else {
|
316 |
+
if($response->description) {
|
317 |
+
$result = array();
|
318 |
+
$result['status'] = 'ERROR';
|
319 |
+
$result['error'] = $response->description;
|
320 |
+
return $result;
|
321 |
+
}
|
322 |
+
}
|
323 |
+
} else {
|
324 |
+
return false;
|
325 |
+
}
|
326 |
+
}
|
327 |
+
|
328 |
+
}
|
app/code/community/Magmodules/Feedbackcompany/Model/Log.php
CHANGED
@@ -21,28 +21,40 @@
|
|
21 |
|
22 |
class Magmodules_Feedbackcompany_Model_Log extends Mage_Core_Model_Abstract {
|
23 |
|
24 |
-
public function _construct()
|
|
|
25 |
parent::_construct();
|
26 |
$this->_init('feedbackcompany/log');
|
27 |
}
|
28 |
|
29 |
-
public function addToLog($type, $storeid, $review = '', $inivation = '', $time, $crontype = '', $api_url = '', $orderid = '')
|
30 |
-
|
31 |
if(Mage::getStoreConfig('feedbackcompany/log/enabled')) {
|
32 |
-
|
33 |
-
$
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
$review_updates = '';
|
36 |
-
$review_new
|
37 |
|
38 |
if($review) {
|
39 |
-
$
|
40 |
-
|
|
|
|
|
|
|
|
|
41 |
}
|
42 |
|
43 |
$model = Mage::getModel('feedbackcompany/log');
|
44 |
$model->setType($type)
|
45 |
->setShopId($api_id)
|
|
|
46 |
->setCompany($company)
|
47 |
->setReviewUpdate($review_updates)
|
48 |
->setReviewNew($review_new)
|
@@ -54,7 +66,6 @@ class Magmodules_Feedbackcompany_Model_Log extends Mage_Core_Model_Abstract {
|
|
54 |
->setApiUrl($api_url)
|
55 |
->save();
|
56 |
}
|
57 |
-
|
58 |
return;
|
59 |
}
|
60 |
|
21 |
|
22 |
class Magmodules_Feedbackcompany_Model_Log extends Mage_Core_Model_Abstract {
|
23 |
|
24 |
+
public function _construct()
|
25 |
+
{
|
26 |
parent::_construct();
|
27 |
$this->_init('feedbackcompany/log');
|
28 |
}
|
29 |
|
30 |
+
public function addToLog($type, $storeid, $review = '', $inivation = '', $time, $crontype = '', $api_url = '', $orderid = '')
|
31 |
+
{
|
32 |
if(Mage::getStoreConfig('feedbackcompany/log/enabled')) {
|
33 |
+
|
34 |
+
if($type == 'productreview') {
|
35 |
+
$api_id = Mage::getStoreConfig('feedbackcompany/productreviews/client_token', $storeid);
|
36 |
+
$api_url = Mage::getStoreConfig('feedbackcompany/productreviews/client_token', $storeid);
|
37 |
+
} else {
|
38 |
+
$api_id = Mage::getStoreConfig('feedbackcompany/general/api_id', $storeid);
|
39 |
+
}
|
40 |
+
|
41 |
+
$company = Mage::getStoreConfig('feedbackcompany/general/company', $storeid);
|
42 |
$review_updates = '';
|
43 |
+
$review_new = '';
|
44 |
|
45 |
if($review) {
|
46 |
+
if(!empty($review['review_updates'])) {
|
47 |
+
$review_updates = $review['review_updates'];
|
48 |
+
}
|
49 |
+
if(!empty($review['review_new'])) {
|
50 |
+
$review_new = $review['review_new'];
|
51 |
+
}
|
52 |
}
|
53 |
|
54 |
$model = Mage::getModel('feedbackcompany/log');
|
55 |
$model->setType($type)
|
56 |
->setShopId($api_id)
|
57 |
+
->setStoreId($storeid)
|
58 |
->setCompany($company)
|
59 |
->setReviewUpdate($review_updates)
|
60 |
->setReviewNew($review_new)
|
66 |
->setApiUrl($api_url)
|
67 |
->save();
|
68 |
}
|
|
|
69 |
return;
|
70 |
}
|
71 |
|
app/code/community/Magmodules/Feedbackcompany/Model/Observer.php
CHANGED
@@ -59,6 +59,27 @@ class Magmodules_Feedbackcompany_Model_Observer {
|
|
59 |
}
|
60 |
}
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
public function processHistory() {
|
63 |
$storeids = Mage::getModel('feedbackcompany/api')->getStoreIds();
|
64 |
$qty = 0;
|
59 |
}
|
60 |
}
|
61 |
|
62 |
+
public function processProductreviews() {
|
63 |
+
$storeids = Mage::getModel('feedbackcompany/api')->getStoreIds();
|
64 |
+
$qty = 0;
|
65 |
+
foreach($storeids as $storeid) {
|
66 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/general/enabled', $storeid);
|
67 |
+
$reviews_enabled = Mage::getStoreConfig('feedbackcompany/productreviews/enabled', $storeid);
|
68 |
+
$cron_enabled = Mage::getStoreConfig('feedbackcompany/productreviews/cron');
|
69 |
+
if($enabled && $cron_enabled && $reviews_enabled) {
|
70 |
+
$crontype = 'productreviews';
|
71 |
+
$start_time = microtime(true);
|
72 |
+
$feed = Mage::getModel('feedbackcompany/api')->getFeed($storeid, $crontype, 'last_month');
|
73 |
+
if($feed['status'] == 'OK') {
|
74 |
+
$results = Mage::getModel('feedbackcompany/productreviews')->processFeed($feed, $storeid);
|
75 |
+
if($results['review_new'] > 0) {
|
76 |
+
$log = Mage::getModel('feedbackcompany/log')->addToLog('productreviews', $storeid, $results, '', (microtime(true) - $start_time), $crontype);
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
public function processHistory() {
|
84 |
$storeids = Mage::getModel('feedbackcompany/api')->getStoreIds();
|
85 |
$qty = 0;
|
app/code/community/Magmodules/Feedbackcompany/Model/Productreviews.php
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Magmodules
|
16 |
+
* @package Magmodules_Feedbackcompany
|
17 |
+
* @author Magmodules <info@magmodules.eu)
|
18 |
+
* @copyright Copyright (c) 2015 (http://www.magmodules.eu)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class Magmodules_Feedbackcompany_Model_Productreviews extends Mage_Core_Model_Abstract {
|
23 |
+
|
24 |
+
public function processFeed($feed, $storeid = 0)
|
25 |
+
{
|
26 |
+
$new = 0; $updates = 0;
|
27 |
+
$feed = $feed['feed'];
|
28 |
+
$status_id = Mage::getStoreConfig('feedbackcompany/productreviews/review_import_status', $storeid);
|
29 |
+
$rating_id = Mage::getStoreConfig('feedbackcompany/productreviews/review_import_rating', $storeid);
|
30 |
+
|
31 |
+
foreach($feed->product_reviews as $review) {
|
32 |
+
$feedback_id = $review->id;
|
33 |
+
$_loadrev = Mage::getModel('review/review')->load($feedback_id, 'feedbackcompany_id');
|
34 |
+
if($_loadrev->getReviewId() < 1) {
|
35 |
+
$_product = Mage::getModel('catalog/product')->loadByAttribute('sku', $review->product_sku);
|
36 |
+
if($_product->getId()) {
|
37 |
+
$content = $review->review;
|
38 |
+
$title = $this->getFirstSentence($content);
|
39 |
+
$created_at = date_create_from_format('F, j Y H:i:s', $review->date_created);
|
40 |
+
$created_at = date_format($created_at, 'Y-m-d H:i:s');
|
41 |
+
// SAVE REVIEW
|
42 |
+
$_review = Mage::getModel('review/review');
|
43 |
+
$_review->setEntityPkValue($_product->getId());
|
44 |
+
$_review->setCreatedAt($created_at);
|
45 |
+
$_review->setTitle($title);
|
46 |
+
$_review->setFeedbackcompanyId($feedback_id);
|
47 |
+
$_review->setDetail($content);
|
48 |
+
$_review->setEntityId(1);
|
49 |
+
$_review->setStoreId(0);
|
50 |
+
$_review->setStatusId($status_id);
|
51 |
+
$_review->setCustomerId(null);
|
52 |
+
$_review->setNickname($review->client->name);
|
53 |
+
$_review->setStores($this->getAllStoreViews($storeid));
|
54 |
+
$_review->save();
|
55 |
+
|
56 |
+
// SAVE RATING
|
57 |
+
$_rating = Mage::getModel('rating/rating');
|
58 |
+
$_rating->setRatingId($rating_id);
|
59 |
+
$_rating->setReviewId($_review->getId());
|
60 |
+
$_rating->setCustomerId(null);
|
61 |
+
$_rating->addOptionVote($review->rating, $_product->getId());
|
62 |
+
$_review->aggregate();
|
63 |
+
|
64 |
+
$new++;
|
65 |
+
}
|
66 |
+
}
|
67 |
+
}
|
68 |
+
$config = new Mage_Core_Model_Config();
|
69 |
+
$config->saveConfig('feedbackcompany/productreviews/lastrun', now(), 'default', 0);
|
70 |
+
$result = array();
|
71 |
+
$result['review_updates'] = $updates;
|
72 |
+
$result['review_new'] = $new;
|
73 |
+
return $result;
|
74 |
+
}
|
75 |
+
|
76 |
+
public function getFirstSentence($string)
|
77 |
+
{
|
78 |
+
$string = str_replace(" .",".",$string);
|
79 |
+
$string = str_replace(" ?","?",$string);
|
80 |
+
$string = str_replace(" !","!",$string);
|
81 |
+
preg_match('/^.*[^\s](\.|\?|\!)/U', $string, $match);
|
82 |
+
return $match[0];
|
83 |
+
}
|
84 |
+
|
85 |
+
public function getAllStoreViews($storeid)
|
86 |
+
{
|
87 |
+
$client_id = Mage::getStoreConfig('feedbackcompany/productreviews/client_id', $storeid);
|
88 |
+
$client_secret = Mage::getStoreConfig('feedbackcompany/productreviews/client_secret', $storeid);
|
89 |
+
$reviewstores = array();
|
90 |
+
$stores = Mage::getModel('core/store')->getCollection();
|
91 |
+
foreach ($stores as $store) {
|
92 |
+
if($store->getIsActive()) {
|
93 |
+
if(Mage::getStoreConfig('feedbackcompany/productreviews/enabled', $store->getId())) {
|
94 |
+
$st_client_id = Mage::getStoreConfig('feedbackcompany/productreviews/client_id', $store->getId());
|
95 |
+
$st_client_secret = Mage::getStoreConfig('feedbackcompany/productreviews/client_secret', $store->getId());
|
96 |
+
if(($client_id == $st_client_id) && ($client_secret == $st_client_secret)) {
|
97 |
+
$reviewstores[] = $store->getId();
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
}
|
102 |
+
return $reviewstores;
|
103 |
+
}
|
104 |
+
|
105 |
+
}
|
app/code/community/Magmodules/Feedbackcompany/Model/Reviews.php
CHANGED
@@ -135,10 +135,79 @@ class Magmodules_Feedbackcompany_Model_Reviews extends Mage_Core_Model_Abstract
|
|
135 |
return $result;
|
136 |
}
|
137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
public function flushCache() {
|
139 |
if(Mage::getStoreConfig('feedbackcompany/reviews/flushcache')) {
|
140 |
Mage::app()->cleanCache(array(Mage_Cms_Model_Block::CACHE_TAG, Magmodules_Feedbackcompany_Model_Reviews::CACHE_TAG));
|
141 |
}
|
142 |
}
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
}
|
135 |
return $result;
|
136 |
}
|
137 |
|
138 |
+
|
139 |
+
public function processProductReviews($client_id, $client_secret, $client_token, $stores, $interval = 'last_month')
|
140 |
+
{
|
141 |
+
|
142 |
+
$request = curl_init();
|
143 |
+
curl_setopt($request, CURLOPT_SSL_VERIFYPEER, false);
|
144 |
+
curl_setopt($request, CURLOPT_URL, 'https://beoordelingen.feedbackcompany.nl/api/v1/review/getrecent/?interval=' . $interval . '&type=product');
|
145 |
+
curl_setopt($request, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $client_token));
|
146 |
+
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
|
147 |
+
$api_result = json_decode($content = curl_exec($request));
|
148 |
+
|
149 |
+
if($api_result->message == 'OK') {
|
150 |
+
$content = $api_result->data[0];
|
151 |
+
$shop_id = $content->shop->id;
|
152 |
+
$status_id = Mage::getStoreConfig('feedbackcompany/productreviews/review_import_status');
|
153 |
+
$rating_id = Mage::getStoreConfig('feedbackcompany/productreviews/review_import_rating');
|
154 |
+
foreach($content->product_reviews as $review) {
|
155 |
+
$feedback_id = $review->id;
|
156 |
+
$_loadrev = Mage::getModel('review/review')->load($feedback_id, 'feedbackcompany_id');
|
157 |
+
if($_loadrev->getReviewId() < 1) {
|
158 |
+
$_product = Mage::getModel('catalog/product')->loadByAttribute('sku', $review->product_sku);
|
159 |
+
if($_product->getId()) {
|
160 |
+
$content = $review->review;
|
161 |
+
$title = $this->getFirstSentence($content);
|
162 |
+
$created_at = date_create_from_format('F, j Y H:i:s', $review->date_created);
|
163 |
+
$created_at = date_format($date, 'Y-m-d H:i:s');
|
164 |
+
|
165 |
+
$_review = Mage::getModel('review/review');
|
166 |
+
$_review->setEntityPkValue($_product->getId());
|
167 |
+
$_review->setCreatedAt($created_at);
|
168 |
+
$_review->setTitle($title);
|
169 |
+
$_review->setFeedbackcompanyId($feedback_id);
|
170 |
+
$_review->setDetail($content);
|
171 |
+
$_review->setEntityId(1);
|
172 |
+
$_review->setStoreId(0);
|
173 |
+
$_review->setStatusId($status_id);
|
174 |
+
$_review->setCustomerId(null);
|
175 |
+
$_review->setNickname($review->client->name);
|
176 |
+
$_review->setStores(array($stores));
|
177 |
+
$_review->save();
|
178 |
+
$_rating = Mage::getModel('rating/rating')
|
179 |
+
->setRatingId($rating_id)
|
180 |
+
->setReviewId($_review->getId())
|
181 |
+
->setCustomerId(null)
|
182 |
+
->addOptionVote($review->rating, $_product->getId());
|
183 |
+
$_review->aggregate();
|
184 |
+
$new++;
|
185 |
+
}
|
186 |
+
}
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
$result = array();
|
191 |
+
$result['review_updates'] = $updates;
|
192 |
+
$result['review_new'] = $new;
|
193 |
+
$result['api_result'] = $api_result->message;
|
194 |
+
return $result;
|
195 |
+
}
|
196 |
+
|
197 |
+
|
198 |
public function flushCache() {
|
199 |
if(Mage::getStoreConfig('feedbackcompany/reviews/flushcache')) {
|
200 |
Mage::app()->cleanCache(array(Mage_Cms_Model_Block::CACHE_TAG, Magmodules_Feedbackcompany_Model_Reviews::CACHE_TAG));
|
201 |
}
|
202 |
}
|
203 |
|
204 |
+
public function getFirstSentence($string)
|
205 |
+
{
|
206 |
+
$string = str_replace(" .",".",$string);
|
207 |
+
$string = str_replace(" ?","?",$string);
|
208 |
+
$string = str_replace(" !","!",$string);
|
209 |
+
preg_match('/^.*[^\s](\.|\?|\!)/U', $string, $match);
|
210 |
+
return $match[0];
|
211 |
+
}
|
212 |
+
|
213 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Reviewrating.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Magmodules
|
16 |
+
* @package Magmodules_Feedbackcompany
|
17 |
+
* @author Magmodules <info@magmodules.eu)
|
18 |
+
* @copyright Copyright (c) 2015 (http://www.magmodules.eu)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class Magmodules_Feedbackcompany_Model_System_Config_Source_Reviewrating {
|
23 |
+
|
24 |
+
public function toOptionArray() {
|
25 |
+
$rating_options = array();
|
26 |
+
$ratings = Mage::getModel('rating/rating')->getResourceCollection()->addEntityFilter(Mage::registry('entityId'));
|
27 |
+
foreach($ratings as $rating) {
|
28 |
+
$rating_options[] = array('value'=> $rating->getRatingId(), 'label' => $rating->getRatingCode());
|
29 |
+
}
|
30 |
+
return $rating_options;
|
31 |
+
}
|
32 |
+
|
33 |
+
}
|
app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Reviewstatus.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Magmodules
|
16 |
+
* @package Magmodules_Feedbackcompany
|
17 |
+
* @author Magmodules <info@magmodules.eu)
|
18 |
+
* @copyright Copyright (c) 2015 (http://www.magmodules.eu)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class Magmodules_Feedbackcompany_Model_System_Config_Source_Reviewstatus {
|
23 |
+
|
24 |
+
public function toOptionArray() {
|
25 |
+
return Mage::helper('review')->getReviewStatuses();
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
app/code/community/Magmodules/Feedbackcompany/controllers/Adminhtml/FeedbacklogController.php
CHANGED
@@ -35,7 +35,7 @@ class Magmodules_Feedbackcompany_Adminhtml_FeedbacklogController extends Mage_Ad
|
|
35 |
if(!is_array($LogIds)) {
|
36 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Please select item(s)'));
|
37 |
} else {
|
38 |
-
|
39 |
foreach ($LogIds as $id) {
|
40 |
$log = Mage::getModel('feedbackcompany/log')->load($id)->delete();
|
41 |
}
|
@@ -48,19 +48,14 @@ class Magmodules_Feedbackcompany_Adminhtml_FeedbacklogController extends Mage_Ad
|
|
48 |
}
|
49 |
|
50 |
public function cleanAction() {
|
51 |
-
$enabled = Mage::getStoreConfig('feedbackcompany/log/clean');
|
52 |
-
$days = Mage::getStoreConfig('feedbackcompany/log/clean_days');
|
53 |
$i = 0;
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
$
|
58 |
-
|
59 |
-
$logmodel->load($log->getId())->delete();
|
60 |
-
$i++;
|
61 |
-
}
|
62 |
-
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('feedbackcompany')->__('Total of %s log record(s) deleted.', $i));
|
63 |
}
|
|
|
64 |
$this->_redirect('*/*/index');
|
65 |
}
|
66 |
|
35 |
if(!is_array($LogIds)) {
|
36 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Please select item(s)'));
|
37 |
} else {
|
38 |
+
try {
|
39 |
foreach ($LogIds as $id) {
|
40 |
$log = Mage::getModel('feedbackcompany/log')->load($id)->delete();
|
41 |
}
|
48 |
}
|
49 |
|
50 |
public function cleanAction() {
|
|
|
|
|
51 |
$i = 0;
|
52 |
+
$logmodel = Mage::getModel('feedbackcompany/log');
|
53 |
+
$logs = $logmodel->getCollection();
|
54 |
+
foreach ($logs as $log) {
|
55 |
+
$logmodel->load($log->getId())->delete();
|
56 |
+
$i++;
|
|
|
|
|
|
|
|
|
57 |
}
|
58 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('feedbackcompany')->__('Total of %s log record(s) deleted.', $i));
|
59 |
$this->_redirect('*/*/index');
|
60 |
}
|
61 |
|
app/code/community/Magmodules/Feedbackcompany/controllers/Adminhtml/FeedbackreviewsController.php
CHANGED
@@ -21,16 +21,19 @@
|
|
21 |
|
22 |
class Magmodules_Feedbackcompany_Adminhtml_FeedbackreviewsController extends Mage_Adminhtml_Controller_Action {
|
23 |
|
24 |
-
protected function _initAction()
|
|
|
25 |
$this->loadLayout()->_setActiveMenu('feedbackcompany/feedbackreviews')->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
26 |
return $this;
|
27 |
}
|
28 |
|
29 |
-
public function indexAction()
|
|
|
30 |
$this->_initAction()->renderLayout();
|
31 |
}
|
32 |
|
33 |
-
public function processAction()
|
|
|
34 |
$storeids = Mage::getModel('feedbackcompany/api')->getStoreIds();
|
35 |
$start_time = microtime(true);
|
36 |
foreach($storeids as $storeid) {
|
@@ -57,11 +60,9 @@ class Magmodules_Feedbackcompany_Adminhtml_FeedbackreviewsController extends Mag
|
|
57 |
$this->_redirect('adminhtml/system_config/edit/section/feedbackcompany');
|
58 |
}
|
59 |
|
60 |
-
public function testapiAction() {
|
61 |
-
$this->_redirect('adminhtml/system_config/edit/section/feedbackcompany');
|
62 |
-
}
|
63 |
|
64 |
-
public function massDisableAction()
|
|
|
65 |
$reviewIds = $this->getRequest()->getParam('reviewids');
|
66 |
if(!is_array($reviewIds)) {
|
67 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Please select item(s)'));
|
@@ -80,7 +81,8 @@ class Magmodules_Feedbackcompany_Adminhtml_FeedbackreviewsController extends Mag
|
|
80 |
$this->_redirect('*/*/index');
|
81 |
}
|
82 |
|
83 |
-
public function massEnableAction()
|
|
|
84 |
$reviewIds = $this->getRequest()->getParam('reviewids');
|
85 |
if(!is_array($reviewIds)) {
|
86 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Please select item(s)'));
|
@@ -118,7 +120,8 @@ class Magmodules_Feedbackcompany_Adminhtml_FeedbackreviewsController extends Mag
|
|
118 |
$this->_redirect('*/*/index');
|
119 |
}
|
120 |
|
121 |
-
public function massDisableSidebarAction()
|
|
|
122 |
$reviewIds = $this->getRequest()->getParam('reviewids');
|
123 |
if(!is_array($reviewIds)) {
|
124 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Please select item(s)'));
|
@@ -137,7 +140,8 @@ class Magmodules_Feedbackcompany_Adminhtml_FeedbackreviewsController extends Mag
|
|
137 |
$this->_redirect('*/*/index');
|
138 |
}
|
139 |
|
140 |
-
public function truncateAction()
|
|
|
141 |
$i = 0;
|
142 |
$collection = Mage::getModel('feedbackcompany/reviews')->getCollection();
|
143 |
foreach ($collection as $item) {
|
@@ -149,7 +153,44 @@ class Magmodules_Feedbackcompany_Adminhtml_FeedbackreviewsController extends Mag
|
|
149 |
$this->_redirect('*/*/index');
|
150 |
}
|
151 |
|
152 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
return Mage::getSingleton('admin/session')->isAllowed('admin/feedbackcompany/feedbackcompany_reviews');
|
154 |
}
|
155 |
|
21 |
|
22 |
class Magmodules_Feedbackcompany_Adminhtml_FeedbackreviewsController extends Mage_Adminhtml_Controller_Action {
|
23 |
|
24 |
+
protected function _initAction()
|
25 |
+
{
|
26 |
$this->loadLayout()->_setActiveMenu('feedbackcompany/feedbackreviews')->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
27 |
return $this;
|
28 |
}
|
29 |
|
30 |
+
public function indexAction()
|
31 |
+
{
|
32 |
$this->_initAction()->renderLayout();
|
33 |
}
|
34 |
|
35 |
+
public function processAction()
|
36 |
+
{
|
37 |
$storeids = Mage::getModel('feedbackcompany/api')->getStoreIds();
|
38 |
$start_time = microtime(true);
|
39 |
foreach($storeids as $storeid) {
|
60 |
$this->_redirect('adminhtml/system_config/edit/section/feedbackcompany');
|
61 |
}
|
62 |
|
|
|
|
|
|
|
63 |
|
64 |
+
public function massDisableAction()
|
65 |
+
{
|
66 |
$reviewIds = $this->getRequest()->getParam('reviewids');
|
67 |
if(!is_array($reviewIds)) {
|
68 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Please select item(s)'));
|
81 |
$this->_redirect('*/*/index');
|
82 |
}
|
83 |
|
84 |
+
public function massEnableAction()
|
85 |
+
{
|
86 |
$reviewIds = $this->getRequest()->getParam('reviewids');
|
87 |
if(!is_array($reviewIds)) {
|
88 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Please select item(s)'));
|
120 |
$this->_redirect('*/*/index');
|
121 |
}
|
122 |
|
123 |
+
public function massDisableSidebarAction()
|
124 |
+
{
|
125 |
$reviewIds = $this->getRequest()->getParam('reviewids');
|
126 |
if(!is_array($reviewIds)) {
|
127 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Please select item(s)'));
|
140 |
$this->_redirect('*/*/index');
|
141 |
}
|
142 |
|
143 |
+
public function truncateAction()
|
144 |
+
{
|
145 |
$i = 0;
|
146 |
$collection = Mage::getModel('feedbackcompany/reviews')->getCollection();
|
147 |
foreach ($collection as $item) {
|
153 |
$this->_redirect('*/*/index');
|
154 |
}
|
155 |
|
156 |
+
public function productreviewsAction()
|
157 |
+
{
|
158 |
+
$storeids = Mage::getModel('feedbackcompany/api')->getStoreIds('oauth');
|
159 |
+
$start_time = microtime(true); $qty = 0; $errors = array();
|
160 |
+
foreach($storeids as $storeid) {
|
161 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/general/enabled', $storeid);
|
162 |
+
$reviews_enabled = Mage::getStoreConfig('feedbackcompany/productreviews/enabled', $storeid);
|
163 |
+
$client_id = Mage::getStoreConfig('feedbackcompany/productreviews/client_id', $storeid);
|
164 |
+
$client_secret = Mage::getStoreConfig('feedbackcompany/productreviews/client_secret', $storeid);
|
165 |
+
if($enabled && $reviews_enabled && !empty($client_id) && !empty($client_secret)) {
|
166 |
+
$feed = Mage::getModel('feedbackcompany/api')->getFeed($storeid, 'productreviews', 'last_month');
|
167 |
+
if($feed['status'] == 'OK') {
|
168 |
+
$results = Mage::getModel('feedbackcompany/productreviews')->processFeed($feed, $storeid);
|
169 |
+
if($results['review_new'] > 0) {
|
170 |
+
$qty = ($qty + $results['review_new']);
|
171 |
+
$log = Mage::getModel('feedbackcompany/log')->addToLog('productreviews', $storeid, $results, '', (microtime(true) - $start_time), '');
|
172 |
+
}
|
173 |
+
} else {
|
174 |
+
$errors[$client_id] = $feed['error'];
|
175 |
+
}
|
176 |
+
}
|
177 |
+
}
|
178 |
+
if(count($errors) > 0) {
|
179 |
+
foreach($errors as $key => $value) {
|
180 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('API Response for client ID: %s => %s', $key, $value));
|
181 |
+
}
|
182 |
+
} else {
|
183 |
+
if($qty > 0) {
|
184 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('feedbackcompany')->__('Imported %d new productreview(s).', $qty));
|
185 |
+
} else {
|
186 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('feedbackcompany')->__('No new reviews found.', $qty));
|
187 |
+
}
|
188 |
+
}
|
189 |
+
$this->_redirect('adminhtml/system_config/edit/section/feedbackcompany');
|
190 |
+
}
|
191 |
+
|
192 |
+
protected function _isAllowed()
|
193 |
+
{
|
194 |
return Mage::getSingleton('admin/session')->isAllowed('admin/feedbackcompany/feedbackcompany_reviews');
|
195 |
}
|
196 |
|
app/code/community/Magmodules/Feedbackcompany/etc/config.xml
CHANGED
@@ -23,7 +23,7 @@
|
|
23 |
<config>
|
24 |
<modules>
|
25 |
<Magmodules_Feedbackcompany>
|
26 |
-
<version>1.3.
|
27 |
</Magmodules_Feedbackcompany>
|
28 |
</modules>
|
29 |
<global>
|
@@ -165,6 +165,10 @@
|
|
165 |
<schedule><config_path>feedbackcompany/reviews/cron_reviews</config_path></schedule>
|
166 |
<run><model>feedbackcompany/observer::processReviews</model></run>
|
167 |
</magmodules_feedbackcompany_reviews>
|
|
|
|
|
|
|
|
|
168 |
<magmodules_feedbackcompany_reviewhistory>
|
169 |
<schedule><config_path>feedbackcompany/reviews/cron_all</config_path></schedule>
|
170 |
<run><model>feedbackcompany/observer::processHistory</model></run>
|
23 |
<config>
|
24 |
<modules>
|
25 |
<Magmodules_Feedbackcompany>
|
26 |
+
<version>1.3.1</version>
|
27 |
</Magmodules_Feedbackcompany>
|
28 |
</modules>
|
29 |
<global>
|
165 |
<schedule><config_path>feedbackcompany/reviews/cron_reviews</config_path></schedule>
|
166 |
<run><model>feedbackcompany/observer::processReviews</model></run>
|
167 |
</magmodules_feedbackcompany_reviews>
|
168 |
+
<magmodules_feedbackcompany_productreviews>
|
169 |
+
<schedule><config_path>feedbackcompany/productreviews/cron_productreviews</config_path></schedule>
|
170 |
+
<run><model>feedbackcompany/observer::processProductreviews</model></run>
|
171 |
+
</magmodules_feedbackcompany_productreviews>
|
172 |
<magmodules_feedbackcompany_reviewhistory>
|
173 |
<schedule><config_path>feedbackcompany/reviews/cron_all</config_path></schedule>
|
174 |
<run><model>feedbackcompany/observer::processHistory</model></run>
|
app/code/community/Magmodules/Feedbackcompany/etc/system.xml
CHANGED
@@ -100,7 +100,7 @@
|
|
100 |
</fields>
|
101 |
</general>
|
102 |
<reviews translate="label" module="feedbackcompany">
|
103 |
-
<label>Feedbackcompany
|
104 |
<frontend_type>text</frontend_type>
|
105 |
<sort_order>3</sort_order>
|
106 |
<show_in_default>1</show_in_default>
|
@@ -136,8 +136,8 @@
|
|
136 |
<source_model>feedbackcompany/system_config_source_cronfrequency</source_model>
|
137 |
<sort_order>2</sort_order>
|
138 |
<show_in_default>1</show_in_default>
|
139 |
-
<show_in_website>
|
140 |
-
<show_in_store>
|
141 |
<depends><cron>1</cron></depends>
|
142 |
<tooltip>Select the schedule for automatic updating</tooltip>
|
143 |
</cron_stats>
|
@@ -147,8 +147,8 @@
|
|
147 |
<source_model>feedbackcompany/system_config_source_cronfrequency</source_model>
|
148 |
<sort_order>3</sort_order>
|
149 |
<show_in_default>1</show_in_default>
|
150 |
-
<show_in_website>
|
151 |
-
<show_in_store>
|
152 |
<depends><cron>1</cron></depends>
|
153 |
<tooltip>Select the schedule for automatic updating</tooltip>
|
154 |
</cron_reviews>
|
@@ -158,8 +158,8 @@
|
|
158 |
<source_model>feedbackcompany/system_config_source_cronfrequency</source_model>
|
159 |
<sort_order>4</sort_order>
|
160 |
<show_in_default>1</show_in_default>
|
161 |
-
<show_in_website>
|
162 |
-
<show_in_store>
|
163 |
<depends><cron>1</cron></depends>
|
164 |
<tooltip>Select the schedule for automatic updating</tooltip>
|
165 |
</cron_all>
|
@@ -178,8 +178,8 @@
|
|
178 |
<frontend_type>text</frontend_type>
|
179 |
<sort_order>100</sort_order>
|
180 |
<show_in_default>1</show_in_default>
|
181 |
-
<show_in_website>
|
182 |
-
<show_in_store>
|
183 |
</lastrun>
|
184 |
<process translate="label">
|
185 |
<label>Process Manually</label>
|
@@ -187,13 +187,13 @@
|
|
187 |
<frontend_model>feedbackcompany/adminhtml_widget_buttons_process</frontend_model>
|
188 |
<sort_order>101</sort_order>
|
189 |
<show_in_default>1</show_in_default>
|
190 |
-
<show_in_website>
|
191 |
-
<show_in_store>
|
192 |
</process>
|
193 |
</fields>
|
194 |
</reviews>
|
195 |
<sidebar translate="label">
|
196 |
-
<label>Feedbackcompany Reviews Sidebar</label>
|
197 |
<frontend_type>text</frontend_type>
|
198 |
<sort_order>4</sort_order>
|
199 |
<show_in_default>1</show_in_default>
|
@@ -609,7 +609,7 @@
|
|
609 |
</fields>
|
610 |
</overview>
|
611 |
<invitation translate="label">
|
612 |
-
<label>
|
613 |
<frontend_type>text</frontend_type>
|
614 |
<sort_order>7</sort_order>
|
615 |
<show_in_default>1</show_in_default>
|
@@ -703,31 +703,6 @@
|
|
703 |
<depends><enabled>1</enabled></depends>
|
704 |
<comment>If yes, customers will get new review reminders for every new order.</comment>
|
705 |
</resend>
|
706 |
-
<heading_products translate="label">
|
707 |
-
<label>Optional: Product Reviews</label>
|
708 |
-
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
709 |
-
<sort_order>30</sort_order>
|
710 |
-
<show_in_default>1</show_in_default>
|
711 |
-
<show_in_website>0</show_in_website>
|
712 |
-
<show_in_store>1</show_in_store>
|
713 |
-
</heading_products>
|
714 |
-
<products_note translate="label">
|
715 |
-
<label><![CDATA[This option is still in beta, contact The Feedback Company for more information.<br/>]]></label>
|
716 |
-
<frontend_model>feedbackcompany/adminhtml_widget_form_note</frontend_model>
|
717 |
-
<sort_order>31</sort_order>
|
718 |
-
<show_in_default>1</show_in_default>
|
719 |
-
<show_in_website>1</show_in_website>
|
720 |
-
<show_in_store>1</show_in_store>
|
721 |
-
</products_note>
|
722 |
-
<productreviews translate="label">
|
723 |
-
<label>Enabled</label>
|
724 |
-
<frontend_type>select</frontend_type>
|
725 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
726 |
-
<sort_order>32</sort_order>
|
727 |
-
<show_in_default>1</show_in_default>
|
728 |
-
<show_in_website>1</show_in_website>
|
729 |
-
<show_in_store>1</show_in_store>
|
730 |
-
</productreviews>
|
731 |
<heading_filter translate="label">
|
732 |
<label>Filter options</label>
|
733 |
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
@@ -767,8 +742,135 @@
|
|
767 |
</exclude_categories>
|
768 |
</fields>
|
769 |
</invitation>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
770 |
<log translate="label">
|
771 |
-
<label>Feedbackcompany Log Settings</label>
|
772 |
<frontend_type>text</frontend_type>
|
773 |
<sort_order>9</sort_order>
|
774 |
<show_in_default>1</show_in_default>
|
100 |
</fields>
|
101 |
</general>
|
102 |
<reviews translate="label" module="feedbackcompany">
|
103 |
+
<label>The Feedbackcompany Shop Reviews</label>
|
104 |
<frontend_type>text</frontend_type>
|
105 |
<sort_order>3</sort_order>
|
106 |
<show_in_default>1</show_in_default>
|
136 |
<source_model>feedbackcompany/system_config_source_cronfrequency</source_model>
|
137 |
<sort_order>2</sort_order>
|
138 |
<show_in_default>1</show_in_default>
|
139 |
+
<show_in_website>0</show_in_website>
|
140 |
+
<show_in_store>0</show_in_store>
|
141 |
<depends><cron>1</cron></depends>
|
142 |
<tooltip>Select the schedule for automatic updating</tooltip>
|
143 |
</cron_stats>
|
147 |
<source_model>feedbackcompany/system_config_source_cronfrequency</source_model>
|
148 |
<sort_order>3</sort_order>
|
149 |
<show_in_default>1</show_in_default>
|
150 |
+
<show_in_website>0</show_in_website>
|
151 |
+
<show_in_store>0</show_in_store>
|
152 |
<depends><cron>1</cron></depends>
|
153 |
<tooltip>Select the schedule for automatic updating</tooltip>
|
154 |
</cron_reviews>
|
158 |
<source_model>feedbackcompany/system_config_source_cronfrequency</source_model>
|
159 |
<sort_order>4</sort_order>
|
160 |
<show_in_default>1</show_in_default>
|
161 |
+
<show_in_website>0</show_in_website>
|
162 |
+
<show_in_store>0</show_in_store>
|
163 |
<depends><cron>1</cron></depends>
|
164 |
<tooltip>Select the schedule for automatic updating</tooltip>
|
165 |
</cron_all>
|
178 |
<frontend_type>text</frontend_type>
|
179 |
<sort_order>100</sort_order>
|
180 |
<show_in_default>1</show_in_default>
|
181 |
+
<show_in_website>0</show_in_website>
|
182 |
+
<show_in_store>0</show_in_store>
|
183 |
</lastrun>
|
184 |
<process translate="label">
|
185 |
<label>Process Manually</label>
|
187 |
<frontend_model>feedbackcompany/adminhtml_widget_buttons_process</frontend_model>
|
188 |
<sort_order>101</sort_order>
|
189 |
<show_in_default>1</show_in_default>
|
190 |
+
<show_in_website>0</show_in_website>
|
191 |
+
<show_in_store>0</show_in_store>
|
192 |
</process>
|
193 |
</fields>
|
194 |
</reviews>
|
195 |
<sidebar translate="label">
|
196 |
+
<label>The Feedbackcompany Reviews Sidebar</label>
|
197 |
<frontend_type>text</frontend_type>
|
198 |
<sort_order>4</sort_order>
|
199 |
<show_in_default>1</show_in_default>
|
609 |
</fields>
|
610 |
</overview>
|
611 |
<invitation translate="label">
|
612 |
+
<label>The Feedback Company Invitation Email</label>
|
613 |
<frontend_type>text</frontend_type>
|
614 |
<sort_order>7</sort_order>
|
615 |
<show_in_default>1</show_in_default>
|
703 |
<depends><enabled>1</enabled></depends>
|
704 |
<comment>If yes, customers will get new review reminders for every new order.</comment>
|
705 |
</resend>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
706 |
<heading_filter translate="label">
|
707 |
<label>Filter options</label>
|
708 |
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
742 |
</exclude_categories>
|
743 |
</fields>
|
744 |
</invitation>
|
745 |
+
<productreviews translate="label">
|
746 |
+
<label>The Feedbackcompany Productreviews</label>
|
747 |
+
<frontend_type>text</frontend_type>
|
748 |
+
<sort_order>8</sort_order>
|
749 |
+
<show_in_default>1</show_in_default>
|
750 |
+
<show_in_website>1</show_in_website>
|
751 |
+
<show_in_store>1</show_in_store>
|
752 |
+
<comment>
|
753 |
+
<![CDATA[
|
754 |
+
<script>
|
755 |
+
Event.observe(window, 'load', function() {
|
756 |
+
if ($('feedbackcompany_productreviews_lastrun')) {
|
757 |
+
$('feedbackcompany_productreviews_lastrun').style.backgroundColor='#f0f0f0';
|
758 |
+
$('feedbackcompany_productreviews_lastrun').disable();
|
759 |
+
}
|
760 |
+
});
|
761 |
+
</script>
|
762 |
+
]]>
|
763 |
+
</comment>
|
764 |
+
<expanded>1</expanded>
|
765 |
+
<fields>
|
766 |
+
<products_note translate="label">
|
767 |
+
<label><![CDATA[This option is still in beta, contact The Feedback Company for more information.<br/>]]></label>
|
768 |
+
<frontend_model>feedbackcompany/adminhtml_widget_form_note</frontend_model>
|
769 |
+
<sort_order>1</sort_order>
|
770 |
+
<show_in_default>1</show_in_default>
|
771 |
+
<show_in_website>1</show_in_website>
|
772 |
+
<show_in_store>1</show_in_store>
|
773 |
+
</products_note>
|
774 |
+
<enabled translate="label">
|
775 |
+
<label>Enabled</label>
|
776 |
+
<frontend_type>select</frontend_type>
|
777 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
778 |
+
<sort_order>2</sort_order>
|
779 |
+
<show_in_default>1</show_in_default>
|
780 |
+
<show_in_website>1</show_in_website>
|
781 |
+
<show_in_store>1</show_in_store>
|
782 |
+
</enabled>
|
783 |
+
<client_id translate="label">
|
784 |
+
<label>Oauth2 Client ID</label>
|
785 |
+
<frontend_type>text</frontend_type>
|
786 |
+
<sort_order>3</sort_order>
|
787 |
+
<show_in_default>1</show_in_default>
|
788 |
+
<show_in_website>1</show_in_website>
|
789 |
+
<show_in_store>1</show_in_store>
|
790 |
+
</client_id>
|
791 |
+
<client_secret translate="label">
|
792 |
+
<label>Oauth2 Client Secret</label>
|
793 |
+
<frontend_type>text</frontend_type>
|
794 |
+
<sort_order>4</sort_order>
|
795 |
+
<show_in_default>1</show_in_default>
|
796 |
+
<show_in_website>1</show_in_website>
|
797 |
+
<show_in_store>1</show_in_store>
|
798 |
+
</client_secret>
|
799 |
+
<heading_reviews translate="label">
|
800 |
+
<label>Review Settings</label>
|
801 |
+
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
802 |
+
<sort_order>20</sort_order>
|
803 |
+
<show_in_default>1</show_in_default>
|
804 |
+
<show_in_website>0</show_in_website>
|
805 |
+
<show_in_store>0</show_in_store>
|
806 |
+
</heading_reviews>
|
807 |
+
<review_import_status translate="label">
|
808 |
+
<label>Default Review Status</label>
|
809 |
+
<frontend_type>select</frontend_type>
|
810 |
+
<source_model>feedbackcompany/system_config_source_reviewstatus</source_model>
|
811 |
+
<sort_order>21</sort_order>
|
812 |
+
<show_in_default>1</show_in_default>
|
813 |
+
<show_in_website>1</show_in_website>
|
814 |
+
<show_in_store>1</show_in_store>
|
815 |
+
</review_import_status>
|
816 |
+
<review_import_rating translate="label">
|
817 |
+
<label>Default Review Rating</label>
|
818 |
+
<frontend_type>select</frontend_type>
|
819 |
+
<source_model>feedbackcompany/system_config_source_reviewrating</source_model>
|
820 |
+
<sort_order>22</sort_order>
|
821 |
+
<show_in_default>1</show_in_default>
|
822 |
+
<show_in_website>1</show_in_website>
|
823 |
+
<show_in_store>1</show_in_store>
|
824 |
+
</review_import_rating>
|
825 |
+
<heading_import translate="label">
|
826 |
+
<label>Import Settings</label>
|
827 |
+
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
828 |
+
<sort_order>30</sort_order>
|
829 |
+
<show_in_default>1</show_in_default>
|
830 |
+
<show_in_website>0</show_in_website>
|
831 |
+
<show_in_store>0</show_in_store>
|
832 |
+
</heading_import>
|
833 |
+
<cron translate="label">
|
834 |
+
<label>Use Cronjob</label>
|
835 |
+
<frontend_type>select</frontend_type>
|
836 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
837 |
+
<sort_order>31</sort_order>
|
838 |
+
<show_in_default>1</show_in_default>
|
839 |
+
<show_in_website>0</show_in_website>
|
840 |
+
<show_in_store>0</show_in_store>
|
841 |
+
</cron>
|
842 |
+
<cron_productreviews translate="label">
|
843 |
+
<label>Update Reviews</label>
|
844 |
+
<frontend_type>select</frontend_type>
|
845 |
+
<source_model>feedbackcompany/system_config_source_cronfrequency</source_model>
|
846 |
+
<sort_order>32</sort_order>
|
847 |
+
<show_in_default>1</show_in_default>
|
848 |
+
<show_in_website>0</show_in_website>
|
849 |
+
<show_in_store>0</show_in_store>
|
850 |
+
<tooltip>Select the schedule for automatic updating</tooltip>
|
851 |
+
</cron_productreviews>
|
852 |
+
<lastrun translate="label">
|
853 |
+
<label>Last Update</label>
|
854 |
+
<frontend_type>text</frontend_type>
|
855 |
+
<sort_order>33</sort_order>
|
856 |
+
<show_in_default>1</show_in_default>
|
857 |
+
<show_in_website>0</show_in_website>
|
858 |
+
<show_in_store>0</show_in_store>
|
859 |
+
</lastrun>
|
860 |
+
<process translate="label">
|
861 |
+
<label>Process Manually</label>
|
862 |
+
<frontend_type>button</frontend_type>
|
863 |
+
<frontend_model>feedbackcompany/adminhtml_widget_buttons_productreviews</frontend_model>
|
864 |
+
<sort_order>34</sort_order>
|
865 |
+
<show_in_default>1</show_in_default>
|
866 |
+
<show_in_website>0</show_in_website>
|
867 |
+
<show_in_store>0</show_in_store>
|
868 |
+
<depends><enabled>1</enabled></depends>
|
869 |
+
</process>
|
870 |
+
</fields>
|
871 |
+
</productreviews>
|
872 |
<log translate="label">
|
873 |
+
<label>The Feedbackcompany Log Settings</label>
|
874 |
<frontend_type>text</frontend_type>
|
875 |
<sort_order>9</sort_order>
|
876 |
<show_in_default>1</show_in_default>
|
app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-upgrade-1.3.0-1.3.1.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Magmodules
|
16 |
+
* @package Magmodules_Feedbackcompany
|
17 |
+
* @author Magmodules <info@magmodules.eu)
|
18 |
+
* @copyright Copyright (c) 2015 (http://www.magmodules.eu)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
$installer = $this;
|
23 |
+
$installer->startSetup();
|
24 |
+
$installer->run("ALTER TABLE `review` ADD `feedbackcompany_id` INT(11) NULL AFTER `status_id`");
|
25 |
+
$installer->run("ALTER TABLE {$this->getTable('feedbackcompany_log')} ADD `store_id` INT(11) NULL AFTER `shop_id`");
|
26 |
+
$installer->endSetup();
|
app/locale/en_US/Magmodules_Feedbackcompany.csv
CHANGED
@@ -39,11 +39,11 @@
|
|
39 |
"External (Feedbackcompany.nl)","External (Feedbackcompany.nl)"
|
40 |
"Exclude by Category","Exclude by Category"
|
41 |
"Exclude following Categories","Exclude following Categories"
|
42 |
-
"Feedbackcompany Custom Blocks","Feedbackcompany Custom Blocks"
|
43 |
-
"Feedbackcompany Import Reviews","Feedbackcompany Import Reviews"
|
44 |
-
"Feedbackcompany Log Settings","Feedbackcompany Log Settings"
|
45 |
-
"Feedbackcompany Overview Page","Feedbackcompany Overview Page"
|
46 |
-
"Feedbackcompany Reviews Sidebar","Feedbackcompany Reviews Sidebar"
|
47 |
"Female","Female"
|
48 |
"Filter Options","Filter Options"
|
49 |
"Gender","Gender"
|
@@ -143,7 +143,7 @@
|
|
143 |
"Use the Magento Cronjob to use the automatically import. A cronjob is a daemon which keeps running and gets activated at a said interval (time period). Please make sure your default Magento Cron is working. If not, contact your hosting company for help.","Use the Magento Cronjob to use the automatically import. A cronjob is a daemon which keeps running and gets activated at a said interval (time period). Please make sure your default Magento Cron is working. If not, contact your hosting company for help."
|
144 |
"User","User"
|
145 |
"View all reviews","View all reviews"
|
146 |
-
"Write review","
|
147 |
"Webwinkel ID %s:","Webwinkel ID %s:"
|
148 |
"Webwinkel ID %s: no updates found, feed is empty or not found!","Webwinkel ID %s: no updates found, feed is empty or not found!"
|
149 |
"You can find this information in your The Feedback Company account","You can find this information in your The Feedback Company account"
|
@@ -165,3 +165,14 @@
|
|
165 |
"Order status updates","Order status updates"
|
166 |
"Customer-friendly","Customer-friendly"
|
167 |
"Response time","Response time"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
"External (Feedbackcompany.nl)","External (Feedbackcompany.nl)"
|
40 |
"Exclude by Category","Exclude by Category"
|
41 |
"Exclude following Categories","Exclude following Categories"
|
42 |
+
"The Feedbackcompany Custom Blocks","The Feedbackcompany Custom Blocks"
|
43 |
+
"The Feedbackcompany Import Reviews","The Feedbackcompany Import Reviews"
|
44 |
+
"The Feedbackcompany Log Settings","The Feedbackcompany Log Settings"
|
45 |
+
"The Feedbackcompany Overview Page","The Feedbackcompany Overview Page"
|
46 |
+
"The Feedbackcompany Reviews Sidebar","The Feedbackcompany Reviews Sidebar"
|
47 |
"Female","Female"
|
48 |
"Filter Options","Filter Options"
|
49 |
"Gender","Gender"
|
143 |
"Use the Magento Cronjob to use the automatically import. A cronjob is a daemon which keeps running and gets activated at a said interval (time period). Please make sure your default Magento Cron is working. If not, contact your hosting company for help.","Use the Magento Cronjob to use the automatically import. A cronjob is a daemon which keeps running and gets activated at a said interval (time period). Please make sure your default Magento Cron is working. If not, contact your hosting company for help."
|
144 |
"User","User"
|
145 |
"View all reviews","View all reviews"
|
146 |
+
"Write review","Write review"
|
147 |
"Webwinkel ID %s:","Webwinkel ID %s:"
|
148 |
"Webwinkel ID %s: no updates found, feed is empty or not found!","Webwinkel ID %s: no updates found, feed is empty or not found!"
|
149 |
"You can find this information in your The Feedback Company account","You can find this information in your The Feedback Company account"
|
165 |
"Order status updates","Order status updates"
|
166 |
"Customer-friendly","Customer-friendly"
|
167 |
"Response time","Response time"
|
168 |
+
"API Response for client ID:","API Response for client ID:"
|
169 |
+
"Imported %d new productreview(s).","Imported %d new productreview(s)."
|
170 |
+
"No new reviews found.","No new reviews found."
|
171 |
+
"%s new review(s)","%s new review(s)"
|
172 |
+
"%s review(s) updated","%s review(s) updated"
|
173 |
+
"total score updated","total score updated"
|
174 |
+
"Invitation Emails","Uitnodiging email"
|
175 |
+
"%s new productreview(s) imported","%s new productreview(s) imported"
|
176 |
+
"Default Review Status","Default Review Status"
|
177 |
+
"Default Review Rating","Default Review Rating"
|
178 |
+
"Flush Block Cache after import","Flush Block Cache after import"
|
app/locale/nl_NL/Magmodules_Feedbackcompany.csv
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
"Can be obtained from the Feedbackcompany Dashboard","Kan worden opgevraagd via het The Feedback Company account"
|
22 |
"Checkout process:","Afrekenproces:"
|
23 |
"Clean after Days","Opschonen na aantal dagen"
|
24 |
-
"Cleanup Log","
|
25 |
"Company","Bedrijf"
|
26 |
"Comma Separated, as: 10,20,30","Komma gescheiden als: 10,20,30"
|
27 |
"Cron","Cron"
|
@@ -39,11 +39,13 @@
|
|
39 |
"External (Feedbackcompany.nl)","Extern (Feedbackcompany.nl)"
|
40 |
"Exclude by Category","Uitsluiten van categorie"
|
41 |
"Exclude following Categories","Sluit de volgende categorieën uit"
|
42 |
-
"Feedbackcompany Custom Blocks","The Feedbackcompany Custom Blok"
|
43 |
-
"Feedbackcompany Import Reviews","The Feedbackcompany
|
44 |
-
"Feedbackcompany Log Settings","The Feedbackcompany
|
45 |
-
"Feedbackcompany Overview Page","The Feedbackcompany
|
46 |
-
"Feedbackcompany Reviews Sidebar","The Feedbackcompany
|
|
|
|
|
47 |
"Female","Vrouwlijk"
|
48 |
"Filter Options","Filter opties"
|
49 |
"Gender","Geslacht"
|
@@ -55,7 +57,7 @@
|
|
55 |
"Internal (/feedbackcompany)","Intern (/feedbackcompany)"
|
56 |
"Invitation","Herinnering"
|
57 |
"Invitation Call","Herinnering e-mail"
|
58 |
-
"
|
59 |
"Invitation e-mail is sent only for order above this value. Use 0 for no minimum.","De herinnering wordt alleen verstuurd boven deze orderwaarde. Gebruik 0 om geen minimum in te stellen."
|
60 |
"Last Update","Laatste Update"
|
61 |
"Leadtime:","Doorlooptijd:"
|
@@ -170,4 +172,15 @@
|
|
170 |
"Customer-friendly","Klantvriendelijkheid"
|
171 |
"Response time","Reactiesnelheid"
|
172 |
"Optional: Product Reviews","Optioneel: Product Reviews"
|
173 |
-
"This option is still in beta, contact The Feedback Company for more information.<br/>","Deze functie is nog niet voor alle klanten van The Feedback Company beschikbaar. Momenteel worden er beta tests uitgevoerd door The Feedback Company in samenwerking met een aantal klanten. Wilt u graag meehelpen met het testen? Neem dan contact op met support@feedbackcompany.com zij leggen u graag uit hoe dit in zijn werk gaat.<br/>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
"Can be obtained from the Feedbackcompany Dashboard","Kan worden opgevraagd via het The Feedback Company account"
|
22 |
"Checkout process:","Afrekenproces:"
|
23 |
"Clean after Days","Opschonen na aantal dagen"
|
24 |
+
"Cleanup Log","Log Opschonen"
|
25 |
"Company","Bedrijf"
|
26 |
"Comma Separated, as: 10,20,30","Komma gescheiden als: 10,20,30"
|
27 |
"Cron","Cron"
|
39 |
"External (Feedbackcompany.nl)","Extern (Feedbackcompany.nl)"
|
40 |
"Exclude by Category","Uitsluiten van categorie"
|
41 |
"Exclude following Categories","Sluit de volgende categorieën uit"
|
42 |
+
"The Feedbackcompany Custom Blocks","The Feedbackcompany Custom Blok"
|
43 |
+
"The Feedbackcompany Import Reviews","The Feedbackcompany Importeren beoordelingen"
|
44 |
+
"The Feedbackcompany Log Settings","The Feedbackcompany Log instellingen"
|
45 |
+
"The Feedbackcompany Overview Page","The Feedbackcompany Pagina"
|
46 |
+
"The Feedbackcompany Reviews Sidebar","The Feedbackcompany Sidebar"
|
47 |
+
"The Feedback Company Invitation Email","The Feedback Company Email Uitnodiging"
|
48 |
+
"The Feedbackcompany Shop Reviews,"The Feedbackcompany Winkelreviews"
|
49 |
"Female","Vrouwlijk"
|
50 |
"Filter Options","Filter opties"
|
51 |
"Gender","Geslacht"
|
57 |
"Internal (/feedbackcompany)","Intern (/feedbackcompany)"
|
58 |
"Invitation","Herinnering"
|
59 |
"Invitation Call","Herinnering e-mail"
|
60 |
+
"The Feedback Company Invitation email","The Feedback Company - Email uitnodigingen"
|
61 |
"Invitation e-mail is sent only for order above this value. Use 0 for no minimum.","De herinnering wordt alleen verstuurd boven deze orderwaarde. Gebruik 0 om geen minimum in te stellen."
|
62 |
"Last Update","Laatste Update"
|
63 |
"Leadtime:","Doorlooptijd:"
|
172 |
"Customer-friendly","Klantvriendelijkheid"
|
173 |
"Response time","Reactiesnelheid"
|
174 |
"Optional: Product Reviews","Optioneel: Product Reviews"
|
175 |
+
"This option is still in beta, contact The Feedback Company for more information.<br/>","Deze functie is nog niet voor alle klanten van The Feedback Company beschikbaar. Momenteel worden er beta tests uitgevoerd door The Feedback Company in samenwerking met een aantal klanten. Wilt u graag meehelpen met het testen? Neem dan contact op met support@feedbackcompany.com zij leggen u graag uit hoe dit in zijn werk gaat.<br/>"
|
176 |
+
"API Response for client ID:","API reactie op klant ID:"
|
177 |
+
"Imported %d new productreview(s).","%d nieuwe productreview(s) geïmporteerd."
|
178 |
+
"No new reviews found.","Er zijn geen nieuwe reviews gevonden."
|
179 |
+
"%s new review(s)","%s nieuwe review(s)"
|
180 |
+
"%s review(s) updated","%s review(s) geüpdate"
|
181 |
+
"total score updated","totaal score geüpdate"
|
182 |
+
"%s new productreview(s) imported","%s nieuwe productreview(s) geïmporteerd"
|
183 |
+
"Default Review Status","Standaard Review Status"
|
184 |
+
"Invitation Emails","Uitnodiging email"
|
185 |
+
"Default Review Rating","Standaard Review Rating"
|
186 |
+
"Flush Block Cache after import","Flush Block Cache na import"
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Magmodules_Feedbackcompany</name>
|
4 |
-
<version>1.3.
|
5 |
<stability>stable</stability>
|
6 |
<license/>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Connect your Magento shop to The Feedback Company</description>
|
11 |
<notes>First stable release</notes>
|
12 |
<authors><author><name>Magmodules</name><user>auto-converted</user><email>info@magmodules.nl</email></author></authors>
|
13 |
-
<date>2015-11
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Magmodules"><dir name="Feedbackcompany"><dir name="Block"><dir name="Adminhtml"><dir name="Feedbacklog"><file name="Grid.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Magmodules_Feedbackcompany</name>
|
4 |
+
<version>1.3.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license/>
|
7 |
<channel>community</channel>
|
10 |
<description>Connect your Magento shop to The Feedback Company</description>
|
11 |
<notes>First stable release</notes>
|
12 |
<authors><author><name>Magmodules</name><user>auto-converted</user><email>info@magmodules.nl</email></author></authors>
|
13 |
+
<date>2015-12-11</date>
|
14 |
+
<time>13:25:04</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Magmodules"><dir name="Feedbackcompany"><dir name="Block"><dir name="Adminhtml"><dir name="Feedbacklog"><file name="Grid.php" hash="d6ed7cf2bd41867a260f8e4cb81e0cc4"/></dir><dir name="Feedbackreviews"><dir name="Renderer"><file name="Experience.php" hash="b5fd639eea45b31779747da049b66a80"/></dir><file name="Grid.php" hash="e56fee3f655371a066e9f56ce5ae914d"/></dir><dir name="Widget"><dir name="Buttons"><file name="Process.php" hash="4d2bce798a5b9c2b5d62bfe35c27d720"/><file name="Productreviews.php" hash="0085d787137fed6f29cb7679aaa33d71"/></dir><dir name="Field"><file name="Version.php" hash="01bbd4eb77108ef49a8bd7792bf2acd2"/></dir><dir name="Form"><file name="Heading.php" hash="8f820fe2ad56e3c4be54f7f84bc47eca"/><file name="Note.php" hash="974eaf447da64ec78001cd91f3cc3827"/></dir><dir name="Grid"><file name="Log.php" hash="0373924f9c8a6cab8239ebd2565b3c38"/><file name="Seconds.php" hash="a7e6db7624fee7717cba3048f3f5638b"/><file name="Stars.php" hash="8041613a13a202b0df1d376dc38c5e76"/></dir><dir name="Info"><file name="Info.php" hash="fe80bd3c99f8cd6c814ab2ae8ad4cffe"/></dir></dir><file name="Feedbacklog.php" hash="3048f29f8eab3ea9f79e39b775673bdc"/><file name="Feedbackreviews.php" hash="d1cf617989422aa0533d354dfde0fdf1"/></dir><file name="Custom.php" hash="de171ebe7fbc8a6d398c29da4427c0b5"/><file name="Reviews.php" hash="9393b1ffb4f9514cad46a51db24e6ab4"/><file name="Sidebar.php" hash="2cf37dc01dbde2a192f1b3a7f81c60c8"/></dir><dir name="Helper"><file name="Data.php" hash="e08c236b7638b9ba756a66caa36567f8"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Log"><file name="Collection.php" hash="1c6f30ede26cadb9fd4c51f916cbfeb2"/></dir><dir name="Reviews"><file name="Collection.php" hash="17f3acddd0e184f923d137433aaa40ee"/></dir><dir name="Stats"><file name="Collection.php" hash="184fe402b66949e0d4fdb95fc6b4189d"/></dir><file name="Log.php" hash="542d942a56d159d5c1af65ed5c6de857"/><file name="Reviews.php" hash="5518780ad915f644ed9cc319def2da8c"/><file name="Stats.php" hash="268aed9ed09e83611b12c7bbbfca5076"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Attribute.php" hash="de511d86d47ae252e3097c335302c294"/><file name="Category.php" hash="43e5e5d69b764e9c93f9089e0ec64d26"/><file name="Cronfrequency.php" hash="80f7f624a17328052b156c7fde67ff7a"/><file name="Orderstatus.php" hash="64429a1804e1bc5ec2f0ea89e7627fc8"/><file name="Position.php" hash="3c11a9fba6006528bb904036ca87f619"/><file name="Reviewlink.php" hash="87122c1414c49a24222288fe3e96216c"/><file name="Reviewrating.php" hash="ce5b67d3715aec8c8b077646c25e6749"/><file name="Reviewstatus.php" hash="093f7d61767b54e4d51ea7fe57548aa6"/><file name="Sidebarlink.php" hash="9e1a817b4253645b5632306ffd89dd03"/></dir></dir></dir><file name="Api.php" hash="2582089d519336d41a2787552dff9b6e"/><file name="Log.php" hash="996b6d7fe5f5b6a6b94753a1f2714684"/><file name="Observer.php" hash="cbd6ea1f12bb11127206cc6536138770"/><file name="Productreviews.php" hash="fa7f1eec408b8fadd6a9cbf478ab49d4"/><file name="Reviews.php" hash="cbe4ea720fb29156057f6181b41c1517"/><file name="Stats.php" hash="0475942d246cc81c98e35b4232a2fbd3"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="FeedbacklogController.php" hash="29636ed1f4e6d62917913ebad61f75eb"/><file name="FeedbackreviewsController.php" hash="d7e12afbe52a8824aa3ccd558f67c747"/></dir><file name="IndexController.php" hash="da1707d69452f5430305c20c083cba78"/></dir><dir name="etc"><file name="adminhtml.xml" hash="8d51e2aa74e51f8de79650776cff510e"/><file name="config.xml" hash="bf90bc3cbfa8821663e21e83936ad91c"/><file name="system.xml" hash="2c1395e5ea7fff11be72da5f04c5d90c"/></dir><dir name="sql"><dir name="feedbackcompany_setup"><file name="mysql4-install-0.9.0.php" hash="c86ec8f3c3a12cda7dd750cbd21dfca7"/><file name="mysql4-upgrade-1.2.1-1.2.2.php" hash="ef0c26c41ecfe27a20abacd5f041fae6"/><file name="mysql4-upgrade-1.2.5-1.2.6.php" hash="0b7697b895677239dd9b4378e7578b90"/><file name="mysql4-upgrade-1.3.0-1.3.1.php" hash="43059ee4b76d142343921ea5ab73cd50"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="magmodules_feedbackcompany.xml" hash="e602f5a1e7028f893a598e4b171e26b8"/></dir><dir name="template"><dir name="magmodules"><dir name="feedbackcompany"><dir name="sidebar"><file name="left.phtml" hash="ce6032051f6297d0d7754e209a2fe1fd"/><file name="right.phtml" hash="0033188b9d06524aa61dfd703a3b0f0a"/></dir><dir name="widget"><file name="medium.phtml" hash="57a3a491f86331db7b97637a1bd9c45a"/><file name="sidebar.phtml" hash="a3823c23c28bb7ee701ecf73faf147d3"/><file name="small.phtml" hash="a01354bab54c15dcce78aa55482c4bce"/></dir><file name="index.phtml" hash="99be2744c97f5eadcacd3f78d9d4b784"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="magmodules_feedbackcompany.xml" hash="886af6aabcc892da5074c93ad0263006"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magmodules_Feedbackcompany.xml" hash="bcf891696a8602a49ef00ec0440b944a"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Magmodules_Feedbackcompany.csv" hash="2a86f7b1a552e9b5f51840154f6e36c5"/></dir><dir name="nl_NL"><file name="Magmodules_Feedbackcompany.csv" hash="f65bcfa3ad42cff9c2fe21c8d7e81cf3"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="magmodules"><dir name="feedbackcompany"><dir name="images"><file name="5-stars-empty.png" hash="799c499ca785331e7e69d892df52dd48"/><file name="5-stars-full.png" hash="1d06151a2c4da6bb71381538c8a903a5"/><file name="bkg_rating.gif" hash="83c843697e71cbe94ddd75bdedcbcf95"/><file name="bkg_rating2x.gif" hash="f71a52080752ca47b4c19810afd72e54"/><file name="greystar.png" hash="ab99888c7a8f47826ad7a83bcabf9130"/><file name="logo.png" hash="6c8d46ba30a7ae87dcb75db12830b33f"/><file name="small_fill.png" hash="2fa2ce516dddb74497ada0ae8be94380"/><file name="small_grey.png" hash="685735e666b7938f19ffe3b420152572"/><file name="star.png" hash="647c77f0ef881fb2a90a4f53f70d75fa"/></dir><file name="richsnippets.css" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="sidebar.css" hash="899fa85d644384714edc7ab20d4657ee"/><file name="style.css" hash="8d8e704c557822af8df371d3ce0e6e81"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="magmodules"><dir name="feedbackcompany"><file name="grid.css" hash="ea7e85df839bf0eb7bc6882608da80b0"/><file name="star.png" hash="4beacfb62ebdd5feecd946494e895f4c"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
skin/frontend/base/default/magmodules/feedbackcompany/sidebar.css
CHANGED
@@ -12,189 +12,66 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
.feedbackcompany-sidebar-block {
|
22 |
-
padding:10px
|
23 |
-
}
|
24 |
-
|
25 |
-
.feedbackcompany-sidebar-block .rating-name {
|
26 |
-
font-style:italic;
|
27 |
-
vertical-align:middle
|
28 |
-
}
|
29 |
-
|
30 |
-
img.feedbackcompany-logo {
|
31 |
-
display:block;
|
32 |
-
margin:0 auto
|
33 |
-
}
|
34 |
-
|
35 |
-
.feedbackcompany-sidebar-block .rating-empty {
|
36 |
-
float:right;
|
37 |
-
display:block;
|
38 |
-
width:80px;
|
39 |
-
height:16px;
|
40 |
-
background:url(./images/star.png) 0 -16px;
|
41 |
-
margin-right:5px
|
42 |
-
}
|
43 |
-
|
44 |
-
.feedbackcompany-sidebar-block .rating-star-1 {
|
45 |
-
float:left;
|
46 |
-
display:block;
|
47 |
-
width:16px;
|
48 |
-
height:16px;
|
49 |
-
background:url(./images/star.png) 0 0;
|
50 |
-
margin-right:5px
|
51 |
-
}
|
52 |
|
53 |
-
.
|
54 |
-
|
55 |
-
display:block;
|
56 |
-
width:32px;
|
57 |
-
height:16px;
|
58 |
-
background:url(./images/star.png) 0 0;
|
59 |
-
margin-right:5px
|
60 |
}
|
61 |
|
62 |
-
.
|
63 |
-
|
64 |
-
display:block;
|
65 |
-
width:48px;
|
66 |
-
height:16px;
|
67 |
-
background:url(./images/star.png) 0 0;
|
68 |
-
margin-right:5px
|
69 |
}
|
70 |
|
71 |
-
.
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
margin-right:5px
|
78 |
-
}
|
79 |
-
|
80 |
-
.feedbackcompany-sidebar-block .rating-star-5 {
|
81 |
-
float:left;
|
82 |
-
display:block;
|
83 |
-
width:80px;
|
84 |
-
height:16px;
|
85 |
-
background:url(./images/star.png) 0 0;
|
86 |
-
margin-right:5px
|
87 |
-
}
|
88 |
|
89 |
/** big review stars **/
|
90 |
-
.block-content p.company-name {
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
}
|
|
|
95 |
|
96 |
-
.total-block-text {
|
97 |
-
border-bottom:1px solid #ccc;
|
98 |
-
padding-bottom:5px
|
99 |
-
}
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
|
108 |
-
.
|
109 |
-
|
110 |
-
padding-top:0;
|
111 |
-
font-size:11px;
|
112 |
-
font-style:italic
|
113 |
}
|
114 |
|
115 |
-
.
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
margin:5px auto
|
120 |
}
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
background:url(./images/5-stars-full.png) no-repeat
|
126 |
-
}
|
127 |
-
|
128 |
-
.feedbackcompany-snippets .rating-box {
|
129 |
-
float:left;
|
130 |
-
margin-right:4px;
|
131 |
-
margin-top:0;
|
132 |
-
width:69px;
|
133 |
-
height:13px;
|
134 |
-
font-size:0;
|
135 |
-
line-height:0;
|
136 |
-
background:url(images/bkg_rating.gif) 0 0 repeat-x;
|
137 |
-
text-indent:-999em;
|
138 |
-
overflow:hidden
|
139 |
}
|
140 |
|
141 |
-
.feedbackcompany-snippets-snippets .rating {
|
142 |
-
float:left;
|
143 |
-
height:13px;
|
144 |
-
background:url(images/bkg_rating.gif) 0 100% repeat-x
|
145 |
-
}
|
146 |
-
|
147 |
-
.feedbackcompany-small-widget {
|
148 |
-
height:20px
|
149 |
-
}
|
150 |
-
|
151 |
-
.feedbackcompany-small-score {
|
152 |
-
float:left;
|
153 |
-
margin-right:10px
|
154 |
-
}
|
155 |
-
|
156 |
-
.feedbackcompany-small-text {
|
157 |
-
}
|
158 |
-
|
159 |
-
/* MEDIUM WIDGET */
|
160 |
-
.feedbackcompany-medium-widget {
|
161 |
-
background-color:#fff;
|
162 |
-
border-radius:5px;
|
163 |
-
border:1px solid #ECECEC;
|
164 |
-
width:100%;
|
165 |
-
height:100%
|
166 |
-
}
|
167 |
-
|
168 |
-
.feedbackcompany-medium-widget-content {
|
169 |
-
padding: 3%;}
|
170 |
-
|
171 |
-
.feedbackcompany-medium-image {
|
172 |
-
float:right
|
173 |
-
}
|
174 |
-
|
175 |
-
.rating-box {
|
176 |
-
width:75px;
|
177 |
-
height:15px;
|
178 |
-
font-size:0;
|
179 |
-
line-height:0;
|
180 |
-
background:url(images/bkg_rating.gif) 0 0 repeat-x;
|
181 |
-
background-size:15px;
|
182 |
-
text-indent:-999em;
|
183 |
-
overflow:hidden
|
184 |
-
}
|
185 |
-
|
186 |
-
.rating-box .rating {
|
187 |
-
float:left;
|
188 |
-
height:15px;
|
189 |
-
background:url(images/bkg_rating.gif) 0 100% repeat-x;
|
190 |
-
background-size:15px
|
191 |
-
}
|
192 |
-
|
193 |
-
.ratings .rating-box {
|
194 |
-
float:left;
|
195 |
-
margin:2px 3px 0 0
|
196 |
-
}
|
197 |
|
198 |
-
|
199 |
-
|
|
|
200 |
}
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
+
* @category Magmodules
|
16 |
+
* @package Magmodules_Webwinkelkeur
|
17 |
+
* @author Magmodules <info@magmodules.eu)
|
18 |
+
* @copyright Copyright (c) 2014 (http://www.magmodules.eu)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
+
.webwinkelkeur-sidebar-block {
|
23 |
+
padding: 10px;
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
|
26 |
+
.webwinkelkeur-sidebar-block .rating-name {
|
27 |
+
font-style: italic;
|
|
|
|
|
|
|
|
|
|
|
28 |
}
|
29 |
|
30 |
+
.webwinkelkeur-sidebar-block .rating-empty { float: right; display: block; width: 80px; height: 16px; background: url('./images/star.png') 0 -16px; margin-right: 5px; }
|
31 |
+
.webwinkelkeur-sidebar-block .rating-star-1 { float: left; display: block; width: 16px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
|
32 |
+
.webwinkelkeur-sidebar-block .rating-star-2 { float: left; display: block; width: 32px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
|
33 |
+
.webwinkelkeur-sidebar-block .rating-star-3 { float: left; display: block; width: 48px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
|
34 |
+
.webwinkelkeur-sidebar-block .rating-star-4 { float: left; display: block; width: 64px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
|
35 |
+
.webwinkelkeur-sidebar-block .rating-star-5 { float: left; display: block; width: 80px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
/** big review stars **/
|
38 |
+
.block-content p.company-name { text-align: center; margin: 5px auto; font-size: 12px; }
|
39 |
+
.total-block-text { border-bottom: 1px solid #ccc; padding-bottom: 5px; }
|
40 |
+
.total-block-text p { text-align: center; padding-top: 5px; margin-bottom: 2px; font-size: 18px; }
|
41 |
+
.total-block-text p.based-on { text-align: center; padding-top: 0px; font-size: 11px; font-style: italic; }
|
42 |
+
.total-block-stars { height: 35px; width: 188px; background: url('./images/5-stars-empty.png') no-repeat; margin: 5px auto; }
|
43 |
+
.total-block-stars span{ display: block; height: 50px; background: url('./images/5-stars-full.png') no-repeat; }
|
44 |
|
|
|
|
|
|
|
|
|
45 |
|
46 |
+
/* CUSTOM BLOCK */
|
47 |
+
.webwinkelconnect-custom {
|
48 |
+
font-weight: bold;
|
49 |
+
font-size: 13px;
|
50 |
+
display: block;
|
51 |
+
border: .25em solid #eee;
|
52 |
+
background: #f6f6f6;
|
53 |
+
padding: 1.0em;
|
54 |
+
width: 30%;
|
55 |
+
text-align: center;
|
56 |
}
|
57 |
|
58 |
+
.webwinkelconnect-custom .client {
|
59 |
+
font-size: 16px;
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
+
.webwinkelconnect-custom .rating-box {
|
63 |
+
margin-left: 40%;
|
64 |
+
margin-top: 10px;
|
65 |
+
margin-bottom: 10px;
|
|
|
66 |
}
|
67 |
+
.webwinkelconnect-custom .number {
|
68 |
+
font-size: 11px;
|
69 |
+
font-style: italic;
|
70 |
+
font-weight: 300;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
+
@media (max-width: 961px) {
|
75 |
+
.total-block-stars {background-size:143px auto;width:143px;}
|
76 |
+
.total-block-stars span {background-size:143px auto;}
|
77 |
}
|