News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

REMOVE icons in Shopping Cart

Started by K2VD4X, November 29, 2014, 19:13:48 PM

Previous topic - Next topic

K2VD4X

I want to remove 'update quantity' and 'delete from cart' icons in the cart. How do I do this? I think the default icons in Virtuemart 2 are terrible and look more like a recycling icon and a glass of water. Not very intuitive. I would prefer to simple text links 'update' and 'remove'. How do I go about doing this?

I've even tried removing the actual icons in the virtuemart assets folder to no avail which left me nonplussed.

Which php file do I have to change to achieve this?

Versions:
Joomla! 2.5.6
VirtueMart 2.6.12

Many thanks,
Rowan

jenkinhill

The icons are part of the sprite image vm2-sprite.png  To change from sprites to text you should edit the template file at components/com_virtuemart/views/cart/tmpl/default_pricelist.php around line 215 - look for COM_VIRTUEMART_CART_UPDATE and COM_VIRTUEMART_CART_DELETE to get the right code area.

Use you edited file as a template override. http://docs.virtuemart.net/tutorials/33-templating-layouts.html
You may also need to override some css.

If your Joomla version really is 2.5.6 then you are seriously out of date and using an insecure version. Current is 2.5.27
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

AH

I had problems with a couple of the default sprites so I edited the sprite file to change the icons -

Then replaced the existing sprite file
Remember to replace the file after an update as it will get overwritten
Regards
A

Joomla 4.4.5
php 8.1

K2VD4X

@ jenkinhill
Thanks for your suggestions. I worked out the solution to this problem and thanks for pointing me in the right direction. I already had a template override for default_pricelist.php and the solution was simple in the end (for those who read this later and want to know how):

in default_pricelist.php

For the update quantity icon:

<input type="submit" class="vmicon vm2-add_quantity_cart" I just added to the 'value' attribute.


For the remove item icon:

<a class="vmicon vm2-remove_from_cart" I simply added text to the link tag.


NOTE: for both you will need to remove the background because the icons are images called in CSS. I also had to reset width and height attributes so as not to clip the text.

That was it.

Quote from: jenkinhill on November 29, 2014, 20:24:49 PM
If your Joomla version really is 2.5.6 then you are seriously out of date and using an insecure version. Current is 2.5.27

Forgive me, do you Joomla versions count backwards? The backend reports that Joomla is up-to-date.

GJC Web Design

QuoteThe backend reports that Joomla is up-to-date.

it may do but it is wrong!!!  latest - as a quick look on Joomla.org will tell you -  is 2.5.27

have you updated your DB tables - > extensions -> extension manager ->database

if out of date will often show the wrong Joomla info
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation