-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIPRES-338: Mixed cart subscription listing improvements #812
PIPRES-338: Mixed cart subscription listing improvements #812
Conversation
… to main install file
|
||
use PrestaShop\PrestaShop\Adapter\Presenter\Order\OrderLazyArray; | ||
|
||
class RecurringOrderLazyArray extends OrderLazyArray |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it really extend?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$recurringOrderData['order'] = $this->orderPresenter->present( | ||
$order, | ||
(int) $recurringProduct->id_product_attribute, | ||
NumberUtility::toPrecision((float) $recurringOrder->total_tax_incl, 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constant intead of number
@@ -105,3 +109,46 @@ function updateOrderStatusNames604(Mollie $module) | |||
$authorizablePaymentStatusAuthorized->save(); | |||
} | |||
|
|||
function modifyExistingTables604(): bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you miss 'alter' => [
'
ALTER TABLE ' . DB_PREFIX . 'mollie_payments
ADD COLUMN mandate_id VARCHAR(64);
',
],?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this column was appended back in 6.0.0 release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this column anyway as we currently have a few tickets for this issue so upgrade should fix it.
$order->method('getCartProducts')->willReturn($products); | ||
$order->method('getProducts')->willReturn($products); | ||
|
||
$orderPresenter = new OrderPresenter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could use getService here instead of new
], | ||
]; | ||
|
||
$order = $this->createMock(\Order::class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mocks and integration testing :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though about just using new \Order(1) but thought that it's easier to prepare data with just creating mock.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK
* PIPRES-113: Billie payment method (#784) * PIPRES-113: Billie payment method validation (#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 (#788) * PIPRES-113: Billie payment method additional data send (#789) * PIPRES-316: hookActionFrontControllerAfterInit replacement on deprecated versions (#797) * Version bump and upgrade file fix (#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 (#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 (#806) * PIPRES-261: Payment attribute fix * changelog * replaced getProducts to getCartProducts and product attribute array key * PIPRES-306: Configuration updateValue multishop context fix (#808) (#811) * PIPRES-306: Configuration updateValue multishop context fix * tests fix * stan fix * PIPRES-338: Mixed cart subscription listing improvements (#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 (#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 (#821) * PIPRES-261: shipping option module setting (#814) * PIPRES-261: Shipping option module setting * csfixer * install and uninstall subscription configuration * improved faq page * PIPRES-333: Missing registered interface (#816) * PIPRES-261: Get carrier price to create subscription (#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 (#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 (#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 (#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 (#822) * PIPRES-261: Restrict BO subscription list for all shops (#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 <simonas.burneikis@invertus.eu>
* 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
Added alter table improvements for install process as following tables are not being removed during uninstall process at all so there were several merchants, which had previously installed Mollie module and came back to install it after some time. Due to this flow some columns were not appended as no upgrade script was executed.
Improvements for subscription order listing in BO and FO.
In BO instead of unit_price started showing total order price. Additionally changed email data for total price.
In FO improved subscriptions order listing to show only subscription order total price (previously full mixed order price was shown)
In FO added decorated OrderLazyArray class and changed OrderProvider to give only products and totals for subscription context. Adding example of recurring order, which had in the cart only subscription product to show that prices are the same. Original order had multiple random products but only one subscription.
Original order:
Subscription order view without other products
New recurring order from webhook