Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

add order with SQL?


qwertyjjj

Recommended Posts

What is the SQL I need to use to add an orde rinto the database?

The only up to date contribution is the order editor and this does no add orders so I could use that but what is the minimum SQL I need to do to add an order with the correct ID in the databasE?

Link to comment
Share on other sites

What is the SQL I need to use to add an orde rinto the database?

The only up to date contribution is the order editor and this does no add orders so I could use that but what is the minimum SQL I need to do to add an order with the correct ID in the databasE?

 

Take a look at catalog/checkout_process.php this will show you what is necessary to add a valid order to osCommerce.

 

There are 5 regular tables that need to be inserted to plus optionally TABLE_ORDERS_PRODUCTS_DOWNLOAD

Link to comment
Share on other sites

Take a look at catalog/checkout_process.php this will show you what is necessary to add a valid order to osCommerce.

 

There are 5 regular tables that need to be inserted to plus optionally TABLE_ORDERS_PRODUCTS_DOWNLOAD

 

I can't see any of the inserts...just this:

tep_db_perform(TABLE_ORDERS, $sql_data_array);

 

I could just copy a previous order and change the ID but I think that might mess up the ID count in MySQL.

Link to comment
Share on other sites

I could just copy a previous order and change the ID but I think that might mess up the ID count in MySQL.

 

Sounds like you are thinking of dabbling in things you are not capable of doing, I'd think twice.

Link to comment
Share on other sites

Sounds like you are thinking of dabbling in things you are not capable of doing, I'd think twice.

 

I've thought twice as as I work in IT, it should be fine :)

Now, where is the insert code within OSCommerce?

Link to comment
Share on other sites

I've thought twice as as I work in IT, it should be fine :)

Now, where is the insert code within OSCommerce?

 

You were looking at it, work in IT eh :)

 

My niece works in a hospital, she wouldn't undertake an operation however.

Link to comment
Share on other sites

You were looking at it, work in IT eh :)

 

Look. I'm looking for help, if you're not going to bother then why post?

I've looked in the PHP page you gave and thanks for that but I can't find the insert code at the moment...the actual INSERT INTO Table script

These are in functions within OSC tep_db_insert_id etc

Link to comment
Share on other sites

Look. I'm looking for help, if you're not going to bother then why post?

 

I was helping.

 

I showed you exactly where to look. You then gave me the clear impression that I ought to be advising you not to dabble so that's what I did.

 

Sorry if you feel my help was substandard.

 

osCommerce functionality is wrapped in the main into functions which can be found in catalog/includes/functions.

 

Database wrappers can be found e.g in catalog/includes/functions/database.php ( like e.g. tep_db_perform )

Link to comment
Share on other sites

I was helping.

 

I showed you exactly where to look. You then gave me the clear impression that I ought to be advising you not to dabble so that's what I did.

 

Sorry if you feel my help was substandard.

 

No, I don;t feel that at all but I'm saying I will be fine doing this and wanted to proceed further...I don;t see a problem with that :)

How else is someone supposed to learn without trying?

I can see the Order tables but the code in checkout_process.php does not show the full insert procedures, so I wanted to know where to go from that...

For example, where are the tep_db_perform statements within OSC?

Link to comment
Share on other sites

I had edited my post above.

 

The $sql_data_array(s) you are seeing are finally passed into tep_db_perform which applies the query.

Link to comment
Share on other sites

What is the SQL I need to use to add an orde rinto the database?

The only up to date contribution is the order editor and this does no add orders so I could use that but what is the minimum SQL I need to do to add an order with the correct ID in the databasE?

 

@@qwertyjjj

 

Order Editor has an optional contribution called, I think, Manual Order Maker that will do exactly what you want.

 

Dan

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...