Community Forums

OpenCart v1.4.9.4 Released

News, updates and important issues relating to OpenCart.

Re: OpenCart v1.4.9.4 Released

Postby innuoluke » Thu Jun 23, 2011 3:07 pm

khohangmy wrote:Am using OC V1.4.9.4
when i click "add to cart" with 1 quality, but in my shopping cart, its show 2 quality. Could you tell me, how to fix it?


SOVLED:

You need to do the following in order to fix this bug:

- Upgrade jQuery to a version above 1.6 - (Go to http://docs.jquery.com/Downloading_jQuery and download the "minified" version of the "Current Release"). Do not rename the file. Put this file in "catalog/view/javascript/jquery/". There should already be a similar file there e.g. "jquery-1.3.2.min.js".

- Upgrade ajax_add.js - Open catalog/view/javascript/jquery/ajax_add.js in a text editor and change "$('#add_to_cart').removeAttr('onclick');" (line 2?) to "$('#add_to_cart').prop('onclick', null);". Save the changes!

- Edit header.tpl - Open catalog/view/theme/[YOUR THEME]/common/header.tpl in a text editor. Do a search for "javascript/jquery/jquery" and you should find a line that looks like:

Code: Select all
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.3.2.min.js"></script>


change that for:

Code: Select all
<script type="text/javascript" src="catalog/view/javascript/jquery/[VERSION HERE]"></script>


where [VERSION HERE] is the exact name of the file you downloaded from the jQuery website e.g. "jquery-1.6.1.min.js".

- Upload the files we just added / changed to your website (3 files total). It is advisable to backup the original files first (just download them to somewhere else so you have a copy). Make sure the files get uploaded to the right places e.g. "ajax_add.js" and the new version of jQuery go in the folder "catalog/view/javascript/jquery/" and header.tpl goes in "catalog/view/theme/[YOUR THEME]/common/".

That should fix the problem :) The reason for the error is that IE9 appears to ignore jQuery when it says to remove the onclick event, so this does it in a slightly different way which IE9 is able to understand.

I am the lead web developer for Cotswold Web Services, so if you need any other help feel free to give us a call :)

You can think of IE9 as a young toddler trying to cross a road... you have to tell it the same thing in a number of ways before the message sinks in! Unfortunately, IE9 is regularly the cause of road accidents in this analogy!
Web developer for Cotswold Web Services / Innuo Ltd
Need help with your Opencart website? Give us a call to see how we can help.
innuoluke
 
Posts: 11
Joined: Sat Jun 18, 2011 8:36 am

Re: OpenCart v1.4.9.4 Released

Postby Qphoria » Thu Jun 23, 2011 4:13 pm

innuoluke wrote:
khohangmy wrote:Am using OC V1.4.9.4
when i click "add to cart" with 1 quality, but in my shopping cart, its show 2 quality. Could you tell me, how to fix it?


SOVLED:

You need to do the following in order to fix this bug:

- Upgrade jQuery to a version above 1.6 - (Go to http://docs.jquery.com/Downloading_jQuery and download the "minified" version of the "Current Release"). Do not rename the file. Put this file in "catalog/view/javascript/jquery/". There should already be a similar file there e.g. "jquery-1.3.2.min.js".

- Upgrade ajax_add.js - Open catalog/view/javascript/jquery/ajax_add.js in a text editor and change "$('#add_to_cart').removeAttr('onclick');" (line 2?) to "$('#add_to_cart').prop('onclick', null);". Save the changes!

- Edit header.tpl - Open catalog/view/theme/[YOUR THEME]/common/header.tpl in a text editor. Do a search for "javascript/jquery/jquery" and you should find a line that looks like:

Code: Select all
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.3.2.min.js"></script>


change that for:

Code: Select all
<script type="text/javascript" src="catalog/view/javascript/jquery/[VERSION HERE]"></script>


where [VERSION HERE] is the exact name of the file you downloaded from the jQuery website e.g. "jquery-1.6.1.min.js".

- Upload the files we just added / changed to your website (3 files total). It is advisable to backup the original files first (just download them to somewhere else so you have a copy). Make sure the files get uploaded to the right places e.g. "ajax_add.js" and the new version of jQuery go in the folder "catalog/view/javascript/jquery/" and header.tpl goes in "catalog/view/theme/[YOUR THEME]/common/".

That should fix the problem :) The reason for the error is that IE9 appears to ignore jQuery when it says to remove the onclick event, so this does it in a slightly different way which IE9 is able to understand.

I am the lead web developer for Cotswold Web Services, so if you need any other help feel free to give us a call :)

You can think of IE9 as a young toddler trying to cross a road... you have to tell it the same thing in a number of ways before the message sinks in! Unfortunately, IE9 is regularly the cause of road accidents in this analogy!


Oh this is terrible news. Ok I'll make the change for 1.4.9.6
Curse you Microsoft!
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18237
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: OpenCart v1.4.9.4 Released

Postby JAY6390 » Thu Jun 23, 2011 4:21 pm

This would be so much easier if we just use the google cdn for jQuery 8)
ImageImageImage

Better Product SEO URL's - Perfectly structured product links
Better Category SEO URL's - Give subcategories the same SEO keyword
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4639
Joined: Wed May 26, 2010 3:47 pm
Location: United Kingdom

Re: OpenCart v1.4.9.4 Released

Postby Qphoria » Thu Jun 23, 2011 5:43 pm

JAY6390 wrote:This would be so much easier if we just use the google cdn for jQuery 8)


Except for those in china
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18237
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: OpenCart v1.4.9.4 Released

Postby JAY6390 » Fri Jun 24, 2011 4:47 am

For that small number, we can give them instructions on using the same server method...why make us all suffer ;)
ImageImageImage

Better Product SEO URL's - Perfectly structured product links
Better Category SEO URL's - Give subcategories the same SEO keyword
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4639
Joined: Wed May 26, 2010 3:47 pm
Location: United Kingdom

Re: OpenCart v1.4.9.4 Released

Postby Qphoria » Fri Jun 24, 2011 12:44 pm

JAY6390 wrote:why make us all suffer ;)


Because that is the communist way!
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18237
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Previous

Return to News & Announcements

Who is online

Users browsing this forum: No registered users and 45 guests

Hosted by Arvixe Web Hosting