VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Jörgen on July 01, 2015, 20:12:07 PM

Title: Misuse of icon-delete in components/com_virtuemart/helpers/shopfunction.php?
Post by: Jörgen on July 01, 2015, 20:12:07 PM
In shopfunctions.php on line 280 i find this:
$_shipTo[] = '&nbsp;&nbsp;<a href="'.JRoute::_ ('index.php?option=com_virtuemart&view=user&task=removeAddressST&virtuemart_user_id[]=' . $_addressList[$_i]->virtuemart_user_id . '&virtuemart_userinfo_id=' . $_addressList[$_i]->virtuemart_userinfo_id, $useXHTTML, $useSSL ). '" class="icon_delete">'.vmText::_('COM_VIRTUEMART_USER_DELETE_ST').'</a></li>';

The bootstrap class icon-delete is mispelled: icon_delete. You can correct this to icon-delete, but this makes the delete "button" for shipment addresses hard to read.

Rewriting the line to something like this makes it more readable:
$_shipTo[] = '&nbsp;&nbsp;<a href="'.JRoute::_ ('index.php?option=com_virtuemart&view=user&task=removeAddressST&virtuemart_user_id[]=' . $_addressList[$_i]->virtuemart_user_id . '&virtuemart_userinfo_id=' . $_addressList[$_i]->virtuemart_userinfo_id, $useXHTTML, $useSSL ). '" >'.'<i class="icon-delete"></i>'.vmText::_('COM_VIRTUEMART_USER_DELETE_ST').'</a></li>';

This is a fix for the moment, but someone with more experience could maybe take out this code and put it into a template instead. Then we would not have to hack the core files.

Any comments are appreciated.

I use VM 3.0.8 but I see also this in shopfunctions.php for VM 3.0.9

regards

Jörgen @ Kreativ Fotografi


Title: Re: Misuse of icon-delete in components/com_virtuemart/helpers/shopfunction.php?
Post by: Milbo on July 02, 2015, 17:29:12 PM
added for testing.
Title: Re: Misuse of icon-delete in components/com_virtuemart/helpers/shopfunction.php?
Post by: Jörgen on July 10, 2015, 13:32:07 PM
Thank You  :)

Jörgen @ Kreativ Fotografi