Post by innuoluke » Thu Jun 23, 2011 11: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.


Newbie

Posts

Joined
Sat Jun 18, 2011 4:36 pm

Post by Qphoria » Fri Jun 24, 2011 12:13 am

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
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by JAY6390 » Fri Jun 24, 2011 12:21 am

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

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Qphoria » Fri Jun 24, 2011 1:43 am

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

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by JAY6390 » Fri Jun 24, 2011 12:47 pm

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

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Qphoria » Fri Jun 24, 2011 8:44 pm

JAY6390 wrote:why make us all suffer ;)
Because that is the communist way!

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 11 guests