Jump to content


Corporate Sponsors


Latest News: (loading..)

new order in database


  • You cannot reply to this topic
5 replies to this topic

#1 samad

  • Community Member
  • 5 posts
  • Real Name:Samad

Posted 03 September 2010, 16:30

Hi Folks,

I have altered the orders table to add a new field customers_coupon, this field allows me to save coupon number that's been used during the order. Could someone tell me from which file/script a new order is inserted in orders table?. I can see (via phpmyadmin) that tis new entry is created once we arrive to checkout_confirmation.php. But I could not recognize which script performs it.

Thanks for help.

#2 burt

  • Community Sponsor
  • 6,970 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 03 September 2010, 16:36

checkout_process.php
The Dirty Little Secrets that no osCommerce template sellers want you to know...revealed...

Support is commercially available. The question is whether you value your business
highly enough to spend money on it.

For commercial support from known developers who support osCommerce
ethos, please post at http://forums.oscommerce.com/forum/79-commercial-support/

#3 samad

  • Community Member
  • 5 posts
  • Real Name:Samad

Posted 03 September 2010, 18:27

Ok, I know this page contains the code for inserting a new record in the orders table. But I have tried to add the new field as bellow without success :(

-------

$sql_data_array = array('customers_id' => $customer_id,
'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'],
---> 'customers_coupon' => $order->info['coupon'], <--- (I've tried many hardcoded values here)
'customers_company' => $order->customer['company'],
'customers_street_address' => $order->customer['street_address'],

I'm using paypal standard as payment method

best regards


View Postburt, on 03 September 2010, 16:36, said:

checkout_process.php


#4 samad

  • Community Member
  • 5 posts
  • Real Name:Samad

Posted 04 September 2010, 06:31

Any help PLS?

#5 blackwater

  • Community Member
  • 163 posts
  • Real Name:Paul

Posted 04 September 2010, 13:23

What is the type-field for the column you created in mysql? Is it VARCHAR?

#6 samad

  • Community Member
  • 5 posts
  • Real Name:Samad

Posted 04 September 2010, 13:42

to Burt:

I've found the problem. As I'm using Paypal standard, the new order row is inserted from paypal_standard.php instead of checkout_process.php

thank you