Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to - Contribution DB modification for morons (like me)


jackrabbit

Recommended Posts

Posted

I was looking over some of my old posts, and I realized that at one point I had no idea at all how to deal with adding a contibution to my OSC installation that included modifying the SQL database.

 

I still have only the most rudimentary knowledge of PHP and mySQL scripting, however, the magic of OSC is that you don't have to be a code-monster to successfully modify your shoppe to make it your own, or what your client needs you to make it.

 

So, I figure I would give back a little to those newbie greenhorns like myself. This should help if you would like to add a contribution, but are a little intimidated by that file with the .sql extention that needs to get installed to make the contribution work.

 

=====

 

First off before you do anything BACK UP! It's really true that you can't hear this enough times. When you're modifying your database backing up means backing up your database. OSC makes it super simple to back up your db in the admin section, so there is no reason for you not to do it.

 

1) In the admin section under tools you'll see the first option is database backup manager. All you have to do is to is click the back up button. That is it. You've backed up your database. Couldn't be easier.

 

1a)If you have an error with your installation you can just go back to this same section select the DB that you backed up and click the restore button. Shazam! It's restored and you can breath easier.

 

Now that you have backed up your DB it's time to modify it.

 

I just work with PHPmyAdmin that I access through a control panel. If there are other ways of getting there I'm sure someone out there will share with us how they do what they do. I am going to just stick with what I know, so I hope it helps you.

 

=====

 

Access your control panel and click on mySql databases. At the bottom of the page is a tiny teenie tiny little link that says phpmyadmin click on that.

 

That'll take you to the phpmyadmin page where you can access your database. At the top of the page are a number of tabs. Click on the tab that says SQL.

 

Now you're at a page with a textarea and a browse button/textfield.

 

If you have a .sql file you in your contribution you can use it to modify your database by clicking on the browse button, navigating to it and uploading it.

 

The way I usually do it is to copy all the SQL scripting from the contribution and then paste it into the textarea. Then click the GO button.

 

Either one of those actions will have the same result.

 

Believe it or not, that should be all you have to do to add the SQL part of your contribution.

 

=====

 

So, there's really nothing to worry about when it comes to this kinda thing. Easy-peasy. You can just restore your database if you have a problem with the installation.

 

I hope this helps someone out there. I know I would have loved it when I was starting out.

 

be well,

Jackrabbit

Posted

Well said jackrabbit.

 

Just one more suggestion. As well as the Database Backups .. you can save yourself any Big Headaches by also keeping a current backup of your entire Site.

 

If you only have one original ... if it ever gets destroyed or screwed up .. there goes all your hard work.

  • 1 month later...
Posted
and um, sorry, how and where would we do that?

 

:) G

super-newbie

Copy the files from your server to your pc using an ftp program such as filezilla.

Posted
and um, sorry, how and where would we do that?

 

:) G

super-newbie

 

Please be more specific with your question. We would love to help you out, but we need a subject for the how and where!

  • 2 months later...
Posted

I need to add this to my database, im not sure how to manually add fields through myphpadmin, ive only ever imported an .sql file that comes with contributions.

 

In database table ORDERS_STATUS_HISTORY, add a new field via PHPmyAdmin:

FIELD: backorders

TYPE: text

ATTRIBUTES: (leave blank)

NULL: No

DEFAULT: (leave blank)

EXTRA: (leave blank)

 

 

What do i need to write into a .sql file so i can import it and add this to my database??

 

Sorry for the noob question!

  • 6 months later...
Posted

Thanks for the simple step by step! :thumbsup:

Helped me add a table to my database.

 

Monica

Archived

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

×
×
  • Create New...