LOADING JQUERY MULTIPLE TIMES

  • Posts: 188
  • Thank you received: 0
12 years 8 months ago #42133

Hi Nic, I have a little problem here , us.miicards.com/business-cards/silk-card...silk-business-cards- , went change the quantity the application below not work , I think has something to do with LOADING JQUERY MULTIPLE TIMES , the template developer said this :

HOW TO PREVENT LOADING JQUERY MULTIPLE TIMES?

There is an ongoing discussion in the Joomla community on how to prevent loading jQuery multiple times across extensions. We have already taken steps and measures by implementing a widely accepted solution. We register through JApplication whether jQuery is loaded or not. In case a 3rd party extension loads the jQuery library you can use the following code snippet to prevent our ZOO extension, Widgetkit or Warp theme from loading it twice:

// load jQuery, if not loaded before
if (!JFactory::getApplication()->get('jquery')) {
JFactory::getApplication()->set('jquery', true);
// add jQuery
...
}
You can also get in touch with the 3rd party extension developer and kindly ask them to implement this.


Thanks so much for your help.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 8 months ago #42134

The only place where jquery is loaded by HikaShop is when you use a filter of the type "slider".
Otherwise, HikaShop does not use it. And no one reported any problems with it so far.

The solution we recommend when you have such problems is to install and enable the jquery easy plugin. It should sort out any jquery incompatibility problem and it's really easy to do.

Please Log in or Create an account to join the conversation.

  • Posts: 188
  • Thank you received: 0
12 years 8 months ago #42135

Thanks men, I install that but still give me the same thing, only happens went change the product options, ummm any other idea ?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 8 months ago #42137

The quantity change works fine for me on that page now.

Please Log in or Create an account to join the conversation.

  • Posts: 188
  • Thank you received: 0
12 years 8 months ago #42139

Yes I know that works great , is the below application , that work application works good if you dont change the product options , but after you change any option the application stop working.

thanks so much

Please Log in or Create an account to join the conversation.

  • Posts: 188
  • Thank you received: 0
12 years 8 months ago #42140

Nic I just got answer from the template people and they said this , ( if have something todo with hika ? )

Some extension is loading jQuery from Google CDN,

ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js

Please Log in or Create an account to join the conversation.

  • Posts: 188
  • Thank you received: 0
12 years 8 months ago #42145

Nic, I discover something , here I just use options and work find , us.miicards.com/designs/business-cards-t...gn-for-your-card-102

in the other product I use characteristics and not works , thanks for your help.

Please Log in or Create an account to join the conversation.

  • Posts: 188
  • Thank you received: 0
12 years 8 months ago #42160

Nic , the template people said:

Did you show them how to load jQuery conditionally by pointing them to the Tutorial /

[url=http://]http://www.yootheme.com/themes/documentation/troubleshooting/javascript-errors[/url]

thanks so much ,

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 8 months ago #42161

Again, HikaShop does NOT load jQuery AT ALL. So the suggestions from yootheme are moot.
This does not concerns HikaShop. The fact that some JS process in HikaShop doesn't working properly is the result of an error generated by something else on your website using jQuery.


I checked again your first link and I think I understand now what does not work. It's your tabbed content in the product description. It has nothing to do with jQuery or the template.
That's because when you change a characteristic, the description is changed on the page. But since the JS of the tabs is only done when the page is loaded the tabs don't work after that.
So the solution is simple. Edit the file "show" of the view "product" via the menu Display->Views and remove the code:

<div id="hikashop_product_description_<?php echo $variant_name;?>" style="display:none;">
				<?php echo JHTML::_('content.prepare',preg_replace('#<hr *id="system-readmore" */>#i','',$variant->product_description));?>
			</div>
Then it will work.

Please Log in or Create an account to join the conversation.

  • Posts: 188
  • Thank you received: 0
12 years 8 months ago #42165

wow, you the men, work fantastic, the best app for joomla , I wish you the best of best ,

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum