PDA

View Full Version : Removing "Show Cart" from VirtueMart "Your Cart" Module ???


tcraw1010
07-04-2007, 01:20 AM
Hey All:

The only reason I'm posting this question here is because I'm getting absolutely no help over at the VirtueMart Forum . . .

How can I remove the "Show Cart" text/link from the "Your Cart" module that displays on the Home Page?
For reference, my work-in-progress site is HERE (http://www.musicians-marketplace.com/index.php)


Here is the code from mod_virtuemart_cart.php file . . .


?><table width="100%">
<tr>
<td>
<a class="mainlevel" href="<?php echo $sess->url($mm_action_url."index.php?page=shop.cart")?>">
<?php echo $VM_LANG->_PHPSHOP_CART_SHOW ?></a>
</td>
</tr>
<tr>
<td><?php include (PAGEPATH.'shop.basket_short.php') ?></td>
</tr>
</table>



Now, when I inspect the code for that particular module in FireFox, I see this . . .


<div class="moduletable">
<h3> Your Shopping Cart </h3>
<table width="100%">
<tbody>
<tr>
<td>
<a class="mainlevel" href="http://www.musicians-marketplace.com/index.php?page=shop.cart&option=com_virtuemart&Itemid=26"> Show Cart</a>
</td>
</tr>
<tr>
</tr>
</tbody>
</table>
</div>


I have been looking for days and I cannot find the line of code to modify the module so I can remove the "Show Cart" text/link.


PLEASE HELP !!!

:((


TOM


P.S. (What I would REALLY like to do is put the shopping cart info at the top, just under the top navigation text links. There is already a "View Cart" link, so a simple one like "Your Cart Is Empty" and "You Have "x" Items" right underneath would be nice).

instantinlaw
07-04-2007, 02:04 AM
Hi Tom,
I am using the Joomlart mod of the cart so I can't confirm this, but it should do the trick.
Try this
On line 57 in administrator > components > com_virtuemart > languages > english.php
change
var $_PHPSHOP_CART_SHOW = 'Show Cart';
to
var $_PHPSHOP_CART_SHOW = '';
or whatever you want it to say.
Good luck. :)

tcraw1010
07-04-2007, 06:04 AM
I actually don't want it to say anything ... I want the "Show Cart" text to be gone altogether.
So, if I remove that line altogether, do you think it will mess things up?

EDIT:
I just looked and I actually don't have a "language" file in my com_virtuemart files.
It's got to be somewhere else .... hmmmm.


EDIT #2
Okay, I just figured it out . . . I had to remove <?php echo $VM_LANG->_PHPSHOP_CART_SHOW ?> from the code I posted above.

I had been hesitant to do this because it seemed as though it was only one of a few lines of code, and I didn't want to totally screw up some function. Well, turns out that the only function that one line of code deals with is the one I wanted to get rid of anyway.

Actually, Bill's suggestion above was part of the clue ... since the code is somewhat similar to the one he suggested.
So, again, it all works out in the end.

:D

instantinlaw
07-04-2007, 12:23 PM
Hi Tom,

If you just removed the text Show Cart as shown above in the example I gave you in the english.php and left the rest of the code it should have acomplished what you wanted to do without hacking the code.

Here is a tip for you. Most of the text you see in the components output is set in the english.php file. It is safe to remove any text between the ' ' marks. The same goes for most components.


I just looked and I actually don't have a "language" file in my com_virtuemart files.
It's got to be somewhere else .... hmmmm.


Please read this path carefully to find your english.php


administrator > components > com_virtuemart > languages > english.php


Anyway, I'm glad you found a solution. :)

instantinlaw
07-04-2007, 03:53 PM
I was able to confirm my solution and it does indeed work. It's always better to make edits without having to hack the code.;)

tcraw1010
07-04-2007, 05:00 PM
Please read this path carefully to find your english.php


That's just it ... I don't have either a "language" folder or (subsequently) an "english.php" file.
I looked several times - just to make sure I'm not crazy.

Isn't it supposed to be a normal virtuemart component? I know I didn't delete it.

Can I download the folder separately and install it into my VirtueMart component?


:((

instantinlaw
07-04-2007, 05:04 PM
Tom,
If you had the words Show Cart showing in the module, you have an english.php. I don't think you are following my path to the file correctly. The english.php is not in the components > com_virtuemart folder. It is in the administrator > components > com_virtuemart > languages folder.
Take another look friend.;)