Link to home
Start Free TrialLog in
Avatar of Amanda Watson
Amanda WatsonFlag for Australia

asked on

Cart button isn't working on my site in JOOMLA and Virtuemart

Hi There,
If you go to this site here http://ajitgems.com and add a product to your cart...then continue shopping and try to select "cart" from the top blank panel  the button appears to be inactive.

Can someone help me fix this please?
Avatar of Member_5340450
Member_5340450

Without seeing the module I don't know why it's doing this but the link is jut to:
<a href="#"
Avatar of Amanda Watson

ASKER

Ok so this is a virtuemart shop so where am I to look to fix this
The showcart isn't a module it is part of the template rt_mynxx
no problem not solving by email we wanted to exchange info in order for me to login to the machine to debug. Kind of a rock and hard place situation as reporting back here what the issue turned out to be is no problem and an understandable requirement.
which module and version is producing the blank link?
I don't think it's css or browser related. The link is simply missing an address it should retrieve from server side.
So do I need to change a file somewhere?
which module and version is producing the blank link?
I do have the cart button it just won't go anywhere
See attached of the button I mean
cart.jpg
It's not going anywhere because the server side code that fills in the links "href" element is handing it a / (slash).
Yeah I can see that, I need to know how and where to change it so it goes to cart page
right so what i need to know is, what module is putting that link there,
and what version of that module is it?
sorry i meant which virtuemart module is putting it there.
The mynxx template is built for virtuemart so no module is published for that top position
oh i see what's up here. Remember when I said it didn't make sense that it doesn't appear to be in a module position?

Is this puppy literally part of index.php in the template directory?
YES I think it must be eh
Good post the index.php code surrounding these strings
id="cart-button"
class="cart-button-desc"

The whole thing when put together is this but paste the php, this is just the html
                                                                        <div id="cart-button"><a href="#" class="cart-button-desc">CART (<strong>0</strong> items)</a></div>
                                                                                    </div>

This is the whole index.php from that template here....what did you want me to do with this
<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted index access' );
define( 'YOURBASEPATH', dirname(__FILE__) );
require( YOURBASEPATH.DS."styles.php");
require( YOURBASEPATH.DS."rt_styleswitcher.php");
JHTML::_( 'behavior.mootools' );
global $template_real_width, $leftcolumn_width, $rightcolumn_width, $tstyle, $body_style;
global $js_compatibility, $menu_rows_per_column, $menu_columns, $menu_multicollevel;

$live_site        		= $mainframe->getCfg('live_site');
$template_path 			= $this->baseurl . '/templates/' .  $this->template;
$preset_style 			= $this->params->get("presetStyle", "dark-red");
$frontpage_component    = $this->params->get("enableFrontpage", "show");
$enable_ie6warn         = ($this->params->get("enableIe6warn", 0)  == 0)?"false":"true";
$font_family            = $this->params->get("fontFamily", "mynxx");
$template_width 		= $this->params->get("templateWidth", "959");
$leftcolumn_width		= $this->params->get("leftcolumnWidth", "210");
$rightcolumn_width		= $this->params->get("rightcolumnWidth", "210");
$leftinset_width		= $this->params->get("leftinsetWidth", "180");
$rightinset_width		= $this->params->get("rightinsetWidth", "180");
$splitmenu_col			= $this->params->get("splitmenuCol", "rightcol");
$menu_name 				= $this->params->get("menuName", "mainmenu");
$menu_type 				= $this->params->get("menuType", "moomenu");
$menu_rows_per_column   = $this->params->get("menuRowsPerColumn");
$menu_columns           = $this->params->get("menuColumns");
$menu_multicollevel     = $this->params->get("menuMultiColLevel", 1);
$default_font 			= $this->params->get("defaultFont", "default");
$show_logo		 		= ($this->params->get("showLogo", 1)  == 0)?"false":"true";
$show_logo_slogan		= ($this->params->get("showLogoslogan", 1)  == 0)?"false":"true";
$logo_slogan 			= $this->params->get("logoSlogan", "Apr 09 Design");
$show_bottomlogo		= ($this->params->get("showBottomlogo", 1)  == 0)?"false":"true";
$show_homebutton		= ($this->params->get("showHomebutton", 1)  == 0)?"false":"true";
$show_textsizer		 	= ($this->params->get("showTextsizer", 1)  == 0)?"false":"true";
$show_cart		 		= ($this->params->get("showCart", 1)  == 0)?"false":"true";
$show_fontchanger		= ($this->params->get("showFontchanger", 1)  == 0)?"false":"true";
$show_copyright 		= ($this->params->get("showCopyright", 1)  == 0)?"false":"true";
$js_compatibility	 	= ($this->params->get("jsCompatibility", 0)  == 0)?"false":"true";

// moomenu options
$moo_bgiframe     		= ($this->params->get("moo_bgiframe'","0") == 0)?"false":"true";
$moo_delay       		= $this->params->get("moo_delay", "500");
$moo_duration    		= $this->params->get("moo_duration", "600");
$moo_fps          		= $this->params->get("moo_fps", "200");
$moo_transition   		= $this->params->get("moo_transition", "Sine.easeOut");

$moo_bg_enabled			= ($this->params->get("moo_bg_enabled","1") == 0)?"false":"true";
$moo_bg_over_duration		= $this->params->get("moo_bg_over_duration", "500");
$moo_bg_over_transition		= $this->params->get("moo_bg_over_transition", "Expo.easeOut");
$moo_bg_out_duration		= $this->params->get("moo_bg_out_duration", "600");
$moo_bg_out_transition		= $this->params->get("moo_bg_out_transition", "Sine.easeOut");

$moo_sub_enabled		= ($this->params->get("moo_sub_enabled","1") == 0)?"false":"true";
$moo_sub_opacity		= $this->params->get("moo_sub_opacity","0.95");
$moo_sub_over_duration		= $this->params->get("moo_sub_over_duration", "50");
$moo_sub_over_transition	= $this->params->get("moo_sub_over_transition", "Expo.easeOut");
$moo_sub_out_duration		= $this->params->get("moo_sub_out_duration", "600");
$moo_sub_out_transition		= $this->params->get("moo_sub_out_transition", "Sine.easeIn");
$moo_sub_offsets_top		= $this->params->get("moo_sub_offsets_top", "0");
$moo_sub_offsets_right		= $this->params->get("moo_sub_offsets_right", "1");
$moo_sub_offsets_bottom		= $this->params->get("moo_sub_offsets_bottom", "0");
$moo_sub_offsets_left		= $this->params->get("moo_sub_offsets_left", "1");
								
require(YOURBASEPATH . "/rt_styleloader.php");

// these must come below because the styles can be overloaded
$body_style       = $this->params->get("bodyStyle", "dark");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >

	<head>
		<jdoc:include type="head" />
		<?php
		require(YOURBASEPATH . DS . "rt_utils.php");
		require(YOURBASEPATH . DS . "rt_head_includes.php");
	?>

	</head>
<style>
span {padding:4px}
</style>
	<body id="ff-<?php echo $fontfamily; ?>" class="<?php echo $fontstyle; ?> <?php echo $tstyle; ?> <?php echo $body_style; ?> iehandle">
		<div id="page-bg">
<!--Top Area Start-->
<div class="top">
	<div class="int">
		<div class="logo">	<a href="<?php echo $this->baseurl;?>"><img src="<?php echo $this->baseurl;?>/templates/<?php echo $this->template ?>/images/logo.jpg" alt="<?php echo $mainframe->getCfg('sitename');?>"  /></a></div>
		<div class="mainmenu">
		<?php if($this->countModules('mainmenu')) : ?>
			<jdoc:include type="modules" name="mainmenu" style="raw" />
		<?php endif; ?> 		
		</div>
	</div>
</div>
<!--Begin Header-->
			<div id="header">
				<div class="wrapper">
					
				</div>
			</div>
			<!--End Header-->
			

			<div class="wrapper">
				<div id="main-body">
					<div id="topbar">
						<div id="topbar2">
							<div id="topbar3">
							<?php if ($show_homebutton=="true") : ?>
							<div id="home-button"><a href="<?php echo $this->baseurl; ?>" class="home-button-desc"><?php echo JText::_('HOME'); ?></a></div>
							<?php else : ?>
							<div id="newsflash-mod"><jdoc:include type="modules" name="newsflash" style="none" /></div>
							<?php endif; ?>
							<?php if ($show_textsizer=="true") : ?>
							<div id="accessibility">
								<div id="buttons">
									<a href="<?php echo JROUTE::_($thisurl . "fontstyle=f-larger"); ?>" title="<?php echo JText::_('INC_FONT_SIZE'); ?>" class="large"><span class="button">&nbsp;</span></a>
									<a href="<?php echo JROUTE::_($thisurl . "fontstyle=f-smaller"); ?>" title="<?php echo JText::_('DEC_FONT_SIZE'); ?>" class="small"><span class="button">&nbsp;</span></a>
								</div>
								<div class="textsizer-desc"><?php echo JText::_('TEXT_SIZE'); ?></div>
							</div>
							<?php endif; ?>
							<?php if ($show_fontchanger=="true") : ?>
							<div id="font-style-button">
								<a href="#" title="<?php echo JText::_('FONT_STYLE'); ?>" class="font-style"><?php echo JText::_('FONT_STYLE'); ?></a>
							</div>
							<?php endif; ?>
							<?php if ($this->countModules('login')) : ?>
								<?php if ($user->guest) : ?>
								<div id="login-button"><a href="#" class="login-button-desc"><span><?php echo JText::_('LOGIN'); ?></span></a></div>
								<?php else : ?>
								<div id="login-button"><a href="#" class="login-button-desc2"><span><?php echo JText::_('LOGOUT'); ?></span></a></div>
								<?php endif; ?>
							<?php endif; ?>
							<?php if ($show_cart=="true") : ?>
							<?php
								if (isset($_SESSION['cart'])) $cart = $_SESSION['cart'];
								$total = 0;
								if (isset($cart)) {
									foreach($cart as $key => $item) {
										$total += $item['quantity'];
									}
								};
								if ($total > 0) $totalString = '(<strong>'.$total.'</strong> items)';
								else $totalString = "(<strong>0</strong> items)"; 
								if ($total > 0) $cart = "-full";
								else $cart = "";
							?>
							<div id="cart-button"><a href="#" class="cart-button-desc<?php echo $cart;?>"><?php echo JText::_('CART').' '.$totalString; ?></a></div>
							<?php endif; ?>
							</div>
						</div>
					</div>
					<div id="main-body-surround">
						<div id="cart-panel-surround" class="png">
							<div id="cart-panel" class="png"></div>
						</div>
						<div id="font-panel-surround" class="png">
							<div id="font-panel" class="png">
								<div class="left">
									<a href="#" class="mynxx" title="ff-mynxx"><span>Mynxx</span></a>
									<a href="#" class="optima" title="ff-optima"><span>Optima</span></a>
									<a href="#" class="geneva" title="ff-geneva"><span>Geneva</span></a>
									<a href="#" class="helvetica" title="ff-helvetica"><span>Helvetica</span></a>
								</div>
								<div class="right">
									<a href="#" class="lucida" title="ff-lucida"><span>Lucida</span></a>
									<a href="#" class="georgia" title="ff-georgia"><span>Georgia</span></a>
									<a href="#" class="trebuchet" title="ff-trebuchet"><span>Trebuchet</span></a>
									<a href="#" class="palatino" title="ff-palatino"><span>Palatino</span></a>
								</div>
								<div class="clr"></div>
							</div>
						</div>
						<?php if ($this->countModules('login')) : ?>
							<div id="login-panel-surround" class="png">
								<div id="login-panel" class="png">
									<div id="login-module">
										<jdoc:include type="modules" name="login" style="xhtml" />
									</div>
								</div>
							</div>
						<?php endif; ?>
						<!--Begin Showcase-->
						<?php $mClasses = modulesClasses('case5'); if ($this->countModules('showcase') or $this->countModules('showcase2') or $this->countModules('showcase3') or $this->countModules('scroller')) : ?>
						<div class="showcase-surround">
							<div class="show-br"></div>
							<div id="showcase">
								<div id="showcase2">
									<div id="showmodules" class="spacer<?php echo $showmod_width; ?>">
										<?php if ($this->countModules('showcase')) : ?>
										<div class="block <?php echo $mClasses['showcase'][0]; ?>">
											<jdoc:include type="modules" name="showcase" style="main" />
										</div>
										<?php endif; ?>
										<?php if ($this->countModules('showcase2')) : ?>
										<div class="block <?php echo $mClasses['showcase2'][0]; ?>">
											<jdoc:include type="modules" name="showcase2" style="main" />
										</div>
										<?php endif; ?>
										<?php if ($this->countModules('showcase3')) : ?>
										<div class="block <?php echo $mClasses['showcase3'][0]; ?>">
											<jdoc:include type="modules" name="showcase3" style="main" />
										</div>
										<?php endif; ?>
									</div>
									<jdoc:include type="modules" name="scroller" style="scroller" />
								</div>
							</div>
							<div class="show-bl"></div>
						</div>
						<?php endif; ?>
						<!--End Showcase-->
						<div class="sec-div"></div>
						<!--Begin Main Content Block-->
						<div id="main-content-surround">
						<div id="main-content" class="<?php echo $col_mode; ?>">
						    <div class="colmask leftmenu">
						        <div class="colmid">
    					    	    <div class="colright">
        						        <!--Begin col1wrap -->    
            						    <div class="col1wrap">
            						        <div class="col1pad">
            						            <div class="col1">
                    						        <div id="maincol2">
                    									<div class="maincol2-padding">
                    									<?php $mClasses = modulesClasses('case1'); if ($this->countModules('user1') or $this->countModules('user2') or $this->countModules('user3')) : ?>
                    									<div id="mainmodules" class="spacer<?php echo $mainmod_width; ?>">
                    										<?php if ($this->countModules('user1')) : ?>
                    										<div class="block <?php echo $mClasses['user1'][0]; ?>">
                    											<jdoc:include type="modules" name="user1" style="main" />
                    										</div>
                    										<?php endif; ?>
                    										<?php if ($this->countModules('user2')) : ?>
                    										<div class="block <?php echo $mClasses['user2'][0]; ?>">
                    											<jdoc:include type="modules" name="user2" style="main" />
                    										</div>
                    										<?php endif; ?>
                    										<?php if ($this->countModules('user3')) : ?>
                    										<div class="block <?php echo $mClasses['user3'][0]; ?>">
                    											<jdoc:include type="modules" name="user3" style="main" />
                    										</div>
                    										<?php endif; ?>
                    									</div>
                    									<?php endif; ?>
                    									<?php if ($this->countModules('breadcrumb')) : ?>
                    									<div id="breadcrumbs">
                    										<jdoc:include type="modules" name="breadcrumb" style="xhtml" />
                    										<div class="spinner"></div>
                    									</div>
                    									<?php endif; ?>
                    									<div>
                    										<?php if ($this->countModules('inset2') and !$editmode) : ?>
                    										<div id="inset-block-right"><div class="right-padding">
                    											<jdoc:include type="modules" name="inset2" style="inset" />
                    										</div></div>
                    										<?php endif; ?>
                    										<?php if ($this->countModules('inset') and !$editmode) : ?>
                    										<div id="inset-block-left"><div class="left-padding">
                    											<jdoc:include type="modules" name="inset" style="inset" />
                    										</div></div>
                    										<?php endif; ?>
                    										<div id="maincontent-block">
                												<jdoc:include type="message" />
                												<?php if (!($frontpage_component == 'hide' and JRequest::getVar('view') == 'frontpage')): ?>
                												<jdoc:include type="component" />
                												<?php endif; ?>
                    										</div>
                    										</div>
                    										<div class="clr"></div>
                        									<?php $mClasses = modulesClasses('case2'); if ($this->countModules('user4') or $this->countModules('user5') or $this->countModules('user6')) : ?>
                        									<div id="mainmodules2" class="spacer<?php echo $mainmod2_width; ?>">
                        										<?php if ($this->countModules('user4')) : ?>
                        										<div class="block <?php echo $mClasses['user4'][0]; ?>">
                        											<jdoc:include type="modules" name="user4" style="main" />
                        										</div>
                        										<?php endif; ?>
                        										<?php if ($this->countModules('user5')) : ?>
                        										<div class="block <?php echo $mClasses['user5'][0]; ?>">
                        											<jdoc:include type="modules" name="user5" style="main" />
                        										</div>
                        										<?php endif; ?>
                        										<?php if ($this->countModules('user6')) : ?>
                        										<div class="block <?php echo $mClasses['user6'][0]; ?>">
                        											<jdoc:include type="modules" name="user6" style="main" />
                        										</div>
                        										<?php endif; ?>
                        									</div>
                        									<?php endif; ?>
                    									</div>
                    								</div>    
                    							</div>
            						        </div>
            						    </div>
            						    <!--End col1wrap -->
           						        <!--Begin col2 -->
           						        <?php if ($leftcolumn_width != 0) : ?>
            						    <div class="col2">
                							<div id="leftcol">
                                                <div id="leftcol-bg">
                  									<?php if ($this->countModules('search-left')) : ?>
                									<jdoc:include type="modules" name="search-left" style="search" />
                									<?php endif; ?>
                									<?php if ($subnav and $splitmenu_col=="leftcol") : ?>
                									<div class="sidenav-block">
                										<?php echo $subnav; ?>
                									</div>
                									<?php endif; ?>
                									<jdoc:include type="modules" name="left" style="sidebar" />
                									<?php if (!isset($active)) :?>
        											<jdoc:include type="modules" name="inactive" style="sidebar" />    
        											<?php endif; ?>
                                                </div>
                							</div>
            						    </div>
            						    <?php endif; ?> 
            						    <!---End col2 -->
            						    <!--Begin col3 -->
            						    <?php if ($rightcolumn_width != 0) : ?>
            						    <div class="col3">
                							<div id="rightcol">
												<?php if ($this->countModules('search-right')) : ?>
            									<jdoc:include type="modules" name="search-right" style="search" />
            									<?php endif; ?>
           										<?php if ($subnav and $splitmenu_col=="rightcol") : ?>
            									<div class="sidenav-block">
            										<?php echo $subnav; ?>
            									</div>
            									<?php endif; ?>
            									<jdoc:include type="modules" name="right" style="sidebar" />
                							</div>
            						    </div>
            						    <?php endif; ?> 
            						    <!--End col3-->
        							</div>
    							</div>
							</div>
						</div>
						<div class="corner" id="bl"></div>
						<div class="corner" id="br"></div>
						<div class="corner" id="tl"></div>
						<div class="corner" id="tr"></div>
						</div>
						<!--End Main Content Block-->
					</div>
					<!--Begin Bottom Main Modules-->
					<?php $mClasses = modulesClasses('case3'); if ($this->countModules('user7') or $this->countModules('user8') or $this->countModules('user9')) : ?>
					<div class="sec-div"></div>
					<div id="bottom-main">
							<div id="bottom-main2">
							<div id="mainmodules3" class="spacer<?php echo $mainmod3_width; ?>">
								<?php if ($this->countModules('user7')) : ?>
								<div class="block <?php echo $mClasses['user7'][0]; ?>">
									<jdoc:include type="modules" name="user7" style="main" />
								</div>
								<?php endif; ?>
								<?php if ($this->countModules('user8')) : ?>
								<div class="block <?php echo $mClasses['user8'][0]; ?>">
									<jdoc:include type="modules" name="user8" style="main" />
								</div>
								<?php endif; ?>
								<?php if ($this->countModules('user9')) : ?>
								<div class="block <?php echo $mClasses['user9'][0]; ?>">
									<jdoc:include type="modules" name="user9" style="main" />
								</div>
								<?php endif; ?>
							</div>
						</div>
						<div class="bottom-bl"></div>
						<div class="bottom-br"></div>
						<div class="bottom-tl"></div>
						<div class="bottom-tr"></div>
					</div>
					<?php endif; ?>
					<!--End Bottom Main Modules-->
					
				</div>
			</div>
		</div>
		<?php if ($this->countModules('popup')) : ?>
		<div id="popup">
			<jdoc:include type="modules" name="popup" style="xhtml" />
		</div>
		<?php endif; ?>
		<?php if ($this->countModules('debug')) : ?>
		<div id="debug-mod">
			<jdoc:include type="modules" name="debug" style="none" />
		</div>
		<?php endif; ?>
	</body>
</html>

Open in new window

So I see this here
<div id="cart-button"><a href="#" class="cart-button-desc<?php echo $cart;?>"><?php echo JText::_('CART').' '.$totalString; ?></a></div>


what do I need to put in the place of the # ?
ASKER CERTIFIED SOLUTION
Avatar of Member_5340450
Member_5340450

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks mate
:-) worthy of a hi-5. Good team work.
I have the exact same problem and I am also using the Mnyxx Template with Joomla but the code that was provided does not work.

How does one find the location of the page that the cart link is supposed to open?

I am using Joomla Version 1.5.19  and  rt_mynxx_j15

www.andersenstudio.com
So you changed the index.php page as described above?

By the way are you using Ajax in a MAC...there could be a conflict here and you may need to change your configuration in virtuemart to not use ajax
What does it mean that I am using Ajax in a MAC?

The shopping cart was up and running for a long time and I don't know what made it suddenly non-responsive.

I did have a third party SEO company do some work on my site but I don't think that corresponds to the change.

Do I go to the site settings to look for the place to turn Ajax on and off? That is where I am going to look for it.

I googled "usng Ajex in a Mac" and it appears that Mac means Mackintosh. I am not using a Mackintosh system . I don't know where you got that from.
In answer to your first question- I did change the Index,php in the Mynex Template as described above but it did not solve the problem.
I mentioned the Mac because I had a problem with Mac users in the past with the ADD TO CART button not working, if AJAX was being used for the cart which you can check in your configuration settings of virtuemart.

Are you using sh404SEF urls?  This may also be causing a conflict.

I would open up a new thread to see if you can get some fresh suggestions here also
I am not using those links. I just started using InfusionSoft which has links that adds keywords but that is through the email , not the website.

Are sh404SEF urls the same thing?

I'll open a new tread about the shopping cart.
sh404SEF is a component that you install on your site to help make your URLS look like this

http://www.yourdomain.com/shop-categories

instead of this http://www.latinocellar.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=87&category_id=2&option=com_virtuemart&Itemid=62

for example.

You can see if its installed by checking your components in the backend

I tried the code again- making sure that I was placing in in the index.php that is located in the Mynxx Template

It worked!