Version Notes
Magmodules_Sooqr
Download this release
Release Info
Developer | Magmodules |
Extension | Magmodules_Sooqr |
Version | 1.1.5 |
Comparing to | |
See all releases |
Code changes from version 1.1.4 to 1.1.5
- app/code/community/Magmodules/Sooqr/Block/Search.php +11 -1
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Backend/Sooqr/Cron.php +34 -17
- app/code/community/Magmodules/Sooqr/Model/Observer.php +3 -3
- app/code/community/Magmodules/Sooqr/Model/Sooqr.php +8 -2
- app/code/community/Magmodules/Sooqr/controllers/Adminhtml/SooqrController.php +23 -27
- app/code/community/Magmodules/Sooqr/etc/config.xml +3 -4
- app/code/community/Magmodules/Sooqr/etc/system.xml +5 -4
- app/design/frontend/base/default/layout/magmodules_sooqr.xml +1 -1
- app/design/frontend/base/default/template/magmodules/sooqr/form.mini.phtml +16 -25
- package.xml +4 -4
app/code/community/Magmodules/Sooqr/Block/Search.php
CHANGED
@@ -17,9 +17,19 @@
|
|
17 |
|
18 |
class Magmodules_Sooqr_Block_Search extends Mage_Core_Block_Template {
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
public function isEnabled()
|
21 |
{
|
22 |
-
$enabled = Mage::getStoreConfig('sooqr_connect/general/enabled');
|
23 |
$frontend_enabled = Mage::getStoreConfig('sooqr_connect/general/frontend_enabled');
|
24 |
$account_id = Mage::getStoreConfig('sooqr_connect/general/account_id');
|
25 |
$api_key = Mage::getStoreConfig('sooqr_connect/general/api_key');
|
17 |
|
18 |
class Magmodules_Sooqr_Block_Search extends Mage_Core_Block_Template {
|
19 |
|
20 |
+
protected function _construct()
|
21 |
+
{
|
22 |
+
if($this->isEnabled()) {
|
23 |
+
$this->setTemplate('magmodules/sooqr/form.mini.phtml');
|
24 |
+
} else {
|
25 |
+
$this->setTemplate('catalogsearch/form.mini.phtml');
|
26 |
+
}
|
27 |
+
parent::_construct();
|
28 |
+
}
|
29 |
+
|
30 |
public function isEnabled()
|
31 |
{
|
32 |
+
$enabled = Mage::getStoreConfig('sooqr_connect/general/enabled', 0);
|
33 |
$frontend_enabled = Mage::getStoreConfig('sooqr_connect/general/frontend_enabled');
|
34 |
$account_id = Mage::getStoreConfig('sooqr_connect/general/account_id');
|
35 |
$api_key = Mage::getStoreConfig('sooqr_connect/general/api_key');
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Backend/Sooqr/Cron.php
CHANGED
@@ -17,29 +17,32 @@
|
|
17 |
|
18 |
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Backend_Sooqr_Cron extends Mage_Core_Model_Config_Data {
|
19 |
|
20 |
-
const CRON_MODEL_PATH = '
|
|
|
|
|
21 |
|
22 |
protected function _afterSave()
|
23 |
{
|
24 |
-
$enabled = $this->getData('groups/generate/fields/enabled/value');
|
25 |
$time = $this->getData('groups/generate/fields/time/value');
|
26 |
$frequency = $this->getData('groups/generate/fields/frequency/value');
|
27 |
$store_ids = Mage::helper('sooqr')->getStoreIds('sooqr_connect/generate/enabled');
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
35 |
-
|
36 |
-
$minute[] = ($i * $n);
|
37 |
-
}
|
38 |
$minute = implode(',', $minute);
|
39 |
-
|
40 |
switch($frequency) {
|
41 |
case 0:
|
42 |
-
$cronExprArray = array(
|
43 |
break;
|
44 |
case 6:
|
45 |
$cronExprArray = array($minute, '*/6', '*', '*', '*');
|
@@ -54,15 +57,29 @@ class Magmodules_Sooqr_Model_Adminhtml_System_Config_Backend_Sooqr_Cron extends
|
|
54 |
$cronExprArray = array($minute, '*', '*', '*', '*');
|
55 |
break;
|
56 |
}
|
57 |
-
|
58 |
} else {
|
59 |
$cronExprString = '';
|
60 |
-
}
|
61 |
try {
|
62 |
-
Mage::getModel('core/config_data')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
} catch (Exception $e) {
|
64 |
throw new Exception(Mage::helper('cron')->__('Unable to save the cron expression.'));
|
65 |
}
|
66 |
}
|
67 |
|
68 |
-
}
|
17 |
|
18 |
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Backend_Sooqr_Cron extends Mage_Core_Model_Config_Data {
|
19 |
|
20 |
+
const CRON_MODEL_PATH = 'sooqr_connect/generate/cron_schedule';
|
21 |
+
const CRON_STRING_PATH = 'crontab/jobs/sooqr_generate/schedule/cron_expr';
|
22 |
+
const CRON_RUNMODEL_PATH = 'crontab/jobs/sooqr_generate/run/model';
|
23 |
|
24 |
protected function _afterSave()
|
25 |
{
|
|
|
26 |
$time = $this->getData('groups/generate/fields/time/value');
|
27 |
$frequency = $this->getData('groups/generate/fields/frequency/value');
|
28 |
$store_ids = Mage::helper('sooqr')->getStoreIds('sooqr_connect/generate/enabled');
|
29 |
+
$count = count($store_ids);
|
30 |
+
if($count > 0) {
|
31 |
+
$minute[0] = 0;
|
32 |
+
$n = floor(60/$count);
|
33 |
+
if($n == 60) { $n = 0; }
|
34 |
+
for($i = 1; $i < $count; $i++) {
|
35 |
+
$min = ($minute[0] + ($i * $n));
|
36 |
+
if($min >= 60) {
|
37 |
+
$min = ($minute[0] - ($i * $n));
|
38 |
+
}
|
39 |
+
$minute[] = $min;
|
40 |
}
|
41 |
+
asort($minute);
|
|
|
|
|
42 |
$minute = implode(',', $minute);
|
|
|
43 |
switch($frequency) {
|
44 |
case 0:
|
45 |
+
$cronExprArray = array($minute, intval($time[0]), '*', '*', '*');
|
46 |
break;
|
47 |
case 6:
|
48 |
$cronExprArray = array($minute, '*/6', '*', '*', '*');
|
57 |
$cronExprArray = array($minute, '*', '*', '*', '*');
|
58 |
break;
|
59 |
}
|
60 |
+
$cronExprString = join(' ', $cronExprArray);
|
61 |
} else {
|
62 |
$cronExprString = '';
|
63 |
+
}
|
64 |
try {
|
65 |
+
Mage::getModel('core/config_data')
|
66 |
+
->load(self::CRON_MODEL_PATH, 'path')
|
67 |
+
->setValue($cronExprString)
|
68 |
+
->setPath(self::CRON_MODEL_PATH)
|
69 |
+
->save();
|
70 |
+
Mage::getModel('core/config_data')
|
71 |
+
->load(self::CRON_STRING_PATH, 'path')
|
72 |
+
->setValue($cronExprString)
|
73 |
+
->setPath(self::CRON_STRING_PATH)
|
74 |
+
->save();
|
75 |
+
Mage::getModel('core/config_data')
|
76 |
+
->load(self::CRON_RUNMODEL_PATH, 'path')
|
77 |
+
->setValue((string) Mage::getConfig()->getNode(self::CRON_RUNMODEL_PATH))
|
78 |
+
->setPath(self::CRON_RUNMODEL_PATH)
|
79 |
+
->save();
|
80 |
} catch (Exception $e) {
|
81 |
throw new Exception(Mage::helper('cron')->__('Unable to save the cron expression.'));
|
82 |
}
|
83 |
}
|
84 |
|
85 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Observer.php
CHANGED
@@ -22,8 +22,8 @@ class Magmodules_Sooqr_Model_Observer {
|
|
22 |
$enabled = Mage::getStoreConfig('sooqr_connect/general/enabled');
|
23 |
$cron = Mage::getStoreConfig('sooqr_connect/generate/cron');
|
24 |
$next_store = Mage::getStoreConfig('sooqr_connect/generate/cron_next');
|
25 |
-
|
26 |
-
|
27 |
if(empty($next_store) || ($next_store >= count($storeIds))) {
|
28 |
$next_store = 0;
|
29 |
}
|
@@ -31,7 +31,7 @@ class Magmodules_Sooqr_Model_Observer {
|
|
31 |
$time_start = microtime(true);
|
32 |
$appEmulation = Mage::getSingleton('core/app_emulation');
|
33 |
$initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($store_id);
|
34 |
-
if($result = Mage::getModel('sooqr/sooqr')->generateFeed($store_id)) {
|
35 |
$html = '<a href="' . $result['url'] . '" target="_blank">' . $result['url'] .'</a><br/><small>Date: ' . $result['date'] . ' (cron) - Products: ' . $result['qty'] . ' - Time: ' . number_format((microtime(true) - $time_start), 4) . '</small>';
|
36 |
$config = new Mage_Core_Model_Config();
|
37 |
$config->saveConfig('sooqr_connect/generate/feed_result', $html, 'stores', $store_id);
|
22 |
$enabled = Mage::getStoreConfig('sooqr_connect/general/enabled');
|
23 |
$cron = Mage::getStoreConfig('sooqr_connect/generate/cron');
|
24 |
$next_store = Mage::getStoreConfig('sooqr_connect/generate/cron_next');
|
25 |
+
$storeIds = Mage::helper('sooqr')->getStoreIds('sooqr_connect/generate/enabled');
|
26 |
+
if($enabled && $cron && (count($storeIds) > 0)) {
|
27 |
if(empty($next_store) || ($next_store >= count($storeIds))) {
|
28 |
$next_store = 0;
|
29 |
}
|
31 |
$time_start = microtime(true);
|
32 |
$appEmulation = Mage::getSingleton('core/app_emulation');
|
33 |
$initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($store_id);
|
34 |
+
if($result = Mage::getModel('sooqr/sooqr')->generateFeed($store_id, '', $time_start)) {
|
35 |
$html = '<a href="' . $result['url'] . '" target="_blank">' . $result['url'] .'</a><br/><small>Date: ' . $result['date'] . ' (cron) - Products: ' . $result['qty'] . ' - Time: ' . number_format((microtime(true) - $time_start), 4) . '</small>';
|
36 |
$config = new Mage_Core_Model_Config();
|
37 |
$config->saveConfig('sooqr_connect/generate/feed_result', $html, 'stores', $store_id);
|
app/code/community/Magmodules/Sooqr/Model/Sooqr.php
CHANGED
@@ -238,11 +238,16 @@ class Magmodules_Sooqr_Model_Sooqr extends Magmodules_Sooqr_Model_Common {
|
|
238 |
|
239 |
protected function getAssocId($data)
|
240 |
{
|
|
|
241 |
if(empty($data['assoc_id'])) {
|
242 |
-
$assoc_id = array();
|
243 |
$assoc_id['assoc_id'] = $data['id'];
|
244 |
-
return $assoc_id;
|
245 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
}
|
247 |
|
248 |
protected function getCategoryData($product_data, $config)
|
@@ -294,6 +299,7 @@ class Magmodules_Sooqr_Model_Sooqr extends Magmodules_Sooqr_Model_Common {
|
|
294 |
$header['url'] = $config['website_url'];
|
295 |
$header['products_total'] = $count;
|
296 |
$header['products_limit'] = $config['limit'];
|
|
|
297 |
$header['processing_time'] = number_format((microtime(true) - $time_start), 4);
|
298 |
return $header;
|
299 |
}
|
238 |
|
239 |
protected function getAssocId($data)
|
240 |
{
|
241 |
+
$assoc_id = array();
|
242 |
if(empty($data['assoc_id'])) {
|
|
|
243 |
$assoc_id['assoc_id'] = $data['id'];
|
|
|
244 |
}
|
245 |
+
if($data['product_object_type'] != 'simple') {
|
246 |
+
$assoc_id['is_parent'] = '1';
|
247 |
+
} else {
|
248 |
+
$assoc_id['is_parent'] = '0';
|
249 |
+
}
|
250 |
+
return $assoc_id;
|
251 |
}
|
252 |
|
253 |
protected function getCategoryData($product_data, $config)
|
299 |
$header['url'] = $config['website_url'];
|
300 |
$header['products_total'] = $count;
|
301 |
$header['products_limit'] = $config['limit'];
|
302 |
+
$header['date_created'] = Mage::getModel('core/date')->date('Y-m-d H:i:s');
|
303 |
$header['processing_time'] = number_format((microtime(true) - $time_start), 4);
|
304 |
return $header;
|
305 |
}
|
app/code/community/Magmodules/Sooqr/controllers/Adminhtml/SooqrController.php
CHANGED
@@ -19,33 +19,29 @@ class Magmodules_Sooqr_Adminhtml_SooqrController extends Mage_Adminhtml_Controll
|
|
19 |
|
20 |
public function generateFeedAction($store_id = '')
|
21 |
{
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
Mage::getSingleton('adminhtml/session')->addNotice(Mage::helper('sooqr')->__('Note, in the feed generate configuration tab you have enabled the product limit of %s.', $limit));
|
37 |
-
}
|
38 |
-
} else {
|
39 |
-
$config = new Mage_Core_Model_Config();
|
40 |
-
$config->saveConfig('sooqr_connect/generate/feed_result', '', 'stores', $store_id);
|
41 |
-
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('sooqr')->__('No products found, make sure your filters are configured with existing values.'));
|
42 |
-
Mage::app()->getCacheInstance()->cleanType('config');
|
43 |
}
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
49 |
$this->_redirect('adminhtml/system_config/edit/section/sooqr_connect');
|
50 |
}
|
51 |
|
@@ -77,7 +73,7 @@ class Magmodules_Sooqr_Adminhtml_SooqrController extends Mage_Adminhtml_Controll
|
|
77 |
}
|
78 |
}
|
79 |
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('sooqr')->__('Attributes added to Flat Catalog, please reindex Product Flat Data.'));
|
80 |
-
$this->_redirect('adminhtml/system_config/edit/section/
|
81 |
}
|
82 |
|
83 |
protected function _isAllowed()
|
19 |
|
20 |
public function generateFeedAction($store_id = '')
|
21 |
{
|
22 |
+
$store_id = $this->getRequest()->getParam('store_id');
|
23 |
+
if(!empty($store_id)) {
|
24 |
+
$time_start = microtime(true);
|
25 |
+
$appEmulation = Mage::getSingleton('core/app_emulation');
|
26 |
+
$initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($store_id);
|
27 |
+
if($result = Mage::getModel('sooqr/sooqr')->generateFeed($store_id, '', $time_start)) {
|
28 |
+
$html = '<a href="' . $result['url'] . '" target="_blank">' . $result['url'] .'</a><br/><small>Date: ' . $result['date'] . ' (manual) - Products: ' . $result['qty'] . ' - Time: ' . number_format((microtime(true) - $time_start), 4) . '</small>';
|
29 |
+
$config = new Mage_Core_Model_Config();
|
30 |
+
$config->saveConfig('sooqr_connect/generate/feed_result', $html, 'stores', $store_id);
|
31 |
+
Mage::app()->getCacheInstance()->cleanType('config');
|
32 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('sooqr')->__('Generated feed with %s products. %s', $result['qty'], '<a style="float:right;" href="' . $this->getUrl('*/sooqr/download/store_id/' . $store_id) . '">Download XML</a>'));
|
33 |
+
$limit = Mage::getStoreConfig('sooqr_connect/generate/limit', $store_id);
|
34 |
+
if($limit > 0) {
|
35 |
+
Mage::getSingleton('adminhtml/session')->addNotice(Mage::helper('sooqr')->__('Note, in the feed generate configuration tab you have enabled the product limit of %s.', $limit));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
+
} else {
|
38 |
+
$config = new Mage_Core_Model_Config();
|
39 |
+
$config->saveConfig('sooqr_connect/generate/feed_result', '', 'stores', $store_id);
|
40 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('sooqr')->__('No products found, make sure your filters are configured with existing values.'));
|
41 |
+
Mage::app()->getCacheInstance()->cleanType('config');
|
42 |
+
}
|
43 |
+
$appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
|
44 |
+
}
|
45 |
$this->_redirect('adminhtml/system_config/edit/section/sooqr_connect');
|
46 |
}
|
47 |
|
73 |
}
|
74 |
}
|
75 |
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('sooqr')->__('Attributes added to Flat Catalog, please reindex Product Flat Data.'));
|
76 |
+
$this->_redirect('adminhtml/system_config/edit/section/sooqr_connect');
|
77 |
}
|
78 |
|
79 |
protected function _isAllowed()
|
app/code/community/Magmodules/Sooqr/etc/config.xml
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
<config>
|
20 |
<modules>
|
21 |
<Magmodules_Sooqr>
|
22 |
-
<version>1.1.
|
23 |
</Magmodules_Sooqr>
|
24 |
</modules>
|
25 |
<global>
|
@@ -124,9 +124,8 @@
|
|
124 |
<crontab>
|
125 |
<jobs>
|
126 |
<sooqr_generate>
|
127 |
-
<schedule><config_path>sooqr/generate/cron_schedule</config_path></schedule>
|
128 |
<run><model>sooqr/observer::scheduledGenerateSooqr</model></run>
|
129 |
-
</sooqr_generate>
|
130 |
</jobs>
|
131 |
-
</crontab>
|
132 |
</config>
|
19 |
<config>
|
20 |
<modules>
|
21 |
<Magmodules_Sooqr>
|
22 |
+
<version>1.1.5</version>
|
23 |
</Magmodules_Sooqr>
|
24 |
</modules>
|
25 |
<global>
|
124 |
<crontab>
|
125 |
<jobs>
|
126 |
<sooqr_generate>
|
|
|
127 |
<run><model>sooqr/observer::scheduledGenerateSooqr</model></run>
|
128 |
+
</sooqr_generate>
|
129 |
</jobs>
|
130 |
+
</crontab>
|
131 |
</config>
|
app/code/community/Magmodules/Sooqr/etc/system.xml
CHANGED
@@ -72,8 +72,8 @@
|
|
72 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
73 |
<sort_order>3</sort_order>
|
74 |
<show_in_default>1</show_in_default>
|
75 |
-
<show_in_website>
|
76 |
-
<show_in_store>
|
77 |
</enabled>
|
78 |
<api_heading translate="label">
|
79 |
<label>API Details</label>
|
@@ -91,6 +91,7 @@
|
|
91 |
<show_in_website>1</show_in_website>
|
92 |
<show_in_store>1</show_in_store>
|
93 |
<tooltip>You can find your Sooqr Account ID in your Sooqr account, you can find the link in the information box at the top of this page.</tooltip>
|
|
|
94 |
</account_id>
|
95 |
<api_key translate="label">
|
96 |
<label>Sooqr API Key</label>
|
@@ -571,14 +572,14 @@
|
|
571 |
<depends><overwrite>1</overwrite></depends>
|
572 |
<comment><![CDATA[This overwrites the maximum time in seconds a script is allowed to run before it is terminated by the parser, eg: 300 (for 5 minutes).]]></comment>
|
573 |
</max_execution_time>
|
574 |
-
<
|
575 |
<label>Cron</label>
|
576 |
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
577 |
<sort_order>30</sort_order>
|
578 |
<show_in_default>1</show_in_default>
|
579 |
<show_in_website>1</show_in_website>
|
580 |
<show_in_store>1</show_in_store>
|
581 |
-
</
|
582 |
<cron translate="label">
|
583 |
<label>Enabled</label>
|
584 |
<frontend_type>select</frontend_type>
|
72 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
73 |
<sort_order>3</sort_order>
|
74 |
<show_in_default>1</show_in_default>
|
75 |
+
<show_in_website>0</show_in_website>
|
76 |
+
<show_in_store>0</show_in_store>
|
77 |
</enabled>
|
78 |
<api_heading translate="label">
|
79 |
<label>API Details</label>
|
91 |
<show_in_website>1</show_in_website>
|
92 |
<show_in_store>1</show_in_store>
|
93 |
<tooltip>You can find your Sooqr Account ID in your Sooqr account, you can find the link in the information box at the top of this page.</tooltip>
|
94 |
+
<comment>It should look like SQ-12345-1.</comment>
|
95 |
</account_id>
|
96 |
<api_key translate="label">
|
97 |
<label>Sooqr API Key</label>
|
572 |
<depends><overwrite>1</overwrite></depends>
|
573 |
<comment><![CDATA[This overwrites the maximum time in seconds a script is allowed to run before it is terminated by the parser, eg: 300 (for 5 minutes).]]></comment>
|
574 |
</max_execution_time>
|
575 |
+
<cron_heading translate="label">
|
576 |
<label>Cron</label>
|
577 |
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
578 |
<sort_order>30</sort_order>
|
579 |
<show_in_default>1</show_in_default>
|
580 |
<show_in_website>1</show_in_website>
|
581 |
<show_in_store>1</show_in_store>
|
582 |
+
</cron_heading>
|
583 |
<cron translate="label">
|
584 |
<label>Enabled</label>
|
585 |
<frontend_type>select</frontend_type>
|
app/design/frontend/base/default/layout/magmodules_sooqr.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<layout version="0.1.0">
|
3 |
<default>
|
4 |
<reference name="header">
|
5 |
-
<block type="sooqr/search" name="top.search" as="topSearch"
|
6 |
</reference>
|
7 |
</default>
|
8 |
</layout>
|
2 |
<layout version="0.1.0">
|
3 |
<default>
|
4 |
<reference name="header">
|
5 |
+
<block type="sooqr/search" name="top.search" as="topSearch" />
|
6 |
</reference>
|
7 |
</default>
|
8 |
</layout>
|
app/design/frontend/base/default/template/magmodules/sooqr/form.mini.phtml
CHANGED
@@ -26,29 +26,20 @@
|
|
26 |
<input id="search" type="search" name="<?php echo $catalogSearchHelper->getQueryParamName() ?>" value="<?php echo $catalogSearchHelper->getEscapedQueryText() ?>" class="input-text required-entry" placeholder="<?php echo $this->quoteEscape($this->__('Search entire store here...')) ?>" />
|
27 |
<button type="submit" title="<?php echo $this->quoteEscape($this->__('Search')) ?>" class="button search-button"><span><span><?php echo $this->__('Search') ?></span></span></button>
|
28 |
</div>
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
(
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
</script>
|
46 |
-
<?php else: ?>
|
47 |
-
<script type="text/javascript">
|
48 |
-
//<![CDATA[
|
49 |
-
var searchForm = new Varien.searchForm('search_mini_form', 'search', '');
|
50 |
-
searchForm.initAutocomplete('<?php echo $catalogSearchHelper->getSuggestUrl() ?>', 'search_autocomplete');
|
51 |
-
//]]>
|
52 |
-
</script>
|
53 |
-
<?php endif; ?>
|
54 |
</form>
|
26 |
<input id="search" type="search" name="<?php echo $catalogSearchHelper->getQueryParamName() ?>" value="<?php echo $catalogSearchHelper->getEscapedQueryText() ?>" class="input-text required-entry" placeholder="<?php echo $this->quoteEscape($this->__('Search entire store here...')) ?>" />
|
27 |
<button type="submit" title="<?php echo $this->quoteEscape($this->__('Search')) ?>" class="button search-button"><span><span><?php echo $this->__('Search') ?></span></span></button>
|
28 |
</div>
|
29 |
+
<script type="text/javascript">
|
30 |
+
var _wssq = _wssq || [];
|
31 |
+
_wssq.push(['_load', { 'suggest' : <?php echo json_encode($this->getSooqrOptions()) ?>}]);
|
32 |
+
_wssq.push(['suggest._setPosition', 'screen-middle']);
|
33 |
+
_wssq.push(['suggest._setLocale', '<?php echo $this->getSooqrLanguage() ?>']);
|
34 |
+
_wssq.push(['suggest._setFixedFilters', { 'magento_store' : '<?php echo Mage::app()->getStore()->getCode(); ?>' }]);
|
35 |
+
<?php if (!$this->isTrackingEnabled()) { ?>
|
36 |
+
_wssq.push(['suggest._disableTracking']);
|
37 |
+
<?php } ?>
|
38 |
+
<?php echo $this->getSooqrJavascript() ?>
|
39 |
+
(function() {
|
40 |
+
var ws = document.createElement('script'); ws.type = 'text/javascript'; ws.async = true;
|
41 |
+
ws.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + '<?php echo $this->getSooqrScriptUri() ?>';
|
42 |
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ws, s);
|
43 |
+
})();
|
44 |
+
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
</form>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Magmodules_Sooqr</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.magmodules.eu/license-agreement/">Single Server License</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Magmodules_Sooqr</description>
|
11 |
<notes>Magmodules_Sooqr</notes>
|
12 |
<authors><author><name>Magmodules</name><user>magmodules</user><email>info@magmodules.nl</email></author></authors>
|
13 |
-
<date>2016-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Magmodules"><dir name="Sooqr"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Extra.php" hash="e583284820c631015ed78c131bf3cfa8"/><file name="Filter.php" hash="e21c1f53da21d4f3afbfe7691efce06e"/></dir><dir name="Renderer"><file name="Select.php" hash="69d71d66aaf7b842ef482affd484ec48"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Feeds.php" hash="29007ed679b14e737b5dd784fc0eb668"/><file name="Heading.php" hash="a89db4f294f9c9e6785745163b1aed5f"/><file name="Note.php" hash="f131e40d8a0f4ed2e444d9e692a91ed5"/><file name="Version.php" hash="5832a42f30122977420d722683211f66"/></dir></dir></dir></dir><dir name="Widget"><dir name="Info"><file name="Info.php" hash="e8504af6f540c446f46603644cbe0e25"/></dir></dir></dir><file name="Search.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Magmodules_Sooqr</name>
|
4 |
+
<version>1.1.5</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.magmodules.eu/license-agreement/">Single Server License</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Magmodules_Sooqr</description>
|
11 |
<notes>Magmodules_Sooqr</notes>
|
12 |
<authors><author><name>Magmodules</name><user>magmodules</user><email>info@magmodules.nl</email></author></authors>
|
13 |
+
<date>2016-07-14</date>
|
14 |
+
<time>11:36:42</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Magmodules"><dir name="Sooqr"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Extra.php" hash="e583284820c631015ed78c131bf3cfa8"/><file name="Filter.php" hash="e21c1f53da21d4f3afbfe7691efce06e"/></dir><dir name="Renderer"><file name="Select.php" hash="69d71d66aaf7b842ef482affd484ec48"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Feeds.php" hash="29007ed679b14e737b5dd784fc0eb668"/><file name="Heading.php" hash="a89db4f294f9c9e6785745163b1aed5f"/><file name="Note.php" hash="f131e40d8a0f4ed2e444d9e692a91ed5"/><file name="Version.php" hash="5832a42f30122977420d722683211f66"/></dir></dir></dir></dir><dir name="Widget"><dir name="Info"><file name="Info.php" hash="e8504af6f540c446f46603644cbe0e25"/></dir></dir></dir><file name="Search.php" hash="2acb516fec2f419e260240e8647c5999"/></dir><dir name="Helper"><file name="Data.php" hash="647b5e642566af455a3afcd312be1701"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Design"><file name="Extra.php" hash="3e262b80ccc673e415bf51bf172c72d4"/><file name="Filter.php" hash="e6fac56290f6d0d7be78553e75cb18a3"/></dir><dir name="Sooqr"><file name="Cron.php" hash="905e30c03db2952d66c00eebc8b77477"/></dir></dir><dir name="Source"><file name="Action.php" hash="ef9830d9c1a98c94991626c4cc4909c9"/><file name="Attribute.php" hash="6f3736cd2f7de23b9d74356d7c1c557f"/><file name="Cacheresize.php" hash="86a916189abef3a670e58f3a8298f894"/><file name="Category.php" hash="92b245d0758fbe075b79c397a96d8567"/><file name="Categorytype.php" hash="8bc5f054db86f543019a6762a6a98562"/><file name="Condition.php" hash="bd66be4fe74f549d5fa6c213bd9b64f6"/><file name="Conditions.php" hash="502fe20b60e397240b8d552fd5ea4d81"/><file name="Configurable.php" hash="34a165474618953e44fd1de305371907"/><file name="Frequency.php" hash="f03bd90b098412026b21884e72c89aaf"/><file name="Identifier.php" hash="cdf5bd32696cb92a6f3be396ce5b3a6d"/><file name="Image.php" hash="610936b70a0cf63a3497a912bf885e06"/><file name="Images.php" hash="08658a5e913e334959ec476a61e2891f"/><file name="Pricemodel.php" hash="dbbeabc2853a7caecab3fc42a557766b"/><file name="Productid.php" hash="e4b431e0183d91bdd4f186f001119e77"/><file name="Producttype.php" hash="88d0e8386f59d7c0ea62a19cbf800fa4"/><file name="Resize.php" hash="1a0824757d8c87f85225f063de3a025b"/><file name="Selectattribute.php" hash="bcae6eff0788821f7d3dbf7d224b59e4"/><file name="Status.php" hash="2f474fe7188e3b1cf1d1714ffebcd9e8"/><file name="Tax.php" hash="c6e19d702751bc0c616768fceaf53855"/><file name="Textattribute.php" hash="9645d5652679a972a280cf337ab8662b"/><file name="Varcharattribute.php" hash="37a9253e8ea806f3402052a0b0744707"/><file name="Version.php" hash="906736f8f04f03421ab56a0c042639aa"/><file name="Visibility.php" hash="67f20c3b4581144b11ca8696c885b97d"/><file name="Weight.php" hash="fbc88d0b6bd073d00dc6e4a05ce1b4df"/></dir></dir></dir></dir><file name="Common.php" hash="b93ebcb4666437da90a125b99f0c5c5c"/><file name="Observer.php" hash="3aaaef864111e5d83f0b4d55c7618967"/><file name="Sooqr.php" hash="3a92a0a2eb471bf5a1f15a2bbc91f4ed"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SooqrController.php" hash="13d562363e6e665825fed5b86f9d470f"/></dir><file name="InstallationController.php" hash="a96e58cbab2c7b6a3a4c9b42de62a59f"/></dir><dir name="etc"><file name="adminhtml.xml" hash="cf4313a4daa72837c48e137b51b11eba"/><file name="config.xml" hash="1dae2016da9d401cd0f906af68d42742"/><file name="system.xml" hash="cdd85d70d0ac8a467621e9a04ab24b03"/></dir></dir></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Magmodules_Sooqr.csv" hash="38992a5f4cf87eeee3d06ab38ead900b"/></dir><dir name="nl_NL"><file name="Magmodules_Sooqr.csv" hash="2fe3afa7c7597cf53c985aef2388ae24"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magmodules_Sooqr.xml" hash="eeec89a005c4ccb1ed86bf90c446e3ef"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="magmodules"><dir name="sooqr"><file name="form.mini.phtml" hash="dfb86fc52128baeef3c81f1f1eb6cc1c"/></dir></dir></dir><dir name="layout"><file name="magmodules_sooqr.xml" hash="62a14cd61d3d74653b8d883d4d6b9d8d"/></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|