Skip to content

Totals sort order is not respected in customer account order view #13631

@schmengler

Description

@schmengler

Preconditions

  1. Magento 2.2

Steps to reproduce

  1. Configure a non-default sort order for total (e.g. discount before shipping)
  2. Place an order with multiple totals (e.g. with discount and with shipping)

Expected result

  1. Configured sort order is respected (as in checkout)

Actual result

  1. It's always shipping, then discount, then additional totals

Apparently, Magento implements a NothingSort algorithm:

/**
* Apply sort orders to totals array.
* Array should have next structure
* array(
* $totalCode => $totalSortOrder
* )
*
*
* @param array $order
* @return $this
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function applySortOrder($order)
{
return $this;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions