Refactoring /cart view

Created on 2 June 2025, 3 months ago

Problem/Motivation

I believe the /cart view needs some adjustmentes:

- Space between the currency code and the number
- Extra "Price" label in the "Item" column
- A small thumbnail of the product being purchased would be nice
- Centering the "Total" column to the right edge of the form

Steps to reproduce

Purcharse some items and go to the /cart

Proposed resolution

Apply theming/css/config changes as needed

Remaining tasks

N/A

User interface changes

Mentioned belov

API changes

N/A

Data model changes

N/A

💬 Support request
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada danrod Ottawa

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

  • Issue created by @danrod
  • 🇨🇦Canada danrod Ottawa
  • 🇮🇳India kulpratap2002

    Working on it.

  • 🇨🇦Canada danrod Ottawa

    Any luck with this @kul.pratap ? Would you like some help?

  • 🇨🇦Canada danrod Ottawa
  • 🇮🇳India anweshas Kolkata

    Hi @danrod, I can pick this issue up.

  • 🇮🇳India anweshas Kolkata

    While working on the first and last points of the requirement (adding space between the currency code and the number, and aligning the "Total" column to the right), I found that both can be addressed by modifying the existing commerce_cart_form View.

    However, this View is not part of the sshop module configuration. It is provided by the Commerce module (specifically its Cart submodule). This means:

    • Any changes made directly to this View will be stored in the Commerce module's config, not in the sshop module.
    • As a result, these adjustments wouldn’t be tracked or exported as part of the sshop configuration.
    • Maintaining them inside sshop would require either overriding the View in code or providing a config override in the module.

    We’ll need to decide whether to:

    • Implement these adjustments via a View override in sshop, or
    • Handle them via theme/template/JS changes so they live entirely within sshop and avoid touching the Commerce config.
  • 🇮🇳India anweshas Kolkata

    While working on the first and last points of the requirement (adding space between the currency code and the number, and aligning the "Total" column to the right), I found that both can be addressed by modifying the existing commerce_cart_form View.

    However, this View is not part of the sshop module configuration. It is provided by the Commerce module (specifically its Cart submodule). This means:

    • Any changes made directly to this View will be stored in the Commerce module's config, not in the sshop module.
    • As a result, these adjustments wouldn’t be tracked or exported as part of the sshop configuration.
    • Maintaining them inside sshop would require either overriding the View in code or providing a config override in the module.

    We’ll need to decide whether to:

    • Implement these adjustments via a View override in sshop, or
    • Handle them via theme/template/JS changes so they live entirely within sshop and avoid touching the Commerce config.
Production build 0.71.5 2024