VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: wembley2000 on April 19, 2012, 01:16:45 AM

Title: 'Contact for Price' & 'Ask question about product' problems with links
Post by: wembley2000 on April 19, 2012, 01:16:45 AM
Hi there

I am currently developing a website www.igualdadenaccion.com where we have not yet added pricing and wish visitors to contact us via the links on the product details page.  However when I click the 'contact for price' link next to where the price should be displayed, it takes me back to the 'home page'.  Also, the 'ask a question about a prodeuct' link opens in a new page, rather than the 'sandbox' view, which does look more professional than what it currently does.

I know this used to work, but it has stopped working.

I also enabled the option to allow anyone to make recommendations but cannot find the button anywhere on the site once I tick this option in configuration.

Can anyone help and point me out what has gone wrong with VM 2.0.6 as I know this used to work?

Kind regards in advance.
Title: Re: 'Contact for Price' & 'Ask question about product' problems with links
Post by: jenkinhill on April 19, 2012, 12:56:52 PM
You have a problem because you are loading two versions of jQuery, once for VM and once more for your Joomla template. . You can probably just turn off jQuery loading in VM.   http://dev.virtuemart.net/projects/virtuemart/wiki/General_JS-Problems_with_templates_and_jQuery

If you still have a link issue with Solicitar precio you could try editing the class link in default_showprices.php to change

<a class="ask-a-question bold" href="<?php echo $url ?>" ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?></a>

to

<a class="ask-a-question" href="<?php echo $url ?>" ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?></a>

Not sure if this will work, though.

Something else, test your Joomla template when the browser window size is narrowed - the layout breaks, especially in Firefox.
Title: Re: 'Contact for Price' & 'Ask question about product' problems with links
Post by: wembley2000 on April 19, 2012, 16:07:59 PM
Hi there

I tried what you asked and nothing happened, it had on effect.

I think there is something wrong with VM 2.0.6 because it worked prior to installing this version.

Thanks for the tip.  I have redesigned my template to a 1280 fixed width now, which has made a difference, but created another issue with another module for 'news' i.e. space on the page.

Kind regards
Title: Re: 'Contact for Price' & 'Ask question about product' problems with links
Post by: jenkinhill on April 19, 2012, 20:58:31 PM
VM2.0.6 on Joomla 2.5.4 works fine for me for those links on 4 different test installations. Your issue is certainly a JavaScript conflict, spotting where can take quite a bit of detev=ctive work.
Title: Re: 'Contact for Price' & 'Ask question about product' problems with links
Post by: wembley2000 on April 19, 2012, 21:19:38 PM
Oh dear, this is not what I wanted to hear :(

How am I supposed to diagnose which version of jQuery is running, or even disable multiple jQuery?

Regards
Title: Re: 'Contact for Price' & 'Ask question about product' problems with links
Post by: jenkinhill on April 20, 2012, 10:23:04 AM
Just look at the page code to see what is loading - and use Firebug, developer tools or similar. For tools to use see http://www.jquery4u.com/javascript/10-javascript-online-browser-based-debugging-tools/

Tutorial on debugging here:  http://www.webmonkey.com/2010/02/javascript_debugging_for_beginners/

You are loading jQuery here:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
and here:
<script src="http://www.igualdadenaccion.com//components/com_fss/assets/js/jquery.1.6.2.min.js" type="text/javascript"></script>
and here:
<script type="text/javascript" src="/templates/igualdadenaccion/jquery.js"></script>
Title: Re: 'Contact for Price' & 'Ask question about product' problems with links
Post by: wembley2000 on April 21, 2012, 00:02:42 AM
Hi there

Thank you very much for your advice; it certainly helped and solved the problem.

What solved it was, removing the Freestyle-Joomla Announcements module from any Virtuemart pages.

The system now works just fine.

Kind regards and thanks once again.