Skip to content

Commit

Permalink
Migrate release 1.9.0 to GitHub.
Browse files Browse the repository at this point in the history
  • Loading branch information
nabil509 committed Jun 29, 2018
1 parent 8ece5a1 commit 393af1a
Show file tree
Hide file tree
Showing 299 changed files with 4,097 additions and 1,563 deletions.
20 changes: 15 additions & 5 deletions app/code/community/Lyra/Payzen/Block/Abstract.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.8.0 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected].
*
* NOTICE OF LICENSE
*
Expand All @@ -10,7 +10,7 @@
* https://opensource.org/licenses/osl-3.0.php
*
* @author Lyra Network (http://www.lyra-network.com/)
* @copyright 2014-2017 Lyra Network and contributors
* @copyright 2014-2018 Lyra Network and contributors
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @category payment
* @package payzen
Expand All @@ -26,7 +26,7 @@ protected function _construct()

$logoURL = $this->_checkAndGetSkinUrl($this->getConfigData('module_logo'));

if (! Mage::helper('payzen')->isAdmin() && $logoURL) {
if (! $this->_getHelper()->isAdmin() && $logoURL) {
$logo = Mage::getConfig()->getBlockClassName('core/template');
$logo = new $logo;
$logo->setTemplate('payzen/logo.phtml');
Expand All @@ -45,7 +45,7 @@ protected function _checkAndGetSkinUrl($fileName)
}

$filePath = Mage::getBaseDir('media') . DS . 'payzen' . DS . 'logos' . DS . $fileName;
if (! file_exists($filePath)) {
if (! $this->_getHelper()->fileExists($filePath)) {
return false;
}

Expand All @@ -57,7 +57,7 @@ public function getCcTypeImageSrc($card)
$card = strtolower($card);

$path = Mage::getBaseDir('media') . DS . 'payzen' . DS . 'ct' . DS . $card . '.png';
if (file_exists($path)) {
if ($this->_getHelper()->fileExists($path)) {
return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'payzen/ct/' . $card . '.png';
} else {
return false;
Expand All @@ -73,4 +73,14 @@ public function getConfigData($name)
{
return $this->_getModel()->getConfigData($name);
}

/**
* Return payzen data helper.
*
* @return Lyra_Payzen_Helper_Data
*/
protected function _getHelper()
{
return Mage::helper('payzen');
}
}
4 changes: 2 additions & 2 deletions app/code/community/Lyra/Payzen/Block/Adminhtml/Redirect.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.8.0 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected].
*
* NOTICE OF LICENSE
*
Expand All @@ -10,7 +10,7 @@
* https://opensource.org/licenses/osl-3.0.php
*
* @author Lyra Network (http://www.lyra-network.com/)
* @copyright 2014-2017 Lyra Network and contributors
* @copyright 2014-2018 Lyra Network and contributors
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @category payment
* @package payzen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.8.0 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected].
*
* NOTICE OF LICENSE
*
Expand All @@ -10,7 +10,7 @@
* https://opensource.org/licenses/osl-3.0.php
*
* @author Lyra Network (http://www.lyra-network.com/)
* @copyright 2014-2017 Lyra Network and contributors
* @copyright 2014-2018 Lyra Network and contributors
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @category payment
* @package payzen
Expand All @@ -19,7 +19,8 @@
/**
* Custom renderer for the PayZen category mapping field.
*/
class Lyra_Payzen_Block_Field_CategoryMapping extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_CategoryMapping
extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
{
public function __construct()
{
Expand All @@ -28,7 +29,7 @@ public function __construct()
array(
'label' => Mage::helper('payzen')->__('Magento category'),
'style' => 'width: 200px;',
'renderer' => new Lyra_Payzen_Block_Field_Column_Label
'renderer' => new Lyra_Payzen_Block_Adminhtml_System_Config_Field_Column_Label
)
);

Expand All @@ -38,7 +39,7 @@ public function __construct()
array(
'label' => Mage::helper('payzen')->__('PayZen category'),
'style' => 'width: 200px;',
'renderer' => new Lyra_Payzen_Block_Field_Column_List($options)
'renderer' => new Lyra_Payzen_Block_Adminhtml_System_Config_Field_Column_List($options)
)
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.8.0 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected].
*
* NOTICE OF LICENSE
*
Expand All @@ -10,7 +10,7 @@
* https://opensource.org/licenses/osl-3.0.php
*
* @author Lyra Network (http://www.lyra-network.com/)
* @copyright 2014-2017 Lyra Network and contributors
* @copyright 2014-2018 Lyra Network and contributors
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @category payment
* @package payzen
Expand All @@ -19,7 +19,8 @@
/**
* Custom renderer for the PayZen customer group options field.
*/
class Lyra_Payzen_Block_Field_Choozeo_CustgroupOptions extends Lyra_Payzen_Block_Field_CustgroupOptions
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_Choozeo_CustgroupOptions
extends Lyra_Payzen_Block_Adminhtml_System_Config_Field_CustgroupOptions
{
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.8.0 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected].
*
* NOTICE OF LICENSE
*
Expand All @@ -10,7 +10,7 @@
* https://opensource.org/licenses/osl-3.0.php
*
* @author Lyra Network (http://www.lyra-network.com/)
* @copyright 2014-2017 Lyra Network and contributors
* @copyright 2014-2018 Lyra Network and contributors
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @category payment
* @package payzen
Expand All @@ -19,7 +19,8 @@
/**
* Custom renderer for the PayZen customer group options field.
*/
class Lyra_Payzen_Block_Field_Choozeo_PaymentOptions extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_Choozeo_PaymentOptions
extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
{
public function __construct()
{
Expand All @@ -28,7 +29,7 @@ public function __construct()
array(
'label' => Mage::helper('payzen')->__('Label'),
'style' => 'width: 260px;',
'renderer' => new Lyra_Payzen_Block_Field_Column_Label
'renderer' => new Lyra_Payzen_Block_Adminhtml_System_Config_Field_Column_Label
)
);
$this->addColumn(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
/**
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected].
*
* NOTICE OF LICENSE
*
* This source file is licensed under the Open Software License version 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:
* https://opensource.org/licenses/osl-3.0.php
*
* @author Lyra Network (http://www.lyra-network.com/)
* @copyright 2014-2018 Lyra Network and contributors
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @category payment
* @package payzen
*/

class Lyra_Payzen_Block_Adminhtml_System_Config_Field_Column_EditableLabel extends Mage_Core_Block_Abstract
{
protected function _toHtml()
{
$html = '<div';
$html .= ' class="' . ($this->column['class'] ? $this->column['class'] : 'input-text') . '"';
$html .= ' style="'. ($this->column['style'] ? ' ' . $this->column['style'] : '') . '"';
$html .= '>';

$html .= '<input class="input-text" type="text" value="#{label}" name="' . $this->inputName
. '" style="width: 210px;">';

$codeInputName = str_replace($this->columnName, 'code', $this->inputName);
$html .= '<input type="text" value="#{code}" name="' . $codeInputName
. '" style="width: 0px; display: none;">';

$countInputName = str_replace($this->columnName, 'count', $this->inputName);
$html .= '<input type="text" value="#{count}" name="' . $countInputName
. '" style="width: 0px; display: none;">';

$html .= '</div>';

return $html;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.8.0 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected].
*
* NOTICE OF LICENSE
*
Expand All @@ -10,13 +10,13 @@
* https://opensource.org/licenses/osl-3.0.php
*
* @author Lyra Network (http://www.lyra-network.com/)
* @copyright 2014-2017 Lyra Network and contributors
* @copyright 2014-2018 Lyra Network and contributors
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @category payment
* @package payzen
*/

class Lyra_Payzen_Block_Field_Column_Label extends Mage_Core_Block_Abstract
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_Column_Label extends Mage_Core_Block_Abstract
{
protected function _toHtml()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.8.0 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected].
*
* NOTICE OF LICENSE
*
Expand All @@ -10,13 +10,13 @@
* https://opensource.org/licenses/osl-3.0.php
*
* @author Lyra Network (http://www.lyra-network.com/)
* @copyright 2014-2017 Lyra Network and contributors
* @copyright 2014-2018 Lyra Network and contributors
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @category payment
* @package payzen
*/

class Lyra_Payzen_Block_Field_Column_List extends Mage_Core_Block_Abstract
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_Column_List extends Mage_Core_Block_Abstract
{
protected function _toHtml()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php
/**
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected].
*
* NOTICE OF LICENSE
*
* This source file is licensed under the Open Software License version 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:
* https://opensource.org/licenses/osl-3.0.php
*
* @author Lyra Network (http://www.lyra-network.com/)
* @copyright 2014-2018 Lyra Network and contributors
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @category payment
* @package payzen
*/

/**
* Custom renderer for the context mode field.
*/
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_CtxMode extends Mage_Adminhtml_Block_System_Config_Form_Field
{
/**
* Render field HTML.
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
public function render(Varien_Data_Form_Element_Abstract $element)
{
// get configured features
$features = Lyra_Payzen_Helper_Data::$pluginFeatures;

if ($features['qualif']) {
$element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
$element->setDisabled(true);
}

return parent::render($element);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.8.0 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected].
*
* NOTICE OF LICENSE
*
Expand All @@ -10,7 +10,7 @@
* https://opensource.org/licenses/osl-3.0.php
*
* @author Lyra Network (http://www.lyra-network.com/)
* @copyright 2014-2017 Lyra Network and contributors
* @copyright 2014-2018 Lyra Network and contributors
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @category payment
* @package payzen
Expand All @@ -19,7 +19,8 @@
/**
* Custom renderer for the PayZen customer group options field.
*/
class Lyra_Payzen_Block_Field_CustgroupOptions extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_CustgroupOptions
extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
{
protected $_default = array();

Expand All @@ -30,7 +31,7 @@ public function __construct()
array(
'label' => Mage::helper('payzen')->__('Customer group'),
'style' => 'width: 260px;',
'renderer' => new Lyra_Payzen_Block_Field_Column_Label
'renderer' => new Lyra_Payzen_Block_Adminhtml_System_Config_Field_Column_Label
)
);
$this->addColumn(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
/**
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected].
*
* NOTICE OF LICENSE
*
* This source file is licensed under the Open Software License version 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:
* https://opensource.org/licenses/osl-3.0.php
*
* @author Lyra Network (http://www.lyra-network.com/)
* @copyright 2014-2018 Lyra Network and contributors
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @category payment
* @package payzen
*/

/**
* Custom renderer for the PayZen customer group options field.
*/
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_Fullcb_CustgroupOptions
extends Lyra_Payzen_Block_Adminhtml_System_Config_Field_CustgroupOptions
{
public function __construct()
{
parent::__construct();

$this->_default = array('amount_min' => '100', 'amount_max' => '1500');
}
}
Loading

0 comments on commit 393af1a

Please sign in to comment.