-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
350 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
app/code/community/Doofinder/Feed/Block/Settings/Panel/AtomicUpdates.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
/** | ||
* This file is part of Doofinder_Feed. | ||
*/ | ||
|
||
/** | ||
* @category blocks | ||
* @package Doofinder_Feed | ||
* @version 1.8.9 | ||
*/ | ||
|
||
class Doofinder_Feed_Block_Settings_Panel_AtomicUpdates extends Mage_Adminhtml_Block_System_Config_Form_Field | ||
{ | ||
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) | ||
{ | ||
$helper = Mage::helper('doofinder_feed'); | ||
|
||
$this->setElement($element); | ||
$name = $element->getName(); | ||
$element->setScopeLabel(''); | ||
|
||
$messages = array(); | ||
foreach (Mage::app()->getStores() as $store) { | ||
if ($store->getIsActive()) { | ||
$engineEnabled = Mage::getStoreConfig('doofinder_search/internal_settings/enable', $store->getCode()); | ||
$atomicUpdatesEnabled = Mage::getStoreConfig('doofinder_cron/feed_settings/atomic_updates_enabled', $store->getCode()); | ||
|
||
if (!$engineEnabled || !$atomicUpdatesEnabled) { | ||
$message = $helper->__('Atomic updates are <strong>disabled</strong>.'); | ||
} else { | ||
$message = $helper->__('Atomic updates are <strong>enabled</strong>. Your products will be automatically indexed when they are created, updated or deleted.'); | ||
} | ||
|
||
$messages[$store->getName()] = $message; | ||
} | ||
} | ||
|
||
if (count(array_unique($messages)) == 1) { | ||
return reset($messages); | ||
} | ||
|
||
$html = '<ul>'; | ||
foreach ($messages as $name => $message) { | ||
$html .= '<li><strong>' . $name . ':</strong><p>' . $message . '</p></li>'; | ||
} | ||
$html .= '</ul>'; | ||
|
||
return $html; | ||
} | ||
} |
52 changes: 0 additions & 52 deletions
52
app/code/community/Doofinder/Feed/Block/Settings/Panel/Cron.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
app/code/community/Doofinder/Feed/Block/Settings/Panel/DynamicFeedUrl.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* This file is part of Doofinder_Feed. | ||
*/ | ||
|
||
/** | ||
* @category blocks | ||
* @package Doofinder_Feed | ||
* @version 1.8.9 | ||
*/ | ||
|
||
class Doofinder_Feed_Block_Settings_Panel_DynamicFeedUrl extends Mage_Adminhtml_Block_System_Config_Form_Field | ||
{ | ||
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) | ||
{ | ||
$helper = Mage::helper('doofinder_feed'); | ||
|
||
$this->setElement($element); | ||
$name = $element->getName(); | ||
$element->setScopeLabel(''); | ||
|
||
$html = '<ul>'; | ||
foreach (Mage::app()->getStores() as $store) { | ||
if ($store->getIsActive()) { | ||
$password = $store->getConfig('doofinder_cron/feed_settings/password'); | ||
$params = array('language' => $store->getCode()); | ||
|
||
if ($password) { | ||
$params['password'] = $password; | ||
} | ||
|
||
$url = Mage::getUrl('doofinder/feed', array('_store' => $store->getCode(), '_nosid' => true) + $params); | ||
$anchor = '<a href="' . $url . '">' . $url . '</a>'; | ||
$html .= '<li><strong>' . $store->getName() . ':</strong><p>' . $anchor . '</p></li>'; | ||
} | ||
} | ||
$html .= '</ul>'; | ||
$html .= '<p>'; | ||
$html .= $helper->__('If cron feed doesn\'t work for you, use these URLs to dynamically index your content from Doofinder. Contact support if you need help.'); | ||
$html .= '</p>'; | ||
|
||
return $html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.