The shopping cart icon is not visible if the background is white

Created on 18 February 2024, 9 months ago
Updated 5 March 2024, 9 months ago

The cart block icon is hardcoded to be white

commerce/modules/cart/scr/Plugin/Blocks/cartblock.php
169 '#uri' => $this->moduleExtensionList->getPath('commerce') . '/icons/000000/cart.png',

In the directory commerce/icons/000000/ there are eight sets of colored icons.
But I was not able to find any documentation on how to select one of them.
It would be great to be able to select the color form the Block settings.

Thanks
Henrik

๐Ÿ“Œ Task
Status

Needs work

Version

2.38

Component

Cart

Created by

๐Ÿ‡ธ๐Ÿ‡ชSweden hstrindb

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

Comments & Activities

  • Issue created by @hstrindb
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Rajas Samse

    Rajas Samse โ†’ made their first commit to this issueโ€™s fork.

  • Status changed to Needs review 9 months ago
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 9 months ago
    Patch Failed to Apply
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Rajas Samse

    Added customization options for the cart block:
    - Users can now choose the cart icon color (black or white).
    - The selected icon color is dynamically used in the block.
    - Maintained existing configuration for displaying cart contents in a dropdown.
    On line 110 of CartBlock.php you can add more color options

    resolved issue, please review

  • Status changed to Needs work 9 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States SocialNicheGuru

    Is this the right patch for this issue? What is Packethub?

  • ๐Ÿ‡ธ๐Ÿ‡ชSweden hstrindb

    This looks like a patch for a README.md file. It begins:

    diff --git a/README.md b/README.md
    index 1a201e7..f8e0215 100644
    --- a/README.md
    +++ b/README.md
    
  • Status changed to Needs review 9 months ago
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 9 months ago
    774 pass, 4 fail
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Rajas Samse

    I apologize for mistakenly submitting the wrong patch to your issue. I've corrected it promptly. Sorry for any inconvenience. @SocialNicheGuru, Packethub is a theme. I was working on Packethub issues, and by mistake, I submitted a Packethub patch to this issue.

    please review

  • ๐Ÿ‡ธ๐Ÿ‡ชSweden hstrindb

    The patch works!
    It allows for selecting either a black or a white icon.

    Commerce comes with a set of icons of different colors, one green, one blue, and so on.
    So an improvement would be to be able to select any of these.

    But this is already awesome, many thanks!

  • Status changed to RTBC 9 months ago
  • ๐Ÿ‡ธ๐Ÿ‡ชSweden hstrindb
  • Status changed to Needs work 9 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ฑIsrael jsacksick

    Patch has extra empty spaces, and tests are failing... Patch is missing a change to defaultConfiguration() as well.

Production build 0.71.5 2024