Skip to content

Commit

Permalink
Changed the ID, renewed instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-ackermann committed Jul 9, 2021
1 parent c5ac105 commit a6a823e
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 25 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 oxid-academy
Copyright (c) 2019-2021 oxid-academy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 3 additions & 2 deletions Model/PaymentList.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @author OXID Academy
* @link https://www.oxid-esales.com
* @copyright (C) OXID eSales AG 2003-2019
* @copyright (C) OXID eSales AG 2003-2021
*
* User: michael
* Date: 23.04.19
Expand Down Expand Up @@ -37,6 +37,7 @@ class PaymentList extends PaymentList_parent
*/
public function getPaymentList($shipSetId, $price, $user = null)
{

// @Todo: Replace this.
return parent::getPaymentList(shipSetId, price, user);
}
}
34 changes: 20 additions & 14 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# OXID Academy: Exercise extensions (Skeleton)

This package contains a module skeleton for training purposes at OXID Academy.
This package contains an example module intended for training purposes at OXID Academy.

## Installation instructions
# Installation instructions

### Register and require the package
## Register and require the package

In the local development environment, cd into the root directory of your compilation
and run Composer as follows:
In the local development environment, cd into the root directory of your compilation (where composer.json and composer.lock
are located) and run Composer as shown below:

```
composer config repositories.oxid-academy/feefreepayments vcs https://github.com/oxid-academy/feefreepayments.git
```

This should result in the following change to `composer.json`:
```
...
...
"repositories": {
...,
"oxid-academy/feefreepayments": {
"type": "vcs",
"url": "https://github.com/oxid-academy/feefreepayments.git"
}
},
...
},
...
```

And then, ...
... which results in something like:
```
composer require oxid-academy/feefreepayments
```
Expand All @@ -39,12 +39,18 @@ composer require oxid-academy/feefreepayments
},
```

## Build compilation
# Enabling the module

Now, run Composer to build the compilation:
* When Composer is done processing your new request, you may enable the module:
```
composer update
vendor/bin/oe-console o:m:activate oxacfeefreepayments
```

## Running tests
`./vendor/bin/runtests /var/www/oxideshop/source/modules/oxac/feefreepayments/Tests/`
# Running tests
cd into the root dir of your compilation and run the following command whereupon `/var/www/oxideshop` represents the absolute
path to your compilation:

```
cd /var/www/oxideshop/
./vendor/bin/runtests /var/www/oxideshop/source/modules/oxac/feefreepayments/Tests/
```
5 changes: 4 additions & 1 deletion Tests/Unit/Model/PaymentListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @author OXID Academy
* @link https://www.oxid-esales.com
* @copyright (C) OXID eSales AG 2003-2019
* @copyright (C) OXID eSales AG 2003-2021
*
* User: michael
* Date: 24.04.19
Expand Down Expand Up @@ -50,6 +50,9 @@ protected function tearDown()

}

/**
* Create payment option, assign to delivery set, then test with user.
*/
public function testGetPaymentListFiltersOnlyPaymentsWithFees()
{

Expand Down
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Sample payment extension",
"type": "oxideshop-module",
"keywords": ["oxid", "modules", "eShop"],
"homepage": "https://www.oxid-esales.com/oxid-welt/academy/schulungen/",
"homepage": "https://www.oxid-esales.com/academy/schulungen",
"license": [
"GPL-3.0-only",
"proprietary"
Expand All @@ -13,13 +13,12 @@
"target-directory": "oxac/feefreepayments"
}
},
"version": "1.0.2",
"require": {
"php": ">=7.1"
"oxid-esales/oxideshop-metapackage-ce": ">=6.1.0"
},
"autoload": {
"psr-4": {
"OxidAcademy\\FeeFreePayments\\": "../../../source/modules/oxac/feefreepayments"
"OxidAcademy\\FeeFreePayments\\": "."
}
}
}
6 changes: 3 additions & 3 deletions metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @author OXID Academy
* @link https://www.oxid-esales.com
* @copyright (C) OXID eSales AG 2003-2019
* @copyright (C) OXID eSales AG 2003-2021
*
*/

Expand All @@ -22,7 +22,7 @@
* Module information
*/
$aModule = [
'id' => 'oxac/feefreepayments',
'id' => 'oxacfeefreepayments',
'title' => [
'de' => 'Kostenlose Zahlungsarten (Modulskelett)',
'en' => 'Fee Free Payments (module skeleton)'
Expand All @@ -32,7 +32,7 @@
'en' => 'Filter for displaying free payment options only.',
],
'thumbnail' => 'logo.png',
'version' => '1.0.2',
'version' => '2.0.0',
'author' => 'OXID Academy',
'url' => 'https://www.oxid-esales.com/oxid-welt/academy/schulungen/',
'email' => '[email protected]',
Expand Down

0 comments on commit a6a823e

Please sign in to comment.