Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Updating jQuery Javacript in OSC 2.3.1 Advice Needed


altoid

Recommended Posts

I was working with themeroller on a 2.3.1 shop and noticed that there were jQuery upgrades available. So I did that taking jQuery from jquery-1.4.2.min.js to jquery-1.6.1.min.js, and upgrading jQuery UI to jquery-ui-1.8.13.min.js. I also modified includes/template_top.php in the shop and admin side accordingly.

 

That worked nicely for themeroller but then I noticed that when I had multiple images in a product, the word "undefined" was showing up right under the selected image. Some googling took me to this post, leading me to modify jquery.bxGallery.1.1.min.js as per acidvertigo's suggestion. That fixed the problem, "undefined" disappeared.

 

But being that I am not a coder, I now wonder if there are other issues that I should watch out for when upgrading those javascripts. Any advice?

 

Thanks

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

The best way to keep the Jquery files updated is instead of downloading the Jquery file and storing it on your server, is to use Google API references and let Google host the file.

 

This accomplishes several things,

 

1. The Jquery is automatically updated without you doing a thing

2. Your site runs faster because Google delivers the file 'compressed' and if a visitor has been to another site that used any of those very common Jquery files, the file on their computer is used and there is no download time.

 

to do this change your Jquery references to this:

<script type="text/javascript" src=" '.(isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://') . 'ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src=" '.(isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://') . 'ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js"></script>

 

I have a more detailed explanation here:

www dot css-oscommerce dot com/cut-page-load-time-in-oscommerce-2-3-osc-to-css/

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

The best way to keep the Jquery files updated is instead of downloading the Jquery file and storing it on your server, is to use Google API references and let Google host the file.

 

 

Thanks for the response. When I change the code to use Google API, I lose the formatting on the objects on the page that have rounded corners. Such as the Cart Contents, Checkout and My Account buttons in the header. Everything else is OK. Any ideas?

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

That should not happen.

 

1. make sure your DOCTYPE in the header is appropriate.

google 'doctype' and you'll get a ton of info on this.

 

2. Go to Google API http://code.google.com/apis/libraries/devguide.html#jqueryUI and get the lastest code for JQuery.

 

You will have to adapt it a bit for the code I posted above, but it should not be anything more than changing numbers. The code above was posted somewhere on the forum by Harold Ponce De Leon, and is an adaptation of the google api reference that prevents the website user from getting the Microsoft 'unsecured items' warning.

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

That should not happen.

 

I will look into the reference links you provided, as well I see there is another post here in the forms dealing with somewhat a similar issue and doctypes.

 

Thanks again

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...