• Priority: 0
  • Status: Closed
  • Theme: Alysum
  • Assigned To: Marek
  • Private: No
  • Open Date: 05.09.18, 05:19
  • Opened by: Jorge Urrutia
  • Closed by: Marek
  • Closed on: 12.12.18, 15:49
  • Reason: Closed
  • Comment: Glad to help!

Ticket #12855 - icon in button add to cart

Hello Marek
Hope you are well.
Maybe my question is not very important, but you always help me and get rid of doubts.
I want to know how you can put the icon of a super market car in the add button to the car. The truth is that I see many pages of prestashop that have that icon.
How could I do it, to see who can help me.
I attached an example image
I would greatly appreciate it.

Comments

Marek 05 Sep 2018, 12:21

Hi, Jorge.
Open the file /themes/casemag/templates/catalog/_partials/product-add-to-cart.tpl
Find the line 43:

<button class="btn btn-primary add-to-cart" data-button-action="add-to-cart" type="submit" {if !$product.add_to_cart_url}disabled{/if}>
  {l s='Add to cart' d='Shop.Theme.Actions'}
</button>

replace it with:

<button class="btn btn-primary add-to-cart" data-button-action="add-to-cart" type="submit" {if !$product.add_to_cart_url}disabled{/if}>
  <svg class="svgic"><use xlink:href="#si-cart"></use></svg>&nbsp;{l s='Add to cart' d='Shop.Theme.Actions'}
</button>