-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from magmodules/1.2.2
1.2.2
- Loading branch information
Showing
8 changed files
with
179 additions
and
27 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
59 changes: 59 additions & 0 deletions
59
app/code/community/Magmodules/Channableapi/Block/Adminhtml/Items/Renderer/Status.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,59 @@ | ||
<?php | ||
/** | ||
* Magmodules.eu - http://www.magmodules.eu | ||
* | ||
* NOTICE OF LICENSE | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category Magmodules | ||
* @package Magmodules_Channableapi | ||
* @author Magmodules <[email protected]> | ||
* @copyright Copyright (c) 2018 (http://www.magmodules.eu) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* | ||
* | ||
*/ | ||
|
||
class Magmodules_Channableapi_Block_Adminhtml_Items_Renderer_Status | ||
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract | ||
{ | ||
|
||
/** | ||
* @param Varien_Object $row | ||
* | ||
* @return string with html link to order view | ||
*/ | ||
public function render(Varien_Object $row) | ||
{ | ||
$status = $row->getData('status'); | ||
$callResult = $row->getData('call_result'); | ||
$attempts = $row->getData('attempts'); | ||
|
||
$html = $status; | ||
$message = ''; | ||
|
||
if ($status == 'Not Found' && $attempts > 1) { | ||
$message .= __('Removed item from que after %1 attempts.', $attempts) . '<br/>'; | ||
} | ||
|
||
if (!empty($callResult)) { | ||
$message .= '<i>API: "' . $callResult . '"</i><br/>'; | ||
if ($attempts > 1) { | ||
$message .= __('Attempts: %s', $attempts); | ||
} | ||
} | ||
|
||
if (!empty($message)) { | ||
$html .= ' <a href="#" class="chanable-tooltip" >(?)<span>' . $message . '</span></a>'; | ||
} | ||
|
||
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
33 changes: 33 additions & 0 deletions
33
...e/community/Magmodules/Channableapi/sql/channableapi_setup/mysql4-upgrade-1.2.1-1.2.2.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,33 @@ | ||
<?php | ||
/** | ||
* Magmodules.eu - http://www.magmodules.eu | ||
* | ||
* NOTICE OF LICENSE | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category Magmodules | ||
* @package Magmodules_Channableapi | ||
* @author Magmodules <[email protected]> | ||
* @copyright Copyright (c) 2018 (http://www.magmodules.eu) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
/** @var $installer Mage_Catalog_Model_Resource_Setup */ | ||
$installer = $this; | ||
$installer->startSetup(); | ||
|
||
try { | ||
$installer->run("ALTER TABLE {$this->getTable('channable_items')} ADD `attempts` smallint(5) DEFAULT 0 AFTER `last_call`;"); | ||
$installer->run("ALTER TABLE {$this->getTable('channable_items')} ADD `status` varchar(255) NOT NULL AFTER `last_call`;"); | ||
|
||
} catch (Exception $e) { | ||
Mage::log($e->getMessage()); | ||
} | ||
|
||
$installer->endSetup(); |
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