Version Notes
Magmodules_Sooqr
Download this release
Release Info
Developer | Magmodules |
Extension | Magmodules_Sooqr |
Version | 1.1.8 |
Comparing to | |
See all releases |
Code changes from version 1.1.7 to 1.1.8
- app/code/community/Magmodules/Sooqr/Block/Adminhtml/System/Config/Form/Field/Feeds.php +3 -2
- app/code/community/Magmodules/Sooqr/Block/Adminhtml/Widget/Info/Info.php +10 -5
- app/code/community/Magmodules/Sooqr/Helper/Data.php +22 -13
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Backend/Sooqr/Cron.php +26 -18
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Frequency.php +10 -12
- app/code/community/Magmodules/Sooqr/Model/Observer.php +1 -2
- app/code/community/Magmodules/Sooqr/Model/Sooqr.php +11 -3
- app/code/community/Magmodules/Sooqr/controllers/Adminhtml/SooqrController.php +0 -2
- app/code/community/Magmodules/Sooqr/etc/config.xml +1 -1
- app/code/community/Magmodules/Sooqr/etc/system.xml +11 -11
- package.xml +5 -5
app/code/community/Magmodules/Sooqr/Block/Adminhtml/System/Config/Form/Field/Feeds.php
CHANGED
@@ -19,12 +19,13 @@ class Magmodules_Sooqr_Block_Adminhtml_System_Config_Form_Field_Feeds extends M
|
|
19 |
|
20 |
public function render(Varien_Data_Form_Element_Abstract $element)
|
21 |
{
|
22 |
-
$
|
|
|
23 |
$html_feedlinks = '';
|
24 |
foreach($store_ids as $storeId) {
|
25 |
$generate_url = $this->getUrl('*/sooqr/generateFeed/store_id/' . $storeId);
|
26 |
$download_url = $this->getUrl('*/sooqr/download/store_id/' . $storeId);
|
27 |
-
$feed_text =
|
28 |
if(empty($feed_text)) {
|
29 |
$feed_text = Mage::helper('sooqr')->__('No active feed found');
|
30 |
$download_url = '';
|
19 |
|
20 |
public function render(Varien_Data_Form_Element_Abstract $element)
|
21 |
{
|
22 |
+
$helper = Mage::helper('sooqr');
|
23 |
+
$store_ids = $helper->getStoreIds('sooqr_connect/generate/enabled');
|
24 |
$html_feedlinks = '';
|
25 |
foreach($store_ids as $storeId) {
|
26 |
$generate_url = $this->getUrl('*/sooqr/generateFeed/store_id/' . $storeId);
|
27 |
$download_url = $this->getUrl('*/sooqr/download/store_id/' . $storeId);
|
28 |
+
$feed_text = $helper->getUncachedConfigValue('sooqr_connect/generate/feed_result', $storeId);
|
29 |
if(empty($feed_text)) {
|
30 |
$feed_text = Mage::helper('sooqr')->__('No active feed found');
|
31 |
$download_url = '';
|
app/code/community/Magmodules/Sooqr/Block/Adminhtml/Widget/Info/Info.php
CHANGED
@@ -32,15 +32,16 @@ class Magmodules_Sooqr_Block_Adminhtml_Widget_Info_Info extends Mage_Adminhtml_B
|
|
32 |
<br />
|
33 |
<table width="500px" border="0">
|
34 |
<tr>
|
35 |
-
<td width="58%">
|
36 |
<td width="42%"><a href="http://www.magentocommerce.com/magento-connect/developer/Magmodules" target="_blank">Magento Connect</a></td>
|
37 |
</tr>
|
38 |
-
|
39 |
-
<td
|
|
|
40 |
</tr>
|
41 |
<tr>
|
42 |
-
<td height="30">Visit our Website
|
43 |
-
<td><a href="http://www.magmodules.eu
|
44 |
</tr>';
|
45 |
|
46 |
|
@@ -61,6 +62,10 @@ class Magmodules_Sooqr_Block_Adminhtml_Widget_Info_Info extends Mage_Adminhtml_B
|
|
61 |
<td height="30">Sooqr Support</td>
|
62 |
<td><a href="http://support.sooqr.com/support/home" target="_blank">Sooqr Support</a> or <a href="mailto:support@sooqr.com" target="_blank">support@sooqr.com</a></td>
|
63 |
</tr>
|
|
|
|
|
|
|
|
|
64 |
</table>
|
65 |
</div>';
|
66 |
|
32 |
<br />
|
33 |
<table width="500px" border="0">
|
34 |
<tr>
|
35 |
+
<td width="58%">More Extensions from Magmodules:</td>
|
36 |
<td width="42%"><a href="http://www.magentocommerce.com/magento-connect/developer/Magmodules" target="_blank">Magento Connect</a></td>
|
37 |
</tr>
|
38 |
+
<tr>
|
39 |
+
<td>For Help:</td>
|
40 |
+
<td><a href="https://www.magmodules.eu/support.html?ext=sooqr">Visit our Support Page</a></td>
|
41 |
</tr>
|
42 |
<tr>
|
43 |
+
<td height="30">Visit our Website:</td>
|
44 |
+
<td><a href="http://www.magmodules.eu" target="_blank">www.Magmodules.eu</a></td>
|
45 |
</tr>';
|
46 |
|
47 |
|
62 |
<td height="30">Sooqr Support</td>
|
63 |
<td><a href="http://support.sooqr.com/support/home" target="_blank">Sooqr Support</a> or <a href="mailto:support@sooqr.com" target="_blank">support@sooqr.com</a></td>
|
64 |
</tr>
|
65 |
+
<tr>
|
66 |
+
<td height="30"><strong>Read everything about the extension configuration in our <a href="http://www.magmodules.eu/help/shopreview-testimonials#" target="_blank">Knowledgebase.</a></strong></td>
|
67 |
+
<td> </td>
|
68 |
+
</tr>
|
69 |
</table>
|
70 |
</div>';
|
71 |
|
app/code/community/Magmodules/Sooqr/Helper/Data.php
CHANGED
@@ -457,10 +457,7 @@ class Magmodules_Sooqr_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
457 |
$price_data['sales_price'] = number_format(($sales_price * $price_markup), 2, '.', '') . $currency;
|
458 |
}
|
459 |
|
460 |
-
|
461 |
-
return $price_data;
|
462 |
-
}
|
463 |
-
|
464 |
}
|
465 |
|
466 |
public function getPriceMarkup($config)
|
@@ -677,24 +674,22 @@ class Magmodules_Sooqr_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
677 |
public function getTypePrices($config, $products)
|
678 |
{
|
679 |
$type_prices = array();
|
680 |
-
if(!empty($config['conf_enabled'])) {
|
681 |
-
if(!empty($config['hide_currency'])) {
|
682 |
-
$currency = '';
|
683 |
-
} else {
|
684 |
-
$currency = ' ' . $config['currency'];
|
685 |
-
}
|
686 |
foreach($products as $product) {
|
687 |
if($product->getTypeId() == 'configurable') {
|
688 |
$attributes = $product->getTypeInstance(true)->getConfigurableAttributes($product);
|
689 |
$att_prices = array();
|
690 |
$base_price = $product->getFinalPrice();
|
|
|
691 |
foreach ($attributes as $attribute){
|
692 |
$prices = $attribute->getPrices();
|
693 |
foreach ($prices as $price){
|
694 |
if ($price['is_percent']) {
|
695 |
$att_prices[$price['value_index']] = (float)(($price['pricing_value'] * $base_price / 100) * $config['markup']);
|
|
|
696 |
} else {
|
697 |
$att_prices[$price['value_index']] = (float)($price['pricing_value'] * $config['markup']);
|
|
|
698 |
}
|
699 |
}
|
700 |
}
|
@@ -702,20 +697,23 @@ class Magmodules_Sooqr_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
702 |
$simple_prices = array();
|
703 |
foreach($simple as $sProduct) {
|
704 |
$total_price = $base_price;
|
|
|
705 |
foreach($attributes as $attribute) {
|
706 |
$value = $sProduct->getData($attribute->getProductAttribute()->getAttributeCode());
|
707 |
if(isset($att_prices[$value])) {
|
708 |
$total_price += $att_prices[$value];
|
|
|
709 |
}
|
710 |
}
|
711 |
-
$type_prices[$sProduct->getEntityId()] = number_format(($total_price * $config['markup']), 2, '.', '')
|
|
|
712 |
}
|
713 |
}
|
714 |
}
|
715 |
}
|
716 |
return $type_prices;
|
717 |
}
|
718 |
-
|
719 |
public function checkOldVersion($dir)
|
720 |
{
|
721 |
if($dir) {
|
@@ -765,10 +763,21 @@ class Magmodules_Sooqr_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
765 |
{
|
766 |
$suffix = Mage::getStoreConfig('catalog/seo/product_url_suffix', $storeId);
|
767 |
if(!empty($suffix)) {
|
768 |
-
if($suffix[0] != '.') {
|
769 |
$suffix = '.' . $suffix;
|
770 |
}
|
771 |
}
|
772 |
return $suffix;
|
773 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
774 |
}
|
457 |
$price_data['sales_price'] = number_format(($sales_price * $price_markup), 2, '.', '') . $currency;
|
458 |
}
|
459 |
|
460 |
+
return $price_data;
|
|
|
|
|
|
|
461 |
}
|
462 |
|
463 |
public function getPriceMarkup($config)
|
674 |
public function getTypePrices($config, $products)
|
675 |
{
|
676 |
$type_prices = array();
|
677 |
+
if(!empty($config['conf_enabled'])) {
|
|
|
|
|
|
|
|
|
|
|
678 |
foreach($products as $product) {
|
679 |
if($product->getTypeId() == 'configurable') {
|
680 |
$attributes = $product->getTypeInstance(true)->getConfigurableAttributes($product);
|
681 |
$att_prices = array();
|
682 |
$base_price = $product->getFinalPrice();
|
683 |
+
$base_price_reg = $product->getPrice();
|
684 |
foreach ($attributes as $attribute){
|
685 |
$prices = $attribute->getPrices();
|
686 |
foreach ($prices as $price){
|
687 |
if ($price['is_percent']) {
|
688 |
$att_prices[$price['value_index']] = (float)(($price['pricing_value'] * $base_price / 100) * $config['markup']);
|
689 |
+
$att_prices[$price['value_index'] . '_reg'] = (float)(($price['pricing_value'] * $base_price_reg / 100) * $config['markup']);
|
690 |
} else {
|
691 |
$att_prices[$price['value_index']] = (float)($price['pricing_value'] * $config['markup']);
|
692 |
+
$att_prices[$price['value_index'] . '_reg'] = (float)($price['pricing_value'] * $config['markup']);
|
693 |
}
|
694 |
}
|
695 |
}
|
697 |
$simple_prices = array();
|
698 |
foreach($simple as $sProduct) {
|
699 |
$total_price = $base_price;
|
700 |
+
$total_price_reg = $base_price_reg;
|
701 |
foreach($attributes as $attribute) {
|
702 |
$value = $sProduct->getData($attribute->getProductAttribute()->getAttributeCode());
|
703 |
if(isset($att_prices[$value])) {
|
704 |
$total_price += $att_prices[$value];
|
705 |
+
$total_price_reg += $att_prices[$value . '_reg'];
|
706 |
}
|
707 |
}
|
708 |
+
$type_prices[$sProduct->getEntityId()] = number_format(($total_price * $config['markup']), 2, '.', '');
|
709 |
+
$type_prices[$sProduct->getEntityId() . '_reg'] = number_format(($total_price_reg * $config['markup']), 2, '.', '');
|
710 |
}
|
711 |
}
|
712 |
}
|
713 |
}
|
714 |
return $type_prices;
|
715 |
}
|
716 |
+
|
717 |
public function checkOldVersion($dir)
|
718 |
{
|
719 |
if($dir) {
|
763 |
{
|
764 |
$suffix = Mage::getStoreConfig('catalog/seo/product_url_suffix', $storeId);
|
765 |
if(!empty($suffix)) {
|
766 |
+
if(($suffix[0] != '.') && ($suffix != '/')) {
|
767 |
$suffix = '.' . $suffix;
|
768 |
}
|
769 |
}
|
770 |
return $suffix;
|
771 |
}
|
772 |
+
|
773 |
+
public function getUncachedConfigValue($path, $storeId = 0)
|
774 |
+
{
|
775 |
+
$collection = Mage::getModel('core/config_data')->getCollection()->addFieldToFilter('path', $path);
|
776 |
+
if($storeId == 0) {
|
777 |
+
$collection = $collection->addFieldToFilter('scope_id', 0)->addFieldToFilter('scope', 'default');
|
778 |
+
} else {
|
779 |
+
$collection = $collection->addFieldToFilter('scope_id', $storeId)->addFieldToFilter('scope', 'stores');
|
780 |
+
}
|
781 |
+
return $collection->getFirstItem()->getValue();
|
782 |
+
}
|
783 |
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Backend/Sooqr/Cron.php
CHANGED
@@ -25,38 +25,46 @@ class Magmodules_Sooqr_Model_Adminhtml_System_Config_Backend_Sooqr_Cron extends
|
|
25 |
{
|
26 |
$time = $this->getData('groups/generate/fields/time/value');
|
27 |
$frequency = $this->getData('groups/generate/fields/frequency/value');
|
28 |
-
$
|
29 |
-
|
|
|
30 |
if($count > 0) {
|
31 |
-
$minute[] = 1;
|
32 |
-
$n = floor(60/$count);
|
33 |
-
if($n == 60) { $n = 0; }
|
34 |
-
for($i = 1; $i < $count; $i++) {
|
35 |
-
$min = ($i * $n);
|
36 |
-
$minute[] = $min;
|
37 |
-
}
|
38 |
-
$minute = implode(',', $minute);
|
39 |
switch($frequency) {
|
40 |
-
case
|
41 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
break;
|
43 |
case 6:
|
44 |
-
$cronExprArray = array(
|
45 |
break;
|
46 |
case 4:
|
47 |
-
$cronExprArray = array(
|
48 |
break;
|
49 |
case 2:
|
50 |
-
$cronExprArray = array(
|
51 |
break;
|
52 |
case 1:
|
53 |
-
$cronExprArray = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
break;
|
55 |
}
|
|
|
|
|
|
|
56 |
$cronExprString = join(' ', $cronExprArray);
|
57 |
-
} else {
|
58 |
-
$cronExprString = '';
|
59 |
}
|
|
|
60 |
try {
|
61 |
Mage::getModel('core/config_data')
|
62 |
->load(self::CRON_MODEL_PATH, 'path')
|
25 |
{
|
26 |
$time = $this->getData('groups/generate/fields/time/value');
|
27 |
$frequency = $this->getData('groups/generate/fields/frequency/value');
|
28 |
+
$count = count(Mage::helper('sooqr')->getStoreIds('sooqr_connect/generate/enabled'));
|
29 |
+
$cronExprString = '';
|
30 |
+
|
31 |
if($count > 0) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
switch($frequency) {
|
33 |
+
case 'custom_expr':
|
34 |
+
$cronExprString = $this->getData('groups/generate/fields/custom_cron/value');
|
35 |
+
break;
|
36 |
+
case 0:
|
37 |
+
$hours = array();
|
38 |
+
for($i = 0; $i < $count; $i++) {
|
39 |
+
$hours[] = $i;
|
40 |
+
}
|
41 |
+
$cronExprArray = array('40', implode(',', $hours), '*', '*', '*');
|
42 |
break;
|
43 |
case 6:
|
44 |
+
$cronExprArray = array('40', '*/6', '*', '*', '*');
|
45 |
break;
|
46 |
case 4:
|
47 |
+
$cronExprArray = array('40', '*/4', '*', '*', '*');
|
48 |
break;
|
49 |
case 2:
|
50 |
+
$cronExprArray = array('40', '*/2', '*', '*', '*');
|
51 |
break;
|
52 |
case 1:
|
53 |
+
$cronExprArray = array('40', '*', '*', '*', '*');
|
54 |
+
break;
|
55 |
+
case 30:
|
56 |
+
$cronExprArray = array('10,40', '*', '*', '*', '*');
|
57 |
+
break;
|
58 |
+
case 15:
|
59 |
+
$cronExprArray = array('0,15,30,45', '*', '*', '*', '*');
|
60 |
break;
|
61 |
}
|
62 |
+
}
|
63 |
+
|
64 |
+
if(!empty($cronExprArray)) {
|
65 |
$cronExprString = join(' ', $cronExprArray);
|
|
|
|
|
66 |
}
|
67 |
+
|
68 |
try {
|
69 |
Mage::getModel('core/config_data')
|
70 |
->load(self::CRON_MODEL_PATH, 'path')
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Frequency.php
CHANGED
@@ -17,20 +17,18 @@
|
|
17 |
|
18 |
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Frequency {
|
19 |
|
20 |
-
protected static $_options;
|
21 |
-
|
22 |
public function toOptionArray()
|
23 |
{
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
}
|
35 |
|
36 |
}
|
17 |
|
18 |
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Frequency {
|
19 |
|
|
|
|
|
20 |
public function toOptionArray()
|
21 |
{
|
22 |
+
$frequency = array();
|
23 |
+
$frequency[] = array('label' => Mage::helper('adminhtml')->__('Daily'), 'value' => '0');
|
24 |
+
$frequency[] = array('label' => Mage::helper('adminhtml')->__('Every 6 hours'), 'value' => '6');
|
25 |
+
$frequency[] = array('label' => Mage::helper('adminhtml')->__('Every 4 hours'), 'value' => '4');
|
26 |
+
$frequency[] = array('label' => Mage::helper('adminhtml')->__('Every 2 hours'), 'value' => '2');
|
27 |
+
$frequency[] = array('label' => Mage::helper('adminhtml')->__('Every hour'), 'value' => '1');
|
28 |
+
$frequency[] = array('label' => Mage::helper('adminhtml')->__('Every 30 minutes'), 'value' => '30');
|
29 |
+
$frequency[] = array('label' => Mage::helper('adminhtml')->__('Every 15 minutes'), 'value' => '15');
|
30 |
+
$frequency[] = array('label' => Mage::helper('adminhtml')->__('Custom'), 'value' => 'custom_expr');
|
31 |
+
return $frequency;
|
32 |
}
|
33 |
|
34 |
}
|
app/code/community/Magmodules/Sooqr/Model/Observer.php
CHANGED
@@ -21,7 +21,7 @@ class Magmodules_Sooqr_Model_Observer {
|
|
21 |
{
|
22 |
$enabled = Mage::getStoreConfig('sooqr_connect/general/enabled');
|
23 |
$cron = Mage::getStoreConfig('sooqr_connect/generate/cron');
|
24 |
-
$next_store = Mage::
|
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))) {
|
@@ -37,7 +37,6 @@ class Magmodules_Sooqr_Model_Observer {
|
|
37 |
$config->saveConfig('sooqr_connect/generate/feed_result', $html, 'stores', $store_id);
|
38 |
}
|
39 |
$config->saveConfig('sooqr_connect/generate/cron_next', ($next_store + 1), 'default', 0);
|
40 |
-
Mage::app()->getCacheInstance()->cleanType('config');
|
41 |
$appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
|
42 |
}
|
43 |
}
|
21 |
{
|
22 |
$enabled = Mage::getStoreConfig('sooqr_connect/general/enabled');
|
23 |
$cron = Mage::getStoreConfig('sooqr_connect/generate/cron');
|
24 |
+
$next_store = Mage::helper('sooqr')->getUncachedConfigValue('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))) {
|
37 |
$config->saveConfig('sooqr_connect/generate/feed_result', $html, 'stores', $store_id);
|
38 |
}
|
39 |
$config->saveConfig('sooqr_connect/generate/cron_next', ($next_store + 1), 'default', 0);
|
|
|
40 |
$appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
|
41 |
}
|
42 |
}
|
app/code/community/Magmodules/Sooqr/Model/Sooqr.php
CHANGED
@@ -195,12 +195,20 @@ class Magmodules_Sooqr_Model_Sooqr extends Magmodules_Sooqr_Model_Common {
|
|
195 |
}
|
196 |
}
|
197 |
|
198 |
-
protected function getPrices($data, $currency, $config, $conf_prices, $
|
199 |
{
|
200 |
$prices = array();
|
|
|
201 |
$prices['currency'] = $currency;
|
202 |
if(!empty($conf_prices[$id])) {
|
203 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
} else {
|
205 |
if(!empty($config['currency_data'])) {
|
206 |
foreach($config['currency_data'] as $key => $value) {
|
@@ -294,7 +302,7 @@ class Magmodules_Sooqr_Model_Sooqr extends Magmodules_Sooqr_Model_Common {
|
|
294 |
if($_category_data = $this->getCategoryData($product_data, $config)) {
|
295 |
$_extra = array_merge($_extra, $_category_data);
|
296 |
}
|
297 |
-
if($_prices = $this->getPrices($product_data['price'], $config['currency'], $config, $prices, $product
|
298 |
$_extra = array_merge($_extra, $_prices);
|
299 |
}
|
300 |
if($_assoc_id = $this->getAssocId($product_data)) {
|
195 |
}
|
196 |
}
|
197 |
|
198 |
+
protected function getPrices($data, $currency, $config, $conf_prices, $product)
|
199 |
{
|
200 |
$prices = array();
|
201 |
+
$id = $product->getEntityId();
|
202 |
$prices['currency'] = $currency;
|
203 |
if(!empty($conf_prices[$id])) {
|
204 |
+
$conf_price = Mage::helper('tax')->getPrice($product, $conf_prices[$id], true);
|
205 |
+
$conf_price_reg = Mage::helper('tax')->getPrice($product, $conf_prices[$id . '_reg'], true);
|
206 |
+
if($conf_price_reg > $conf_price) {
|
207 |
+
$prices['price'] = $conf_price;
|
208 |
+
$prices['normal_price'] = $conf_price_reg;
|
209 |
+
} else {
|
210 |
+
$prices['price'] = $conf_price;
|
211 |
+
}
|
212 |
} else {
|
213 |
if(!empty($config['currency_data'])) {
|
214 |
foreach($config['currency_data'] as $key => $value) {
|
302 |
if($_category_data = $this->getCategoryData($product_data, $config)) {
|
303 |
$_extra = array_merge($_extra, $_category_data);
|
304 |
}
|
305 |
+
if($_prices = $this->getPrices($product_data['price'], $config['currency'], $config, $prices, $product)) {
|
306 |
$_extra = array_merge($_extra, $_prices);
|
307 |
}
|
308 |
if($_assoc_id = $this->getAssocId($product_data)) {
|
app/code/community/Magmodules/Sooqr/controllers/Adminhtml/SooqrController.php
CHANGED
@@ -28,7 +28,6 @@ class Magmodules_Sooqr_Adminhtml_SooqrController extends Mage_Adminhtml_Controll
|
|
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) {
|
@@ -38,7 +37,6 @@ class Magmodules_Sooqr_Adminhtml_SooqrController extends Mage_Adminhtml_Controll
|
|
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 |
}
|
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::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>'));
|
32 |
$limit = Mage::getStoreConfig('sooqr_connect/generate/limit', $store_id);
|
33 |
if($limit > 0) {
|
37 |
$config = new Mage_Core_Model_Config();
|
38 |
$config->saveConfig('sooqr_connect/generate/feed_result', '', 'stores', $store_id);
|
39 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('sooqr')->__('No products found, make sure your filters are configured with existing values.'));
|
|
|
40 |
}
|
41 |
$appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
|
42 |
}
|
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>
|
19 |
<config>
|
20 |
<modules>
|
21 |
<Magmodules_Sooqr>
|
22 |
+
<version>1.1.8</version>
|
23 |
</Magmodules_Sooqr>
|
24 |
</modules>
|
25 |
<global>
|
app/code/community/Magmodules/Sooqr/etc/system.xml
CHANGED
@@ -608,17 +608,17 @@
|
|
608 |
<show_in_default>1</show_in_default>
|
609 |
<show_in_website>1</show_in_website>
|
610 |
<show_in_store>1</show_in_store>
|
611 |
-
</frequency>
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
<
|
621 |
-
|
622 |
<feeds_heading translate="label">
|
623 |
<label>Generated Feeds</label>
|
624 |
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
608 |
<show_in_default>1</show_in_default>
|
609 |
<show_in_website>1</show_in_website>
|
610 |
<show_in_store>1</show_in_store>
|
611 |
+
</frequency>
|
612 |
+
<custom_cron translate="label">
|
613 |
+
<label>Custom Cron Expression</label>
|
614 |
+
<frontend_type>text</frontend_type>
|
615 |
+
<sort_order>33</sort_order>
|
616 |
+
<show_in_default>1</show_in_default>
|
617 |
+
<show_in_website>0</show_in_website>
|
618 |
+
<show_in_store>0</show_in_store>
|
619 |
+
<depends><frequency>custom_expr</frequency></depends>
|
620 |
+
<comment><![CDATA[e.g. 15 */2 * * *]]></comment>
|
621 |
+
</custom_cron>
|
622 |
<feeds_heading translate="label">
|
623 |
<label>Generated Feeds</label>
|
624 |
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
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:
|
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="
|
16 |
<compatible/>
|
17 |
-
<dependencies><required><php><min>5.1.0</min><max>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Magmodules_Sooqr</name>
|
4 |
+
<version>1.1.8</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-11-05</date>
|
14 |
+
<time>09:15:00</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="2106ad07090060ed232ef4f77bc0e309"/><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="d9e8b3d0db8a6fc4421ccf88fab36921"/></dir></dir></dir><file name="Search.php" hash="2acb516fec2f419e260240e8647c5999"/></dir><dir name="Helper"><file name="Data.php" hash="df89e11db758027877fb3463362df15a"/></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="113b2d8de9349fd393c54ff7b59ff91d"/></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="Cms.php" hash="34197c03a013a67112fa4f2c8415ed2b"/><file name="Cmspages.php" hash="d9cc6034c3d777cc896ff28f1a29f88d"/><file name="Condition.php" hash="bd66be4fe74f549d5fa6c213bd9b64f6"/><file name="Conditions.php" hash="502fe20b60e397240b8d552fd5ea4d81"/><file name="Configurable.php" hash="34a165474618953e44fd1de305371907"/><file name="Frequency.php" hash="b7518824f5cb60d13e9d6564a383dcc9"/><file name="Identifier.php" hash="cdf5bd32696cb92a6f3be396ce5b3a6d"/><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="f9c26c5efa9dafe962c48654db7120c1"/><file name="Observer.php" hash="7df2ecf06c93f5a2c0a00981ff8db76f"/><file name="Sooqr.php" hash="8928457255f1023204be3228c03f2d9b"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SooqrController.php" hash="0fbb61bf89e06ee0c2a07b4859104c49"/></dir><file name="InstallationController.php" hash="a96e58cbab2c7b6a3a4c9b42de62a59f"/></dir><dir name="etc"><file name="adminhtml.xml" hash="cf4313a4daa72837c48e137b51b11eba"/><file name="config.xml" hash="6093b77111e9deac7f92e74f07269f02"/><file name="system.xml" hash="eeeed98810a90bc96a2144a9b6481f38"/></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="7f45989fad8c6e6ad552a827757d5161"/></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>7.9.9</max></php></required></dependencies>
|
18 |
</package>
|