Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Updating Oscommerce From Php 4.x To 5.x (template Monster Template)


Bvrettski

Recommended Posts

MY client has a template purchased from Template Monster which was apparently compatible with php 4.x. The hosting company has upgraded their php to 5.x and not his site is having problems.

 

TM's support has not been much help as they do not guarantee compatibility.

 

I tried a fresh install of the template and it went fine until I tried to enter the administration page.

 

Has anyone run into this problem? Is there a way to manual update the older install?

 

Thanks for any help.

 

Brett

Link to comment
Share on other sites

Download the latest osC package and compare the files. You'll enjoy the experience of seeing what a mess the template code is. All the recent updates are listed in the package.

Link to comment
Share on other sites

Not sure that helps.

 

I was looking more for a way to upgrade the existing package.

Can you just do a replacement of all the existing files but I dont know if that even possible or results in a functional site.

Link to comment
Share on other sites

Is there a way to manual update the older install?

 

 

 

Download the latest osC package and compare the files.

 

 

All the recent updates are listed in the package.

 

In what respect does that not help?

 

 

 

And what does the very last entry tell you to do?

 

If your store is completely unmodified, you can just overwrite with the new files. A template is heavily modded - in the root files at least - so you need to compare. Actually, most of the changes are in the core files so you may be able to overwrite those but you still need to compare to see that.

Link to comment
Share on other sites

I tried that method using the osc4.zip contribution. After installing the original template and replacing the files I got the same error message as before.

 

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in /home/lincoln6/public_html/lincolnlogsstore/includes/functions/database.php on line 18

Unable to connect to database server!

 

I have created new databases but am unable to proceed with any of the installation

Link to comment
Share on other sites

The reason I said "Not sure that helps. " was becasue I'm not sure how the template design is integrated within the oscommerce install.

 

You said "You'll enjoy the experience of seeing what a mess the template code is"...that leads me to believe they are pretty heavily modified.

 

I'm not sure how capable I am or weeding my way through that sort of thing. I have maybe 5 or 6 oscommerce installs under my belt and non of them have been custom templates.

Link to comment
Share on other sites

They are heavily modified but mainly in the files that are served up - the ones the user will see. The others, unless they have been juiced up with contributions, a la CRE Loaded, are not hit on so much. Although that's not to say they aren't. But if you use a file comparison tool, like WinMerge, you should be able to see any important changes between your template and the latest osC package.

 

I straightened up a very popular TM template for someone because most of it wouldn't display and what did, was all over the place. A lot of what was going wrong was things like shorthand notation, which isn't necessarily a problem but can be.

The other things going wrong were queries not working with MySql 5, which are pretty much left alone in the templates. If you compare those to the new version, you will be able to see the differences.

When you see additional code in your template, comment it and leave it. Then if it breaks, you can find it again from your comments and make changes if necessary.

 

It isn't as daunting a task as, I think, I painted it to be and as long as you make backups - which WinMerge will do for you anyway - you can't really break anything. Being as you have installed osC a few times, you'll be surprised how much you recognise, to be added.

Link to comment
Share on other sites

I'm on a Mac so thee program you mention is probably not going to work.

 

Is there any way to install the old template into a fresh install of osCommerce?

 

To me it seems oscommerce needs an integrated system for installing templates.

Link to comment
Share on other sites

There are free ones out there for Mac as well. I think OS X ships with one.

 

Yea, you could try. Keep a full backup of the template files and you won't do any harm. You can have as many instances of osC as you want. You would still need to sort any MySql5 problems though. I think the PHP5 problems would be fixed, it would certainly be ok for the admin files, which is where you are having problems right now.

 

There is an integrated system, it is called Simple Template System (STS). Although that would integrate your own HTML template. The TM template is a fully functioning (theoretically) osCommerce store so it has already been integrated

Link to comment
Share on other sites

The store is running fine now after the basic osC install.

 

Any suggestions on where and what to start with concerning the TM template post install process?

 

Are there folders and or php files that are solely for the template? What should I be looking for?

 

 

Thanks for your help and suggestions

Link to comment
Share on other sites

Post-install? The same as any other installation. Delete the install directory, check permissions are ok, create the backups directory and password protect the admin.

 

I have no idea what extra files or folders your template might have. Again, the best I can suggest is compare it to the osC package. You can do a file count to get a good idea.

 

Good luck with it!

Link to comment
Share on other sites

I have built several custom osC installs and most of my layout customization work was done via the following files:

 

catalog/includes/column_left.php

catalog/includes/column_right.php

catalog/includes/header.php

catalog/includes/footer.php

catalog/includes/boxes/

catalog/product_info.php

catalog/includes/modules/product_listing.php

catalog/stylesheet.css

 

That should get you started. It really does seem like a big job, but it can be done. You are going to have to get pretty intimate with the code though, so brace yourself. You really do need some sort of file comparison tool also. It'll save you loads of time. I hope OSX doesn't bite you in the arse on that one!

Link to comment
Share on other sites

You really do need some sort of file comparison tool also. It'll save you loads of time. I hope OSX doesn't bite you in the arse on that one!

 

There are more than a few diff tools on the mac besides the command line diff

 

http://www.macupdate.com/search.php?arch=i...e&os=macosx

 

Dreamweaver, of course.

 

But I find I really, really appreciate BBedit's ability to ease my pain :)

 

http://www.barebones.com/products/bbedit/index.shtml

 

Good luck and hope that's helpful,

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...