Skip to content

Shipping method radios have duplicate IDs on cart page #10795

Closed
@wsajosh

Description

@wsajosh

Preconditions

  1. Magento CE v2.1 installed

Steps to reproduce

  1. Can't reproduce using core Magento shipping carriers. Need two shipping carriers with different carrier codes but same method codes.

E.g: UPS with GND and 1DA and UPS_1 with GND and 1DA

Expected result

  1. Should be able to select Ground from either carrier

Actual result

  1. Clicking on the first Ground

Issue would appear to lie in: vendor/magento/module-checkout/view/frontend/web/template/cart/shipping-rates.html

The id of the radio is being set to 's_method_' + method_code whereas which would for the above scenario would result in two radio elements both with the ID of "s_method_GND"

However, in the checkout/shipping.html file there's a check to see if there's other rates, and if there is the ID is set to 's_method_' + method.carrier_code + '_' + method.method_code which works correctly.

The fix would be to implement the same logic on the cart estimator

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.2.xThe issue has been fixed in 2.2 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentup for grabs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions