VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: inferenza on December 29, 2011, 12:14:32 PM

Title: Button (Ask a question about this product)
Post by: inferenza on December 29, 2011, 12:14:32 PM
A greeting to all,
I just installed Virtuemart 2.0 on Joomla 1.7, congratulations to the developers, a complete and very well done for free. I would like to report a problem I found in my installation, and this affects the (Ask a question about this product). When pressed, opens a page full screen is not formatted and which does not take into account the template I'm using (developed by YOOtheme). Seeing no other posts by this forum I wonder if I have anything wrong. Unfortunately I do not have much experience programming PHP nor of Virtuemart. I wonder if there is someone who can give guidance on how to delete or hide this button or alternatively help to fix the formatting of the pages of sending the information request.
Thanks in advance
Title: Re: Button (Ask a question about this product)
Post by: PRO on December 29, 2011, 12:48:50 PM
post your url, and are you using joomla 1.5?

Title: Re: Button (Ask a question about this product)
Post by: inferenza on December 29, 2011, 13:20:05 PM
Hi BanquetTables.pro,
I'm using the last version of Joomla, the last version of Virtuemart and the last version of YOOTheme template (Downtown).
Following the link to web site:
http://www.likam.it/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=1&virtuemart_category_id=4
If you push the button (Fai una domanda su questo prodotto) you can see.
Thanks for your answer.
Title: Re: Button (Ask a question about this product)
Post by: PRO on December 29, 2011, 13:46:59 PM
try disabling vmart jquery
Title: Re: Button (Ask a question about this product)
Post by: inferenza on December 29, 2011, 14:12:27 PM
I've tried does not change anything.
Title: Re: Button (Ask a question about this product)
Post by: PRO on December 29, 2011, 14:22:56 PM
enable vmart jquery

then disable the "widget kit" thing and see what happens
Title: Re: Button (Ask a question about this product)
Post by: inferenza on December 29, 2011, 14:41:31 PM
Now the message run but I need the widget.
Do you think that it is better ask the yootheme guys to check the widget ?
Regards
Title: Re: Button (Ask a question about this product)
Post by: PRO on December 29, 2011, 14:47:43 PM
does the module have the ability to turn off jquery?

Title: Re: Button (Ask a question about this product)
Post by: inferenza on December 29, 2011, 14:56:57 PM
The widgetkit use "jquery.plugins.js" that is required from widgetkit and widgetkit doesn't work without it. But if I disable system-widgetkit plugin i can use all. But I don't understand way ?
Title: Re: Button (Ask a question about this product)
Post by: PRO on December 29, 2011, 15:28:00 PM
you cant load 2 different jquery files

Jquery has to be loaded BEFORE

vmsite.js
facebox.js

THE module loads jquery AFTER those other 2 scripts
Title: Re: Button (Ask a question about this product)
Post by: inferenza on December 29, 2011, 15:30:01 PM
I required the support from YOOtheme guys and they say, the problem is that jquery is loaded more than once by the application. They tell me that a solution is to put this code

// load jQuery, if not loaded before
if (!JFactory::getApplication()->get('jquery')) {
   JFactory::getApplication()->set('jquery', true);
   // add jQuery
   ...
}

in virtuemart japplication. Their code has already added this code to prevent such problems.
My problem is that I do not know where to put this code in virtuemart.
Title: Re: Button (Ask a question about this product)
Post by: PRO on December 29, 2011, 16:20:28 PM
com_virtuemart/virtuemart.php

Try removing this

/* Loading jQuery and VM scripts. */
   vmJsApi::jQuery();
Title: Re: Button (Ask a question about this product)
Post by: inferenza on December 29, 2011, 16:32:50 PM
Hi BanquetTables.pro,
many thanks for yuor hepl about :D
I have modified the original code with this and all run well:

   require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'image.php'); //dont remove that file it is actually in every view except the state view
   require(JPATH_VM_SITE.DS.'helpers'.DS.'shopfunctionsf.php'); //dont remove that file it is actually in every view

   /* Loading jQuery and VM scripts. */
// load jQuery, if not loaded before
if (!JFactory::getApplication()->get('jquery')) {
   JFactory::getApplication()->set('jquery', true);
   // add jQuery
      vmJsApi::jQuery();
}

   vmJsApi::jSite();
   vmJsApi::cssSite();

many thanks for your help about.
I think that could be a good idea to add this in the the original code to avoid these problems.