-
AuthorPosts
-
TomC Moderator
TomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
July 4, 2007 at 1:20 am #121227Hey 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 HEREHere 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 Friendinstantinlaw
- Join date:
- February 2007
- Posts:
- 1646
- Downloads:
- 6
- Uploads:
- 28
- Thanks:
- 68
- Thanked:
- 210 times in 62 posts
July 4, 2007 at 2:04 am #223337Hi 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. 🙂TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
July 4, 2007 at 6:04 am #223357I 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.😀
instantinlaw Friendinstantinlaw
- Join date:
- February 2007
- Posts:
- 1646
- Downloads:
- 6
- Uploads:
- 28
- Thanks:
- 68
- Thanked:
- 210 times in 62 posts
July 4, 2007 at 12:23 pm #223379Hi 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.
<blockquote>
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.
</blockquote>Please read this path carefully to find your english.php
<blockquote>
administrator > components > com_virtuemart > languages > english.php
</blockquote>Anyway, I’m glad you found a solution. 🙂
instantinlaw Friendinstantinlaw
- Join date:
- February 2007
- Posts:
- 1646
- Downloads:
- 6
- Uploads:
- 28
- Thanks:
- 68
- Thanked:
- 210 times in 62 posts
July 4, 2007 at 3:53 pm #223388I was able to confirm my solution and it does indeed work. It’s always better to make edits without having to hack the code.;)
TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
July 4, 2007 at 5:00 pm #223393<em>@instantinlaw 19882 wrote:</em><blockquote>
Please read this path carefully to find your english.php
</blockquote>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 Friendinstantinlaw
- Join date:
- February 2007
- Posts:
- 1646
- Downloads:
- 6
- Uploads:
- 28
- Thanks:
- 68
- Thanked:
- 210 times in 62 posts
July 4, 2007 at 5:04 pm #223395Tom,
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.;)January 28, 2009 at 7:31 am #288574Well, I am using a Ja_Zeolite’s quickstart package to setup the site and I was looking for this variable where I could change the “Show Cart” text.
There is no “english.php” in Administrator > Components > com_virtuemart > languages
How ever there were several folders which had an english.php inside them.
I just used dreamweaver and searched for “Your Cart” in the source code of files inside this languages folder and here it is:site/administrator/components/languages/common/english.php
line 47:[PHP] ‘PHPSHOP_CART_SHOW’ => ‘Show Cart’,[/PHP]Have fun.
September 12, 2011 at 12:35 pm #412146<em>@jayanthsharma 108698 wrote:</em><blockquote>Well, I am using a Ja_Zeolite’s quickstart package to setup the site and I was looking for this variable where I could change the “Show Cart” text.
There is no “english.php” in Administrator > Components > com_virtuemart > languages
How ever there were several folders which had an english.php inside them.
I just used dreamweaver and searched for “Your Cart” in the source code of files inside this languages folder and here it is:site/administrator/components/languages/common/english.php
line 47:[PHP] ‘PHPSHOP_CART_SHOW’ => ‘Show Cart’,[/PHP]Have fun.</blockquote>
The solutions mentioned are not working. This is how you can change it. Go to:
/components/com_virtuemart/themes/name-of-theme/templates/common
Where it says “name-of-theme” you should choose the name of the theme you are using.
Then edit the file minicart.tpl.php. There you can change it (rule 10 till 15).
-
AuthorPosts
This topic contains 9 replies, has 4 voices, and was last updated by robinbenjaweh 13 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum