Adding event to be dispatched in 'getShoppingCartItems' method - called during checkout preload

Created on 23 April 2025, 11 days ago

Problem/Motivation

We had a requirement to adjust the Moneris receipt so that the product description could have more information. Specifically, we had to add a couple of field values related to the purchased product.

Proposed resolution

In order to adjust this information and add these field values to the Moneris "ticket" request, we needed to dispatch an event in the `getShoppingCartItems()` method, found in the `MonerisCheckoutForm` class. This required a new event class and constant added to the already existing Event setup in the module. As well as the `event_dispatcher` service to be injected as a dependency.

Remaining tasks

We are adding this change to our project codebase as a patch for now until we can put together a clear merge request that works with the current 1.x-dev branch changes. We will then add that merge request here to contribute this change back to the module in case anyone else requires the 'cart' value to be altered before submitting the request.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada colemclennan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024