This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
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
0 parents
commit a2e8438
Showing
478 changed files
with
56,036 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Netresearch OPS | ||
|
||
**Extension for Magento 1** | ||
|
||
Tested for Magento 1.9.3.1 | ||
|
||
Module version 16.12.14 | ||
|
||
--- | ||
|
||
*Please note that we are not the developer of this extension. In this repository, we only added modman and composer support. We will not provide any support for this repository. If you have any problems on integration, please use the official link provided below.* | ||
|
||
## Overview | ||
|
||
This module is the official Ingenico ePayments extension. | ||
|
||
For more information, please visit https://www.magentocommerce.com/magento-connect/official-ingenico-epayments-extension-1.html. | ||
|
||
## Installation | ||
|
||
Add the `require` and `repositories` sections to your composer.json as shown below and run `composer update` | ||
|
||
``` | ||
{ | ||
... | ||
"repositories": [ | ||
... | ||
{"type": "git", "url": "https://github.com/kirchbergerknorr/magento1_netresearch_ops"}, | ||
... | ||
], | ||
... | ||
"require": { | ||
... | ||
"kirchbergerknorr/magento1_netresearch_ops": "^16.12.14", | ||
... | ||
}, | ||
... | ||
} | ||
``` |
172 changes: 172 additions & 0 deletions
172
app/code/community/Netresearch/OPS/Block/Adminhtml/Customer/Edit/Tab/Alias.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,172 @@ | ||
<?php | ||
/** | ||
* @category OPS | ||
* @package Netresearch_OPS | ||
* @author Thomas Birke <thomas.birke@netresearch.de> | ||
* @author Michael Lühr <michael.luehr@netresearch.de> | ||
* @copyright Copyright (c) 2012 Netresearch GmbH & Co. KG | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
/** | ||
* Netresearch_OPS_Block_Adminhtml_Customer_Edit_Tab_Alias | ||
* | ||
* @author Thomas Birke <thomas.birke@netresearch.de> | ||
* @author Michael Lühr <michael.luehr@netresearch.de> | ||
* @copyright Copyright (c) 2012 Netresearch GmbH & Co. KG | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
class Netresearch_OPS_Block_Adminhtml_Customer_Edit_Tab_Alias | ||
extends Mage_Adminhtml_Block_Widget_Grid | ||
implements Mage_Adminhtml_Block_Widget_Tab_Interface | ||
{ | ||
public function _construct() | ||
{ | ||
parent::_construct(); | ||
$this->setId('customer_edit_tab_ops_alias'); | ||
$this->setUseAjax(true); | ||
} | ||
|
||
/** | ||
* Return Tab label | ||
* | ||
* @return string | ||
*/ | ||
public function getTabLabel() | ||
{ | ||
return $this->__('Payment Information'); | ||
} | ||
|
||
/** | ||
* Return Tab label | ||
* | ||
* @return string | ||
*/ | ||
public function getTabTitle() | ||
{ | ||
return $this->__('Payment Information'); | ||
} | ||
|
||
/** | ||
* Can show tab in tabs | ||
* | ||
* @return boolean | ||
*/ | ||
public function canShowTab() | ||
{ | ||
$customer = Mage::registry('current_customer'); | ||
return (bool)$customer->getId(); | ||
} | ||
|
||
/** | ||
* Tab is hidden | ||
* | ||
* @return boolean | ||
*/ | ||
public function isHidden() | ||
{ | ||
return false; | ||
} | ||
|
||
/** | ||
* Defines after which tab, this tab should be rendered | ||
* | ||
* @return string | ||
*/ | ||
public function getAfter() | ||
{ | ||
return 'orders'; | ||
} | ||
|
||
|
||
protected function _prepareCollection() | ||
{ | ||
$customer = Mage::registry('current_customer'); | ||
|
||
$collection = Mage::getModel('ops/alias') | ||
->getCollection() | ||
->addFieldToFilter('customer_id', $customer->getId()); | ||
|
||
$this->setCollection($collection); | ||
return parent::_prepareCollection(); | ||
} | ||
|
||
protected function _prepareColumns() | ||
{ | ||
$this->addColumn( | ||
'alias', array( | ||
'header' => Mage::helper('ops')->__('Alias'), | ||
'align' => 'right', | ||
'index' => 'alias', | ||
) | ||
); | ||
|
||
$this->addColumn( | ||
'payment_method', array( | ||
'header' => Mage::helper('ops')->__('Payment method'), | ||
'index' => 'payment_method', | ||
'renderer' => 'Netresearch_OPS_Block_Adminhtml_Customer_Renderer_PaymentMethod' | ||
) | ||
); | ||
|
||
$this->addColumn( | ||
'brand', array( | ||
'header' => Mage::helper('ops')->__('Credit Card Type'), | ||
'index' => 'brand', | ||
) | ||
); | ||
|
||
$this->addColumn( | ||
'pseudo_account_or_cc_no', array( | ||
'header' => Mage::helper('ops')->__('Card Number/Account Number'), | ||
'index' => 'pseudo_account_or_cc_no', | ||
) | ||
); | ||
|
||
$this->addColumn( | ||
'expiration_date', array( | ||
'header' => Mage::helper('ops')->__('Expiration Date'), | ||
'index' => 'expiration_date', | ||
) | ||
); | ||
|
||
$this->addColumn( | ||
'card_holder', array( | ||
'header' => Mage::helper('ops')->__('Card Holder'), | ||
'index' => 'card_holder', | ||
) | ||
); | ||
|
||
$this->addColumn( | ||
'state', array( | ||
'header' => Mage::helper('ops')->__('State'), | ||
'index' => 'state', | ||
'renderer' => 'Netresearch_OPS_Block_Adminhtml_Customer_Renderer_State', | ||
) | ||
); | ||
|
||
$this->addColumn( | ||
'action', | ||
array( | ||
'header' => Mage::helper('ops')->__('Action'), | ||
'width' => '100', | ||
'type' => 'action', | ||
'getter' => 'getId', | ||
'actions' => array( | ||
array( | ||
'caption' => Mage::helper('ops')->__('Delete'), | ||
'url' => array('base' => 'adminhtml/alias/delete'), | ||
'field' => 'id' | ||
) | ||
), | ||
'filter' => false, | ||
'sortable' => false, | ||
'index' => 'stores', | ||
'is_system' => true, | ||
) | ||
); | ||
|
||
return parent::_prepareColumns(); | ||
} | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
app/code/community/Netresearch/OPS/Block/Adminhtml/Customer/Renderer/PaymentMethod.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,27 @@ | ||
<?php | ||
|
||
/** | ||
* PaymentMethod.php | ||
* | ||
* @author Paul Siedler <paul.siedler@netresearch.de> | ||
*/ | ||
class Netresearch_OPS_Block_Adminhtml_Customer_Renderer_PaymentMethod | ||
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract | ||
{ | ||
|
||
/** | ||
* @param Varien_Object $row | ||
* @return string | ||
*/ | ||
public function render(Varien_Object $row) | ||
{ | ||
$title = ''; | ||
$methodCode = $row->getData($this->getColumn()->getIndex()); | ||
$instance = Mage::helper('payment')->getMethodInstance($methodCode); | ||
if ($instance) { | ||
$title = $instance->getTitle(); | ||
} | ||
|
||
return $title; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
app/code/community/Netresearch/OPS/Block/Adminhtml/Customer/Renderer/State.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,21 @@ | ||
<?php | ||
/* | ||
* To change this template, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
|
||
/** | ||
* Description of State | ||
* | ||
* @author sebastian | ||
*/ | ||
class Netresearch_OPS_Block_Adminhtml_Customer_Renderer_State extends | ||
Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract | ||
{ | ||
|
||
public function render(Varien_Object $row) | ||
{ | ||
$value = $row->getData($this->getColumn()->getIndex()); | ||
return Mage::helper('ops')->__($value); | ||
} | ||
} |
86 changes: 86 additions & 0 deletions
86
app/code/community/Netresearch/OPS/Block/Adminhtml/Kwixo/Shipping/Edit.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,86 @@ | ||
<?php | ||
/** | ||
* @author Michael Lühr <michael.luehr@netresearch.de> | ||
* @category Netresearch | ||
* @package Netresearch_OPS | ||
* @copyright Copyright (c) 2013 Netresearch GmbH & Co. KG (http://www.netresearch.de) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
|
||
class Netresearch_OPS_Block_Adminhtml_Kwixo_Shipping_Edit | ||
extends Mage_Adminhtml_Block_Widget_Form_Container | ||
{ | ||
|
||
|
||
protected $kwixoShippingModel = null; | ||
|
||
/** | ||
* gets the form action url | ||
* | ||
* @return string | ||
*/ | ||
public function getFormActionUrl() | ||
{ | ||
return $this->getUrl('adminhtml/kwixoshipping/save'); | ||
} | ||
|
||
/** | ||
* gets the shipping types | ||
* | ||
* @return array | ||
*/ | ||
public function getShippingMethods() | ||
{ | ||
$methods = Mage::getSingleton('shipping/config')->getAllCarriers(); | ||
$options = array(); | ||
|
||
foreach ($methods as $carrierCode => $carrier) { | ||
if (!$title = Mage::getStoreConfig("carriers/$carrierCode/title")) { | ||
$title = $carrierCode; | ||
} | ||
$values = $this->getValues($carrierCode); | ||
$options[] = array('code' => $carrierCode, 'label' => $title, 'values' => $values); | ||
} | ||
|
||
return $options; | ||
} | ||
|
||
/** | ||
* returns the corresponding shipping method types | ||
* | ||
* @return array - the kwxixo Shipping method types | ||
*/ | ||
public function getKwixoShippingTypes() | ||
{ | ||
return Mage::getModel('ops/source_kwixo_shipMethodType')->toOptionArray(); | ||
} | ||
|
||
public function getKwixoShippingSettingModel() | ||
{ | ||
if (null === $this->kwxioShippingModel) { | ||
$this->kwixoShippingModel = Mage::getModel('ops/kwixo_shipping_setting'); | ||
} | ||
return $this->kwixoShippingModel; | ||
} | ||
|
||
/** | ||
* @param $carrierCode | ||
* @return array | ||
*/ | ||
protected function getValues($carrierCode) | ||
{ | ||
$values = array( | ||
'kwixo_shipping_type' => '', | ||
'kwixo_shipping_speed' => '', | ||
'kwixo_shipping_details' => '' | ||
); | ||
if (null != ($this->getData('postData')) && array_key_exists($carrierCode, $this->getData('postData'))) { | ||
$errorData = $this->getData('postData'); | ||
$values = $errorData[$carrierCode]; | ||
} else { | ||
$values = $this->getKwixoShippingSettingModel()->load($carrierCode, 'shipping_code')->getData(); | ||
} | ||
return $values; | ||
} | ||
} |
Oops, something went wrong.