Skip to content

[Issue] Meta Checkout URL Implementation #39700

Open
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #39667: Meta Checkout URL Implementation


Meta Checkout URL Implementation

This PR adds support for Meta's checkout URL specification, allowing direct linking to the checkout page with pre-populated cart items and coupon codes.

What's Changed

  • Added AddToCartLinkV1 controller that processes URL parameters to populate the cart
  • Added layout XML file to render the checkout page with consistent user experience
  • Implemented support for multiple products and coupon codes via URL parameters

How It Works

The controller accepts URL parameters in this format:
/checkout/cart/addtocartlinkv1?products=123:2,456:1&coupon=SAVE10

Screenshot 2025-02-27 at 2 45 27 PM

This will:

  1. Clear the existing cart (per Meta requirements)
  2. Add 2 units of product Performance problem & memory leak in Mage_Index_Model_Process #123 and 1 unit of product Bogus error message if mcrypt extension is not installed. #456
  3. Apply the "SAVE10" coupon code
  4. Display the checkout page

The implementation handles error cases gracefully, showing appropriate messages for invalid products or coupons.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: Cart & CheckoutComponent: CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    Status

    Pull Request in Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions