Skip to content

Commit d1f9bff

Browse files
authored
Merge pull request #1 from sandstein/master
upgrades to version 17.4.2
2 parents c62280b + 0d8bf5a commit d1f9bff

246 files changed

Lines changed: 6175 additions & 3585 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/code/community/Netresearch/OPS/Block/Adminhtml/Kwixo/Shipping/Edit.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public function getShippingMethods()
3939
if (!$title = Mage::getStoreConfig("carriers/$carrierCode/title")) {
4040
$title = $carrierCode;
4141
}
42+
4243
$values = $this->getValues($carrierCode);
4344
$options[] = array('code' => $carrierCode, 'label' => $title, 'values' => $values);
4445
}
@@ -61,6 +62,7 @@ public function getKwixoShippingSettingModel()
6162
if (null === $this->kwxioShippingModel) {
6263
$this->kwixoShippingModel = Mage::getModel('ops/kwixo_shipping_setting');
6364
}
65+
6466
return $this->kwixoShippingModel;
6567
}
6668

@@ -81,6 +83,7 @@ protected function getValues($carrierCode)
8183
} else {
8284
$values = $this->getKwixoShippingSettingModel()->load($carrierCode, 'shipping_code')->getData();
8385
}
86+
8487
return $values;
8588
}
8689
}

app/code/community/Netresearch/OPS/Block/Adminhtml/Kwixocategory/CategoryTree.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ protected function _getNodeJson($node, $level = 0)
6868
if ((int) $node->getChildrenCount() > 0) {
6969
$item['children'] = array();
7070
}
71+
7172
$isParent = $this->_isParentSelectedCategory($node);
7273
if ($node->hasChildren()) {
7374
$item['children'] = array();
@@ -81,6 +82,7 @@ protected function _getNodeJson($node, $level = 0)
8182
if ($isParent || $node->getLevel() < 2) {
8283
$item['expanded'] = true;
8384
}
85+
8486
return $item;
8587
}
8688

@@ -94,6 +96,7 @@ protected function _getProductTypeLabel($productTypeId)
9496
break;
9597
}
9698
}
99+
97100
return $res;
98101
}
99102

app/code/community/Netresearch/OPS/Block/Adminhtml/Kwixocategory/Edit.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public function getHeaderText()
4747
if ($categoryId <= 0) {
4848
return Mage::helper('ops/data')->__('Categories configuration');
4949
}
50+
5051
$category = Mage::getModel('catalog/category')->load($categoryId);
5152
return Mage::helper('ops/data')->__("Categorie's %s configuration", $category->getName());
5253
}

app/code/community/Netresearch/OPS/Block/Adminhtml/Kwixocategory/Edit/Form.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ protected function _prepareForm()
1717
if ($categoryId <= 0) {
1818
return parent::_prepareForm();
1919
}
20+
2021
$kwixoCategoryMapping = Mage::getModel('ops/kwixo_category_mapping')->loadByCategoryId($categoryId);
2122
$storeId = (int) $this->getRequest()->getParam('store');
2223

app/code/community/Netresearch/OPS/Block/Adminhtml/Sales/Order/Creditmemo/ClosedTransaction/Warning.php renamed to app/code/community/Netresearch/OPS/Block/Adminhtml/Sales/Creditmemo/ClosedTransaction/Warning.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1616
*/
1717

18-
class Netresearch_OPS_Block_Adminhtml_Sales_Order_Creditmemo_ClosedTransaction_Warning
18+
class Netresearch_OPS_Block_Adminhtml_Sales_Creditmemo_ClosedTransaction_Warning
1919
extends Mage_Core_Block_Template
2020
{
2121

@@ -27,7 +27,8 @@ class Netresearch_OPS_Block_Adminhtml_Sales_Order_Creditmemo_ClosedTransaction_W
2727
protected function _construct()
2828
{
2929
parent::_construct();
30-
$this->setTemplate('ops/sales/order/creditmemo/closed-transaction/warning.phtml');
30+
$this->setTemplate('ops/sales/creditmemo/closed-transaction/warning.phtml');
31+
3132
}
3233

3334
}

app/code/community/Netresearch/OPS/Block/Adminhtml/Sales/Order/Creditmemo/Totals/Checkbox.php renamed to app/code/community/Netresearch/OPS/Block/Adminhtml/Sales/Creditmemo/Totals/Checkbox.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1616
*/
1717

18-
class Netresearch_OPS_Block_Adminhtml_Sales_Order_Creditmemo_Totals_Checkbox
18+
class Netresearch_OPS_Block_Adminhtml_Sales_Creditmemo_Totals_Checkbox
1919
extends Mage_Core_Block_Template
2020
{
2121

@@ -27,7 +27,7 @@ class Netresearch_OPS_Block_Adminhtml_Sales_Order_Creditmemo_Totals_Checkbox
2727
protected function _construct()
2828
{
2929
parent::_construct();
30-
$this->setTemplate('ops/sales/order/creditmemo/totals/checkbox.phtml');
30+
$this->setTemplate('ops/sales/creditmemo/totals/checkbox.phtml');
3131
}
3232

3333
}

app/code/community/Netresearch/OPS/Block/Alias/List.php

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ public function getAliases()
2525
$customer = Mage::helper('customer')->getCustomer();
2626
if (0 < $customer->getId()) {
2727
$aliasesCollection = Mage::helper('ops/alias')->getAliasesForCustomer($customer->getId());
28-
foreach ($aliasesCollection as $alias) {
29-
$aliases[] = $alias;
30-
}
28+
$aliases = $aliasesCollection->getItems();
3129
}
30+
3231
return $aliases;
3332
}
3433

@@ -40,13 +39,7 @@ public function getAliases()
4039
*/
4140
public function getMethodName($methodCode)
4241
{
43-
$title = '';
44-
$instance = Mage::helper('payment')->getMethodInstance($methodCode);
45-
if ($instance) {
46-
$title = $instance->getTitle();
47-
}
48-
49-
return $title;
42+
return Mage::getStoreConfig('payment/'.$methodCode.'/title');
5043
}
5144

5245
/**

app/code/community/Netresearch/OPS/Block/Checkout/SubscriptionNotice.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ public function getRegularSubscriptionText()
139139
$this->localizeDate($this->getRegularSubscriptionEndDate())
140140
);
141141
}
142+
142143
return $message;
143144
}
144145

@@ -186,6 +187,7 @@ protected function getRegularSubscriptionEndDate()
186187
} else {
187188
$startDate = new DateTime($this->getProfile()->getStartDatetime());
188189
}
190+
189191
$enddate = $parameterModel->calculateEndDate(
190192
$startDate, $this->getProfile()->getPeriodUnit(),
191193
$this->getProfile()->getPeriodFrequency(), $this->getProfile()->getPeriodMaxCycles()

app/code/community/Netresearch/OPS/Block/Form.php

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Netresearch_OPS_Block_Form extends Mage_Payment_Block_Form_Cc
3333

3434
protected $config = null;
3535

36-
protected $_aliasDataForCustomer = array();
36+
protected $aliasDataForCustomer = array();
3737

3838
/**
3939
* Frontend Payment Template
@@ -240,7 +240,7 @@ public function getRedirectMessage()
240240
* @return array | null - array the alias data or null if the customer
241241
* is not logged in
242242
*/
243-
protected function getStoredAliasForCustomer()
243+
public function getStoredAliasForCustomer()
244244
{
245245
if (Mage::helper('customer/data')->isLoggedIn()
246246
&& Mage::getModel('ops/config')->isAliasManagerEnabled($this->getMethodCode())
@@ -256,11 +256,11 @@ protected function getStoredAliasForCustomer()
256256

257257

258258
foreach ($aliases as $key => $alias) {
259-
$this->_aliasDataForCustomer[$key] = $alias;
259+
$this->aliasDataForCustomer[$key] = $alias;
260260
}
261261
}
262262

263-
return $this->_aliasDataForCustomer;
263+
return $this->aliasDataForCustomer;
264264
}
265265

266266
/**
@@ -347,10 +347,10 @@ protected function getStoredAliasDataForCustomer($aliasId, $key)
347347
$returnValue = null;
348348
$aliasData = array();
349349

350-
if (empty($this->_aliasDataForCustomer)) {
350+
if (empty($this->aliasDataForCustomer)) {
351351
$aliasData = $this->getStoredAliasForCustomer();
352352
} else {
353-
$aliasData = $this->_aliasDataForCustomer;
353+
$aliasData = $this->aliasDataForCustomer;
354354
}
355355

356356
if (array_key_exists($aliasId, $aliasData) && $aliasData[$aliasId]->hasData($key)) {
@@ -360,4 +360,42 @@ protected function getStoredAliasDataForCustomer($aliasId, $key)
360360
return $returnValue;
361361
}
362362

363+
/**
364+
* @param $methodCode
365+
* @param $storeId
366+
* @return mixed|string
367+
*/
368+
public function getHtpTemplateName($methodCode, $storeId = null)
369+
{
370+
return $this->getConfig()->getHtpTemplateName($methodCode, $storeId);
371+
}
372+
373+
/**
374+
* get customer birthdate and gender
375+
*
376+
* @return array
377+
*/
378+
public function getCustomerData()
379+
{
380+
$data = array();
381+
$quote = $this->getQuote();
382+
$birthDate = $quote->getCustomerDob();
383+
$gender = $quote->getCustomerGender();
384+
385+
$data['birthdate'] = isset($birthDate) ? $birthDate : '';
386+
$data['gender'] = isset($gender) ? $gender : '';
387+
388+
return $data;
389+
}
390+
391+
public function getGenderOptions()
392+
{
393+
$genders = Mage::getSingleton('eav/config')
394+
->getAttribute('customer', 'gender')
395+
->getSource()
396+
->getAllOptions();
397+
398+
return $genders;
399+
400+
}
363401
}

0 commit comments

Comments
 (0)