X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   order items export (https://forum.x-cart.com/showthread.php?t=50446)

cycloneuk 10-30-2009 01:39 AM

order items export
 
In the order items export i also wan't to include the customers first name and last name. Any ideas?

cycloneuk 10-30-2009 03:37 AM

Re: order items export
 
This is how i have got my order_items export to display.

!ORDERID !PRODUCTCODE !B_FIRSTNAME !B_LASTNAME !EMAIL

The last 3 fields are blank because it's not pulling the data for them since they are stored in two different tables, the first 2 are stored in order_details and the last 2 are in orders.

cycloneuk 10-31-2009 08:43 AM

Re: order items export
 
Anyone help with this?

cflsystems 11-01-2009 05:33 AM

Re: order items export
 
Not sure how 4.1.12 is, this code is from 4.2.1
include/import_orders.php
Code:

  if ($single_mode || AREA_TYPE == 'A') {
  $row = func_query_first("SELECT * FROM $sql_tbl[orders] WHERE orderid = '$id'");
  } else {
  $row = func_query_first("SELECT $sql_tbl[orders].* FROM $sql_tbl[orders], $sql_tbl[order_details] WHERE $sql_tbl[orders].orderid = '$id' AND $sql_tbl[orders].orderid = $sql_tbl[order_details].orderid AND $sql_tbl[order_details].provider = '$login'");
  }


you can change it like this and see if it works for you
Code:

#  if ($single_mode || AREA_TYPE == 'A') {
#  $row = func_query_first("SELECT * FROM $sql_tbl[orders] WHERE orderid = '$id'");
#  } else {
  $row = func_query_first("SELECT $sql_tbl[orders].* FROM $sql_tbl[orders], $sql_tbl[order_details] WHERE $sql_tbl[orders].orderid = '$id' AND $sql_tbl[orders].orderid = $sql_tbl[order_details].orderid AND $sql_tbl[order_details].provider = '$login'");
#  }


cycloneuk 11-02-2009 01:27 PM

Re: order items export
 
Nope, didn't work cflsystems thanks though for trying to help. It's the order items php file that needs to be modified.

dmpinder 07-02-2012 06:02 AM

Re: order items export
 
Did you have any success with this?

dmpinder 07-02-2012 08:05 AM

Re: order items export
 
Hi cycloneuk,

I've just worked out how to include other info into this export, such as date of purchase and category of the product purchased. I'm sure you can use my instructions on here and modify the LEFT JOIN to join onto the customers table instead: http://forum.x-cart.com/showthread.php?t=64163

Let me know if you get stuck with it.


All times are GMT -8. The time now is 02:42 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.