Skip to content

BO - Order details - Payment block not refreshed after adding product #21293

Closed
Listed in
@Robin-Fischer-PS

Description

@Robin-Fischer-PS
Contributor

Describe the bug

On BO, when adding/updating a product on an already paid order, the message in Payment block "Warning €XX paid instead of €XX" is not added/updated immediately. A refresh is needed (on Legacy refresh wasn't needed).

Please note that when a voucher is added, the Payment block is automatically updated without refresh.

Expected behavior

Payment block should be updated each time an update is made on the order.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Have a paid order
  2. Go to BO > Orders > On the paid orders
  3. Add or Edit a product on the order
  4. The "Warning" message in payment block is not displayed
  5. Refresh the page : Warning message is now displayed.

Screenshots

On screenrecord : I add a product, Payment block is not updated. I refresh : The "warning" message is now updated in Payment block.

https://drive.google.com/file/d/1A5gryu4jr0oSdI7B4Oy_UeulJeNVp39Z/view?usp=sharing

Additional information

  • PrestaShop version: 1770rc1build1
  • PHP version: N/A

Activity

added
TrivialSeverity: trivial bug > https://build.prestashop.com/news/severity-classification
BOCategory: Back Office
OrderComponent: Which BO section is concerned
ReadyStatus: Issue is ready to be worked on
migrationsymfony migration project
on Oct 5, 2020
prestashop-issue-bot

prestashop-issue-bot commented on Oct 5, 2020

@prestashop-issue-bot

Thanks for opening this issue! We will help you to keep its state consistent

added
Nice-to-haveKanban prioritization: issue could be included in next version
on Oct 5, 2020
sowbiba

sowbiba commented on Oct 5, 2020

@sowbiba
Contributor

Fixing this issue means add a route to get order's payments. Too big to add it after RC1 release I think

@PrestaShop/prestashop-core-developers @PrestaShop/prestashop-maintainers WDYT ?

self-assigned this
on Oct 5, 2020
jolelievre

jolelievre commented on Oct 5, 2020

@jolelievre
Contributor

Hi @Robin-Fischer-PS,

regarding your side note when a Voucher is added, it indeed works because adding a voucher performs a page request that redirects to the view page so everything is updated when the submit button is clicked.

However add/remove product manipulation happen via ajax calls and JS updates, which is why the Payment block is not updated. As @sowbiba noticed we have no JS code nor server side API to update this block dynamically for now. It would require to either create a JSON API and the js code that can interpret and replace it. Or a more simple "API" that simply returns the block html code This has been done in other refresh calls although it's far from ideal it has the advantage to be easy to implement and can withstand hooks and template overrides better.

We have a similar issue regarding the Carrier block #21267 when shipping is updated the Order details are updated but not the OrderCarrier ones.

To me it is indeed a regression from the previous behaviour, I'd be more in favor of fixing this for the next 177 version, even if it implies adding new endpoints in the OrderController. Though I don't know if it's considered a new feature (forbidden after code freeze) or a missing feature that should have been coded and could be added in the next patch version? @eternoendless what do you think?

added
Needs SpecsStatus: issue needs to be specified
and removed
ReadyStatus: Issue is ready to be worked on
on Oct 6, 2020
LouiseBonnard

LouiseBonnard commented on Oct 7, 2020

@LouiseBonnard
Contributor

For a patch version instead of 1.7.7.

12 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

1.7.7.xBranchBOCategory: Back OfficeFixedResolution: issue closed because fixedNice-to-haveKanban prioritization: issue could be included in next versionOrderComponent: Which BO section is concernedRegressionType: regressionTrivialSeverity: trivial bug > https://build.prestashop.com/news/severity-classificationmigrationsymfony migration project

Type

No type

Projects

No projects

Relationships

None yet

    Participants

    @eternoendless@Progi1984@sowbiba@marionf@jolelievre

    Issue actions

      BO - Order details - Payment block not refreshed after adding product · Issue #21293 · PrestaShop/PrestaShop