gmasso Posted July 21, 2020 Share Posted July 21, 2020 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. Link to comment Share on other sites More sharing options...
Knowband Plugins Posted July 22, 2020 Share Posted July 22, 2020 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 Link to comment Share on other sites More sharing options...
gmasso Posted July 22, 2020 Author Share Posted July 22, 2020 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? Link to comment Share on other sites More sharing options...
Andriano Posted August 1, 2020 Share Posted August 1, 2020 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now