You can replace the default svg code in the icon-cart.liquid file with your svg code.
Topic summary
Goal: Replace Lorenza theme’s default cart icon with a custom SVG.
Key guidance:
- Direct approach: Replace the default SVG in icon-cart.liquid with the custom SVG code.
- Alternative (implemented): Insert JavaScript in theme.liquid (before ) to target .header__icon–cart .icon-header-button__icon .icon and set innerHTML to the custom SVG.
Progress & outcome:
- The JavaScript method worked for the requester after asking how to obtain their SVG code.
Current issue (latest update):
- The custom SVG’s stroke renders incorrectly. The requester shared an SVG snippet for troubleshooting.
- The snippet appears malformed/truncated in places (e.g., a line like
<path d="M114.85 244. ="round"/>and a final path cut off atM114.85 252.621L114.53 252). These issues could affect stroke rendering.
Status:
- Initial icon replacement is resolved.
- SVG stroke/rendering problem remains open. Further review of the complete, valid SVG (paths and attributes) is needed.
Notes:
- The provided code and SVG snippet are central to understanding the issue.
1 Like