Jump to content

Replace shopping cart icon


gmasso
 Share

Recommended Posts

Hi! I want to replace the default icon that comes with the shopping cart module in the classic theme with an icon of my own. My guess is that I should modify something in the ps_shoppingcart.tpl file, but I don't really understand how images work in .tpl files. I attach a screenshot of the icon I want to replace and another with the line of code where I guess the icon is being set.

Captura de pantalla 2020-07-21 a las 15.44.41.png

Captura de pantalla 2020-07-21 a las 15.51.15.png

Share this post


Link to post
Share on other sites

These are the CSS Icons. 
You can either directly replace highlighted HTML with the img src tag & add own img link in the src tag.

Using the highlighted method, You can only use the icons which are predefined. Your theme is using the material icons. The list of material icons can be found on the URL below.
https://material.io/resources/icons/?style=baseline

You need to replace the "shopping-cart" (As you mentioned on the highlighted section), with the text defined in the above URL for icons.

Like replace "shopping-cart" with "shopping_bag" to replace the icons as shown in the screenshot below.
https://prnt.sc/tmdooi

Share this post


Link to post
Share on other sites

2 hours ago, Knowband Plugins said:

These are the CSS Icons. 
You can either directly replace highlighted HTML with the img src tag & add own img link in the src tag.

Using the highlighted method, You can only use the icons which are predefined. Your theme is using the material icons. The list of material icons can be found on the URL below.
https://material.io/resources/icons/?style=baseline

You need to replace the "shopping-cart" (As you mentioned on the highlighted section), with the text defined in the above URL for icons.

Like replace "shopping-cart" with "shopping_bag" to replace the icons as shown in the screenshot below.
https://prnt.sc/tmdooi

Ok, thanks! But I tried using the img src tag and it does not really work. I thought it was as simple as saving my image in a folder inside the project and then putting the path inside "src", but I guess I am doing something wrong?

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Replace <i></i> by <img src="folder/myicon.png" alt=""> in tpl. To disable the tag <i></i> don't delet it, just comment it with tag <!--   -->(See html doc firefox). Don't forgot to put the complete url of your icon image(example "http://mywebsite/folder/icon.png"). You can put a custom image with FTP transfer and you can create custom folder.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More