feat(svg-icon): Add svg_icon support for favoriteproducts module

This commit is contained in:
2025-12-31 14:25:08 +01:00
parent 57c34d3aa2
commit 6827758b2f
2 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,29 @@
<div class="col-auto mt-2 px-1">
<a
class="product-page__action-btn btn btn-light shadow rounded-circle favorite-btn p-2"
href="#"
data-action="toggleFavorite"
data-active="false"
{if isset($product.id) && isset($product.id_product_attribute)}
data-key="{$product.id}_{$product.id_product_attribute}"
{/if}
>
<div class="favorite-btn__content favorite-btn__content--added">
{capture name="svg_output"}{svg_icon file='heart.svg' }{/capture}
{if $smarty.capture.svg_output}
{$smarty.capture.svg_output nofilter}
{else}
<span class="material-icons product-page__action-btn-icon d-block">favorite</span>
{/if}
</div>
<div class="favorite-btn__content favorite-btn__content--add">
{capture name="svg_output"}{svg_icon file='heart.svg'}{/capture}
{if $smarty.capture.svg_output}
{$smarty.capture.svg_output nofilter}
{else}
<span class="material-icons product-page__action-btn-icon d-block">favorite_border</span>
{/if}
</div>
</a>
</div>

View File

@ -0,0 +1,28 @@
<a
class="product-miniature__functional-btn product-miniature__functional-btn--top btn btn-light shadow rounded-circle favorite-btn"
href="#"
data-action="toggleFavorite"
data-active="false"
{if isset($product.id) && isset($product.id_product_attribute)}
data-key="{$product.id}_{$product.id_product_attribute}"
{/if}
>
<div class="favorite-btn__content favorite-btn__content--added">
{capture name="svg_output"}{svg_icon file='heart.svg'}{/capture}
{if $smarty.capture.svg_output}
{$smarty.capture.svg_output nofilter}
{else}
<span class="material-icons product-miniature__functional-btn-icon d-block">favorite</span>
{/if}
</div>
<div class="favorite-btn__content favorite-btn__content--add">
{capture name="svg_output"}{svg_icon file='heart.svg' width="22"}{/capture}
{if $smarty.capture.svg_output}
{$smarty.capture.svg_output nofilter}
{else}
<span class="material-icons product-miniature__functional-btn-icon d-block">favorite_border</span>
{/if}
</div>
</a>