News:

Support the VirtueMart project and become a member

Main Menu

VM2 "How to add a logo into empty cart module?"

Started by jpreskitt, February 13, 2012, 04:09:54 AM

Previous topic - Next topic

jpreskitt

I'm on VM 2.0.1, J2.5 and I'm wondering how to add an image into the cart, similarly to the Virtuemart.net demo:
http://demo.virtuemart.net/index.php?option=com_virtuemart&page=shop.browse&category_id=8&Itemid=16&vmcchk=1&Itemid=16

I think VM1.5 had a default image, which I was able to customize to show an image when the cart module was empty, but then would just show contents when items added to it. Example of that working successfully in VM1.5 here:
http://www.unbiasedclothing.com/index.php

If anyone out there knows how to basically do this in VM 2 (adding an image to the VM shopping cart module when it's empty, I'd really appreciate it!
Thanks in advance!
John

__
VM 2.0.1
Joomla 2.5


jpreskitt

any Virtuemart developers? BanquetTables? or Milbo?
The question above is in regards to the actual Virtuemart website:
http://demo.virtuemart.net/index.php?option=com_virtuemart&page=shop.browse&category_id=8&Itemid=16&vmcchk=1&Itemid=16

just trying to find where to add an "empty cart" image...
any suggestions or guesses would help.
thanks,
John

Cynthia_

#2
I am also interested to know how to add a cart image to the cart module.

PRO

You could do a language override for the text "your cart is empty"
http://forum.virtuemart.net/index.php?board=129.0

And add the img src code right in the language file.

OR,
The template is
mod_virtuemart_cart/tmpl/default

ITS going to be easier to do it via the language file though.

jpreskitt

Thanks Banquet,
Perhaps my html isn't what it used to be. I'm currently trying all sorts of img source lines and i'm not getting an image in place of the language override. my text in my en-GB.override.ini file is:

; Virtuemart! Project
; Copyright (C)  2011 Virtuemart Team. All rights reserved.
; License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 - No BOM
;
COM_VIRTUEMART_EMPTY_CART="<img src="../../images/stories/New_UN_Crest-175px.png"/>"


Is Joomla 2.5 capable of this? just can't seem to get the image to show up. Here's the url of my site:
http://65.60.49.130/~johnpre1/unbiasedclothing_j2-5/

Thanks in advance!
John

PRO

Quote from: jpreskitt on March 04, 2012, 21:27:20 PM
Thanks Banquet,
Perhaps my html isn't what it used to be. I'm currently trying all sorts of img source lines and i'm not getting an image in place of the language override. my text in my en-GB.override.ini file is:

; Virtuemart! Project
; Copyright (C)  2011 Virtuemart Team. All rights reserved.
; License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 - No BOM
;
COM_VIRTUEMART_EMPTY_CART="<img src="../../images/stories/New_UN_Crest-175px.png"/>"


Is Joomla 2.5 capable of this? just can't seem to get the image to show up. Here's the url of my site:
http://65.60.49.130/~johnpre1/unbiasedclothing_j2-5/

Thanks in advance!
John

http://www.w3schools.com/tags/tag_img.asp

try coding the full url and see what happens.


jpreskitt

#6
Wow! thanks for the fast response.
Basically my temp site is located at: http://65.60.49.130/~johnpre1/unbiasedclothing_j2-5/index.php
and for some reason the language overrides don't like this url. Possible the numbers or the "~" symbol.
When i add an absolute image path from another all-letters url, it works, even links to the image behave in the same way.
So when i go live, the url will be all letters and it will work, but in the meantime you helped me figure it out. Thanks a ton!
John

http://65.60.49.130/~johnpre1/unbiasedclothing_j2-5/index.php

oxygen_uk

you need to edit.

modules/mod_virtuemart_cart/mod_virtuemart_cart.php

on line 41 - instead of      else $data->totalProductTxt = JText::_('COM_VIRTUEMART_EMPTY_CART');       

replace with   else $data->totalProductTxt =  ("<IMG SRC=images/basket/empty.png width=80px height=80px>");

create a folder called images and put your picture there.

happy days:))

PRO

Quote from: oxygen_uk on June 09, 2012, 16:18:06 PM
you need to edit.

modules/mod_virtuemart_cart/mod_virtuemart_cart.php

on line 41 - instead of      else $data->totalProductTxt = JText::_('COM_VIRTUEMART_EMPTY_CART');       

replace with   else $data->totalProductTxt =  ("<IMG SRC=images/basket/empty.png width=80px height=80px>");

create a folder called images and put your picture there.

happy days:))


wrong way to do it, when you update it will be overwritten


Da_Hobit

the correct syntax to use in 'Language override':

COM_VIRTUEMART_EMPTY_CART="<div style="float:left"><img src="/images/cart.png" /></div>Uw winkelwagen is momenteel leeg."

RogierBR

Which image folder are you using. I can find about 10 image folders. Tried all of them with the image I want to use for bakcground of my cart. The right folder is probably the 11th ;D

PRO

Quote from: RogierBR on July 16, 2012, 22:17:27 PM
Which image folder are you using. I can find about 10 image folders. Tried all of them with the image I want to use for bakcground of my cart. The right folder is probably the 11th ;D

whichever you want, but the path has to be specified in your code