Magento 2.3.3

I want to add something to the name in the checkout summary. I have a custom checkout extension and it already comes with the DefaultConfigProvider class. In the afterGetConfig function I tried to modify the name, without success so far. This is what I tried:

public function afterGetConfig(\Magento\Checkout\Model\DefaultConfigProvider $subject, $config) {
    $items = $config['totalsData']['items'];
    foreach ($items as $index => $item) {

        $config['totalsData']['items'][$index]['name'] = 'whatever';
        $config['quoteItemData']['items'][$index]['name'] = 'adfdfs';
    return $config;

The name does not change, what is wonrg with this approach?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.