Zen Cart Logo
Forums / Managing Customers and Orders / Getting info into a new table..desperate

Getting info into a new table..desperate

Locked

Views: 1,625

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
31 Dec 2006, 11:14 AM
#1
thezbian avatar

thezbian

New Zenner

Join Date:
Dec 2006
Posts:
7
Plugin Contributions:
0

Getting info into a new table..desperate

Does anyone know how to arrange Zen carts so it inputs data into the new database you have created

for example i have just created a new database the includes
orders_id
order_status
products_id
customer_name
customer_email
customer_city
payment_method
shipping_method

but when a new order is made there is no new data in this database.

I need this because i need to export a long list of orders in a Xcel Spreadsheet

Regards

Ronald

31 Dec 2006, 5:19 PM
#2
djh avatar

djh

New Zenner

Join Date:
Dec 2006
Location:
The Netherlands
Posts:
10
Plugin Contributions:
0

Re: Getting info into a new table..desperate

In the two configure.php files, you can tell Zencart what database to use:
includes/configure.php
admin/includes/configure.php

But wouldn't it be easier to export your list from the current database Zencart uses?

Hope this helps, David

7 Jan 2007, 8:24 PM
#3
thezbian avatar

thezbian

New Zenner

Join Date:
Dec 2006
Posts:
7
Plugin Contributions:
0

Re: Getting info into a new table..desperate

Thank you for your help, i wil try it

7 Jan 2007, 8:29 PM
#4
thezbian avatar

thezbian

New Zenner

Join Date:
Dec 2006
Posts:
7
Plugin Contributions:
0

Re: Getting info into a new table..desperate

I am trying to create a new table in the database. The table has the same headers as two other tables (im trying to get it all in one place for a single export)

I have created the table but i don't know how to get information into the tables.

For example i have order_id, product_id, Customer_name, Customer_address

but when i add a new order it doesnt *** the data to my table (but it does to all the tables that were originally part of the database)

Des anyone know how to get the information to go to my table??? i was thinking it might be in a php file somewhere?

i have being trying to do this for the past 3 weeks non stop and my hair is going gray!!:cry:

8 Jan 2007, 11:08 PM
#5
wolfsz avatar

wolfsz

Zen Follower

Join Date:
Mar 2006
Location:
Australia
Posts:
286
Plugin Contributions:
3

Re: Getting info into a new table..desperate

Hi there
What are you trying to achieve?
Is it:

  1. To create a complete new (empty) database in a different location or
  2. To transfer your existing database to a new location?
9 Jan 2007, 2:15 PM
#6
thezbian avatar

thezbian

New Zenner

Join Date:
Dec 2006
Posts:
7
Plugin Contributions:
0

Re: Getting info into a new table..desperate

wolfsz:

Hi there
What are you trying to achieve?

In our company we do not post
items or use a courier we deliver them ourselves (we work in a small area).

Everyday my delivery guys need to know two things.

  1. Who ordered a item
  2. Where that person lives
    3.What that person ordered
    4.How many of the item they ordered

In a normal situation i would print off the invoices and deliver that way. But now we are getting over 200 orders a day. Printing off 200 sheets of paper isn't productive. So what i need is a document that lists the information of all the above point in one sheet.

At present their are two separate database table that have the information i need.

zen_orders
zen_orders_products

I am looking for a way of getting all this information on one sheet.

9 Jan 2007, 2:19 PM
#7
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Getting info into a new table..desperate

wouldnt it be just as easy to create a script to pull the information from those 2 and output it in the structure you want?

rather than trying to get everything to write to a new table,

10 Jan 2007, 5:29 AM
#8
wolfsz avatar

wolfsz

Zen Follower

Join Date:
Mar 2006
Location:
Australia
Posts:
286
Plugin Contributions:
3

Re: Getting info into a new table..desperate

Hi again
It seems to me that the previous post is right. All you need is one SQL statement that creates a report that lists the info you require.
Here is the statement I use to create my weekly order report as a starting point for you. Should be to difficult to modify it to meet your needs. You can run the statement using phpmyadmin against you database.
Weekly Order Report
select zen_orders_total.orders_id, zen_orders_total.text
from zen_orders_total, zen_orders
where zen_orders.orders_id = zen_orders_total.orders_id and zen_orders_total.class = 'ot_total' and zen_orders.date_purchased >= '2006-08-14' and zen_orders.date_purchased <= '2006-08-20'

10 Jan 2007, 3:55 PM
#9
thezbian avatar

thezbian

New Zenner

Join Date:
Dec 2006
Posts:
7
Plugin Contributions:
0

Re: Getting info into a new table..desperate

you guys are great. this is the queiry i use. thank you so much

SELECT
zen_orders.orders_id,
zen_orders.customers_id,
zen_orders.delivery_name,
zen_orders.delivery_street_address,
zen_orders.delivery_city,
zen_orders.delivery_postcode,
zen_orders_products.products_name,
zen_orders_products.products_quantity,
zen_orders.order_total,
zen_orders.payment_module_code,
zen_orders.shipping_module_code,
zen_orders.customers_telephone
FROM
zen_orders,
zen_orders_products
WHERE
zen_orders.orders_id = zen_orders_products.orders_id AND
zen_orders.orders_status NOT BETWEEN 3 AND 3
ORDER BY
zen_orders.delivery_postcode

11 Jan 2007, 9:10 PM
#10
wolfsz avatar

wolfsz

Zen Follower

Join Date:
Mar 2006
Location:
Australia
Posts:
286
Plugin Contributions:
3

Re: Getting info into a new table..desperate

Well done!