Shipping information added in checkout summary irregardless of order view mode chosen.

Created on 12 March 2024, 8 months ago

Problem/Motivation

I have a Drupal 9.5 instance with commerce_shipping installed. In my checkout flow I have selected the checkout summary view instead of the twig template. The view is an order view, and I have selected to display the Order as Rendered entity with a custom view mode where I only include the Order items. However, shipping information is getting printed in my order summary. This is happening because of a preprocess hook on commerce_order, which adds the shipping information into the variables. This however runs after the selection of the fields that will be rendered with an order and as a result, it is always present there unless I remove it in an other preprocess.

Proposed resolution

I am wondering if this should be the case and it works as inteded, if there should be a way for this to be available in the order's display options, or if at least there was a way we could make it so that the user can somehow select not to have that data printed in the commerce_order template.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024