Skip to content

Commit

Permalink
Develop-6.0.4 (mollie#804)
Browse files Browse the repository at this point in the history
* PIPRES-113: Billie payment method (mollie#784)

* PIPRES-113: Billie payment method validation (mollie#783)

* PIPRES-113: Billie payment method validation

* added missing services to base service provider

* wrong method call fix

* missing repository

* PIPRES-113: Billie payment method setup (mollie#788)

* PIPRES-113: Billie payment method additional data send (mollie#789)

* PIPRES-316: hookActionFrontControllerAfterInit replacement on deprecated versions (mollie#797)

* Version bump and upgrade file fix (mollie#800)

* release-6.0.1.

* updating the e2e on PR yml

targeting `develop` branch for E2E testing

* adding Ngrok launch fix

preventing the failing CI, while Ngrok is busy

* small yml fix

* fixing the module upgrade CI testing

* small fix

* upgrading text fix

* test fixes

* small fix

* removing the PS8 CI upgrading test

because 5.2.0 was incompatible with PS8x

* cypress upgrading

* useful E2E test spec updates

* adding improved Cypress terminal logs

* debug mode enabling

* Update prestashop_1784_2.sql

* useful cypress updates

* useful test code updates

* specs updates

* ps8 test spec updates

* Update Makefile

* test spec updates

* updates for test specs

* updates for test specs

* Update 02_mollie.ps1784.EnablingPaymentsOrdersAPI.specs.js

* ps8 test code updates

* ps1784 test spec updates

* in3 payment wip

* Update 03_mollie.ps8.Subscriptions.WIP.js

* Update .htaccess1784

* Update prestashop_1784_2.sql

* ps1784 test updates

* Update 03_mollie.ps1784.PaymentTests.js

* ps1784 test updates

* Update 03_mollie.ps1784.PaymentTests.js

* Update .gitignore

* ps1784 finalized updates

* disabling debug mode

* Revert "disabling debug mode"

This reverts commit 0f70ace.

* spec update

* spec updates

* spec updates (ps1784/ps8)

* Update 04_mollie.ps8.Subscriptions.WIP.js

* Update 02_mollie.ps8.EnablingPaymentsOrdersAPI.specs.js

* Update Makefile

* Update prestashop_8.sql

* Update prestashop_8.sql

* Update .htaccess8

* Update prestashop_8.sql

* Update 02_mollie.ps8.EnablingPaymentsOrdersAPI.specs.js

* spec updates

* ps8 test spec updates

* ps8 small typo fixes

* Update 03_mollie.ps8.PaymentTests.js

* cypress updates

* Update 03_mollie.ps1784.PaymentTests.js

* Update cypress.config.js

* adding ps8.0.5 docker build

* Update .htaccess8

* Update 03_mollie.ps8.PaymentTests.js

* Update 03_mollie.ps8.PaymentTests.js

* ps1784 debug mode disabling

* ps8 debug mode disabling

* small update

* small typo fix

* Update E2E_On_PR.yml

* adding random branch string ending

* Update upgrading_check.yml

* Update cypress.config.js

* selector updates

* updating the testrail extension

by Chris

* temporary disabling the error checking

* increasing timeout for selectors

* cypress-testrail extension fix

* PIPRES-261: Mixed cart checkout for subscriptions (mollie#803)

* PIPRES-261: New order split into separate subscription order

* csfixer

* stan

* improved validations

* removed commented code

* note fixes

* test fix

* stan fix

* reduced redundant code

* PIPRES-261: Payment attribute fix (mollie#806)

* PIPRES-261: Payment attribute fix

* changelog

* replaced getProducts to getCartProducts and product attribute array key

* PIPRES-306: Configuration updateValue multishop context fix (mollie#808) (mollie#811)

* PIPRES-306: Configuration updateValue multishop context fix

* tests fix

* stan fix

* PIPRES-338: Mixed cart subscription listing improvements (mollie#812)

* PIPRES-338: Mixed cart subscription listing improvements

* added rounding for total price and moved part of install improvements to main install file

* fix

* added mandate_id append to upgrade file too

* fix

* PIPRES-113: Billie payment method additional check for vat number (mollie#813)

* ps1784 debug mode

* updating terminal report extension

* ps8 debug mode

* Update Dockerfile.1784

* upgrading the build to PS1785

* ps1785 updates

* ps1785 updates

* Update E2E_On_PR.yml

* moving things to ps1785

* Update E2E_On_PR.yml

* Update E2E_On_PR.yml

* downgrading cypress

breaking changes in the terminal module, temporary downgrading Cypress

* some e2e fixes

* Update 04_mollie.ps1785.Subscriptions.js

* Update 03_mollie.ps8.PaymentTests.js

* Update 04_mollie.ps8.Subscriptions.js

* adding testrail ids for CI

* Update 03_mollie.ps8.PaymentTests.js

* small typo

* small e2e improvements

* PIPRES-261: Separate carrier for recurring orders improvements (mollie#821)

* PIPRES-261: shipping option module setting (mollie#814)

* PIPRES-261: Shipping option module setting

* csfixer

* install and uninstall subscription configuration

* improved faq page

* PIPRES-333: Missing registered interface (mollie#816)

* PIPRES-261: Get carrier price to create subscription (mollie#817)

* PIPRES-261: Get carrier price to create subscription

* updated subscription faq

* renamed some services and added additional conditions for carrier retrieve

* addedd back to exception codes

* PIPRES-261: Set carrier for recurring order (mollie#818)

* PIPRES-261: Get carrier price to create subscription

* renamed some services and added additional conditions for carrier retrieve

* PIPRES-261: Set carrier for recurring order

* PIPRES-261: Subscription order detail view refactoring (mollie#819)

* PIPRES-261: Get carrier price to create subscription

* renamed some services and added additional conditions for carrier retrieve

* addedd back to exception codes

* PIPRES-261: Subscription order detail view refactoring

* phpstan

* PIPRES-261: Minor improvements (mollie#820)

* PIPRES-261: Get carrier price to create subscription

* renamed some services and added additional conditions for carrier retrieve

* PIPRES-261: Minor improvements

* PIPRES-261: Create fresh specific price (mollie#822)

* PIPRES-261: Restrict BO subscription list for all shops (mollie#823)

* PIPRES-261: Restrict BO subscription list for all shops

* fixed redundant error mesage

* url updates

* refactoring PS17 tests

* ps8 tests refactored

* Update 04_mollie.ps1785.EnablingPaymentsPaymentsAPI.specs.js

* updating urls

* small typo

* small typo

---------

Co-authored-by: SimonasB88 <[email protected]>
  • Loading branch information
mandan2 and SimonasB88 authored Oct 16, 2023
1 parent e9d10f9 commit b3fb716
Show file tree
Hide file tree
Showing 145 changed files with 9,853 additions and 13,835 deletions.
50 changes: 22 additions & 28 deletions .docker/.htaccess1784 → .docker/.htaccess1785
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,75 +10,69 @@ SetEnv HTTP_MOD_REWRITE On
RewriteEngine on


#Domain: demoshop1784.ngrok.io
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
#Domain: demoshop1785.ngrok.io
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# Images
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]


#Domain: demoshop1784.ngrok.io
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
#Domain: demoshop1785.ngrok.io
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^SHOP2$ /SHOP2/ [L,R]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^SHOP2/(.*) /$1 [L]

# Images
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteCond %{HTTP_HOST} ^demoshop1785.ngrok.io$
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteRule ^.*$ - [NC,L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>

Expand Down
39 changes: 0 additions & 39 deletions .docker/.htaccess8
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ RewriteEngine on


#Domain: demoshop8.ngrok.io
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
RewriteRule ^upload/.+$ %{ENV:REWRITEBASE}index.php [QSA,L]
Expand All @@ -36,51 +35,13 @@ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBAS
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]


#Domain: demoshop8.ngrok.io
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
RewriteRule ^upload/.+$ %{ENV:REWRITEBASE}index.php [QSA,L]

RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^shop2$ /shop2/ [L,R]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^shop2/(.*) /$1 [L]

# Images
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^.*$ - [NC,L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>

Expand Down
2 changes: 1 addition & 1 deletion .docker/Dockerfile.1784 → .docker/Dockerfile.1785
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM prestashop/prestashop:1.7.8.4-apache
FROM prestashop/prestashop:1.7.8.5-apache

RUN cd /usr/local/etc/php/conf.d/ && \
echo 'memory_limit = 4096M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini
Expand Down
2 changes: 1 addition & 1 deletion .docker/Dockerfile.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM prestashop/prestashop:8.0.1-apache
FROM prestashop/prestashop:8.0.5-apache

RUN cd /usr/local/etc/php/conf.d/ && \
echo 'memory_limit = 4096M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/E2E_On_PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Cypress E2E Automation [develop branch]
on:
pull_request:
types: [opened, reopened]
branches: [develop]
branches: [develop, develop**, develop-**]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -15,13 +15,13 @@ jobs:
fail-fast: false
matrix:
include:
- prestashop: 'PS1784'
make: 'make e2eh1784'
subdomain: 'demoshop1784'
- prestashop: 'PS1785'
make: 'make e2eh1785'
subdomain: 'demoshop1785'
port: '8002'
yml: 'docker-compose.1784.yml'
url: 'https://demoshop1784.ngrok.io'
test_spec: '**/cypress/e2e/ps1784/**'
yml: 'docker-compose.1785.yml'
url: 'https://demoshop1785.ngrok.io'
test_spec: '**/cypress/e2e/ps1785/**'
TestRailID: R4954
- prestashop: 'PS8'
make: 'make e2eh8'
Expand All @@ -42,7 +42,7 @@ jobs:
shell: bash
- run: ./ngrok authtoken ${{ secrets.NGROK_TOKEN }}
shell: bash
- run: ./ngrok http -region=eu -subdomain=${{ matrix.subdomain }} ${{ matrix.port }} > ngrok.log &
- run: ./ngrok http -region=us -subdomain=${{ matrix.subdomain }} ${{ matrix.port }} > ngrok.log &
shell: bash
- name: Install composer
run: composer i
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/upgrading_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ name: Module upgrade / downgrade testing (last version > v.5.2.0 > `develop` ver
on:
pull_request:
types: [opened, reopened]
branches: [develop]
branches: [develop, develop**, develop-**]
jobs:
Module-upgrading-check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- prestashop: 'PS1784'
make: 'make e2eh1784'
- prestashop: 'PS1785'
make: 'make e2eh1785'
port: '8002'
yml: 'docker-compose.1784.yml'
ModuleUpgradeTest: 'make upgrading-module-test-1784'
yml: 'docker-compose.1785.yml'
ModuleUpgradeTest: 'make upgrading-module-test-1785'
steps:
- name: Checkout
uses: actions/[email protected]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ cypress/screenshots
vendor
node_modules
composer.lock
ngrok
38 changes: 19 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
fix-lint:
docker-compose run --rm php sh -c "vendor/bin/php-cs-fixer fix --using-cache=no"

#PS1784
e2eh1784:
#PS1785
e2eh1785:
# detaching containers
docker-compose -f docker-compose.1784.yml up -d --force-recreate
docker-compose -f docker-compose.1785.yml up -d --force-recreate
# sees what containers are running
docker-compose -f docker-compose.1784.yml ps
docker-compose -f docker-compose.1785.yml ps
# waits for mysql to load
/bin/bash .docker/wait-for-container.sh mysql-mollie-1784
/bin/bash .docker/wait-for-container.sh mysql-mollie-1785
# configuring your prestashop
docker exec -i prestashop-mollie-1784 sh -c "rm -rf /var/www/html/install"
docker exec -i prestashop-mollie-1785 sh -c "rm -rf /var/www/html/install"
# configuring base database
mysql -h 127.0.0.1 -P 9002 --protocol=tcp -u root -pprestashop prestashop < ${PWD}/tests/seed/database/prestashop_1784_2.sql
mysql -h 127.0.0.1 -P 9002 --protocol=tcp -u root -pprestashop prestashop < ${PWD}/tests/seed/database/prestashop_1785_2.sql
# installing module
docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie --id_shop=3"
docker exec -i prestashop-mollie-1785 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie"
# uninstalling module
docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module uninstall mollie --id_shop=3"
docker exec -i prestashop-mollie-1785 sh -c "cd /var/www/html && php bin/console prestashop:module uninstall mollie"
# installing the module again
docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie --id_shop=3"
docker exec -i prestashop-mollie-1785 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie"
# enabling the module
docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module enable mollie --id_shop=3"
docker exec -i prestashop-mollie-1785 sh -c "cd /var/www/html && php bin/console prestashop:module enable mollie"
# chmod all folders
docker exec -i prestashop-mollie-1784 sh -c "chmod -R 777 /var/www/html"
docker exec -i prestashop-mollie-1785 sh -c "chmod -R 777 /var/www/html"

#PS8
e2eh8:
Expand All @@ -40,13 +40,13 @@ e2eh8:
# configuring base database
mysql -h 127.0.0.1 -P 9459 --protocol=tcp -u root -pprestashop prestashop < ${PWD}/tests/seed/database/prestashop_8.sql
# installing module
docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie --id_shop=2"
docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie"
# uninstalling module
docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module uninstall mollie --id_shop=2"
docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module uninstall mollie"
# installing the module again
docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie --id_shop=2"
docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie"
# enabling the module
docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module enable mollie --id_shop=2"
docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module enable mollie"
# chmod all folders
docker exec -i prestashop-mollie-8 sh -c "chmod -R 777 /var/www/html"

Expand All @@ -59,13 +59,13 @@ run-e2e-tests-locally:
npx cypress run

# checking the module upgrading - installs older module then installs from master branch
upgrading-module-test-1784:
upgrading-module-test-1785:
git fetch
git checkout v5.2.0 .
composer install
# installing 5.2.0 module
docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie"
docker exec -i prestashop-mollie-1785 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie"
# installing develop branch module
git checkout -- .
git checkout develop --force
docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie"
docker exec -i prestashop-mollie-1785 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie"
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

# Changelog #

## Changes in release 6.0.4 ##
+ New payment method: Billie.
+ Enabled mixed cart for subscription orders. Various products could be coupled with a single subscription product.
+ Overall improvements and bug fixes.

## Changes in release 6.0.3 ##
+ High priority bug fix impacting product add to cart pop-up.

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"ext-json": "*",
"ext-simplexml": "*",
"prestashop/decimal": "^1.3",
"mollie/mollie-api-php": "v2.42.1",
"mollie/mollie-api-php": "v2.61.0",
"segmentio/analytics-php": "^1.5",
"sentry/sentry": "3.17.0",
"league/container": "2.5.0",
Expand Down
6 changes: 1 addition & 5 deletions controllers/front/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Mollie\Exception\FailedToProvidePaymentFeeException;
use Mollie\Provider\PaymentFeeProviderInterface;
use Mollie\Repository\CurrencyRepositoryInterface;
use Mollie\Subscription\Exception\ProductValidationException;
use Mollie\Subscription\Exception\SubscriptionProductValidationException;
use Mollie\Subscription\Validator\CanProductBeAddedToCartValidator;
use Mollie\Utility\NumberUtility;
Expand Down Expand Up @@ -192,12 +191,9 @@ private function validateProduct(): void

try {
$cartValidation->validate((int) $product['id_product_attribute']);
} catch (ProductValidationException $e) {
$productCanBeAdded = false;
$message = $this->module->l('Product cannot be added because you have subscription product in your cart', self::FILE_NAME);
} catch (SubscriptionProductValidationException $e) {
$productCanBeAdded = false;
$message = $this->module->l('Subscription product cannot be added if you have other products in your cart', self::FILE_NAME);
$message = $this->module->l('Please note: Only one subscription product can be added to the cart at a time.', self::FILE_NAME);
}

$this->ajaxRender(
Expand Down
23 changes: 18 additions & 5 deletions controllers/front/recurringOrderDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
*/

use Mollie\Controller\AbstractMollieController;
use Mollie\Logger\PrestaLoggerInterface;
use Mollie\Subscription\Handler\FreeOrderCreationHandler;
use Mollie\Subscription\Handler\SubscriptionCancellationHandler;
use Mollie\Subscription\Logger\RecurringOrderPresenter;
use Mollie\Subscription\Presenter\RecurringOrderPresenter;
use Mollie\Subscription\Repository\RecurringOrderRepositoryInterface;

class MollieRecurringOrderDetailModuleFrontController extends AbstractMollieController
Expand Down Expand Up @@ -74,13 +75,25 @@ public function initContent()
Tools::redirect(Context::getContext()->link->getModuleLink($this->module->name, 'subscriptions', [], true));
}

/** @var PrestaLoggerInterface $logger */
$logger = $this->module->getService(PrestaLoggerInterface::class);

/** @var RecurringOrderPresenter $recurringOrderPresenter */
$recurringOrderPresenter = $this->module->getService(RecurringOrderPresenter::class);

$this->context->smarty->assign([
'recurringOrderData' => $recurringOrderPresenter->present($recurringOrderId),
'token' => Tools::getToken(),
]);
try {
$this->context->smarty->assign([
'recurringOrderData' => $recurringOrderPresenter->present($recurringOrderId),
'token' => Tools::getToken(),
]);
} catch (Throwable $exception) {
$logger->error('Failed to present subscription order', [
'Exception message' => $exception->getMessage(),
'Exception code' => $exception->getCode(),
]);

Tools::redirect(Context::getContext()->link->getModuleLink($this->module->name, 'subscriptions', [], true));
}

parent::initContent();
$this->context->controller->addCSS($this->module->getPathUri() . 'views/css/front/subscription/customer_order_detail.css');
Expand Down
Loading

0 comments on commit b3fb716

Please sign in to comment.