Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Mini Cart > alternative icons #6868

Closed
Tracked by #9198 ...
Marc-pi opened this issue Aug 8, 2022 · 5 comments · Fixed by #9570
Closed
Tracked by #9198 ...

Mini Cart > alternative icons #6868

Marc-pi opened this issue Aug 8, 2022 · 5 comments · Fixed by #9570
Assignees
Labels
block: mini-cart Issues related to the Mini-Cart block. needs: design The issue requires design input/work from a designer. type: enhancement The issue is a request for an enhancement.

Comments

@Marc-pi
Copy link

Marc-pi commented Aug 8, 2022

Is your feature request related to a problem? Please describe.

follow up of #6617
image

Some improvements were recently made by @danielwrobert , to make the mini cart icon different from the one of the Cart Block.
Actually, only 1 icon is proposed in the mini cart block : it does not suite all contexts
examples : you make a jellery or fashion shop > you want a bag icon instead of a "supermarket like icon"

something like that
image

Describe the solution you'd like

  • add a bag icon (i don't think we need too much icons, but a more female icon, complementary from the male cart icon)
  • permit to personalize the icon : link to replacement svg file, as proposed by @dashkevych ????

Describe alternatives you've considered

N/A

Additional context

N/A

@Marc-pi Marc-pi added the type: enhancement The issue is a request for an enhancement. label Aug 8, 2022
@sunyatasattva
Copy link
Contributor

Hello @Marc-pi ! Thank you for your suggestion and submission. I see why this might be useful. I'm adding this to our backlog, and hopefully we can get to it :)

@sunyatasattva sunyatasattva added type: good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team. block: mini-cart Issues related to the Mini-Cart block. labels Aug 11, 2022
@imanish003 imanish003 self-assigned this Sep 29, 2022
@imanish003 imanish003 removed their assignment Oct 10, 2022
@imanish003 imanish003 removed the type: good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team. label Oct 11, 2022
@SchneiderSam
Copy link

Or just add the Function to add our own SVG file.

@ifrountas
Copy link

It would be much better if you can give us the ability to insert a filter with our own svg icon.

@grel0
Copy link

grel0 commented Jan 24, 2023

it's been like this for months now!.

@digi4care
Copy link

digi4care commented Sep 18, 2023

i tried it with this code but i reverts back to it orginal svg, bummer

function custom_render_block_core_minicart (string $block_content, array $block)
{

	$svg = '<svg .... </svg>';

	if (
		$block['blockName'] === 'woocommerce/mini-cart' && 
		!is_admin() &&
		!wp_is_json_request()
	) {
		return preg_replace('/(<svg .*?\/svg\>)/s', $svg, $block_content);
	}

	return $block_content;
}

add_filter('render_block', 'custom_render_block_core_minicart', null, 2);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: mini-cart Issues related to the Mini-Cart block. needs: design The issue requires design input/work from a designer. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants