Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Export orders into csv


dlan

Recommended Posts

  • 3 months later...
 
I still have a small problem (Frozen version):
 
When the client has a name and two-membered surname after the second space it cuts off all the words
Example:
Johnny Bravo Scott
after export to csv I only have Johnny Bravo
Truncates only when a space after the second word is used
 

Where can I correct it so that it doesn't cut?
Edited by driven22
Link to comment
Share on other sites

You should use

\t

separation for csv's

<?php
  $order_dump = DIR_FS_TMP.'order_dump.csv';


  $order_dump = fopen($order_dump ,"a") or die(" error opening - $order_dump \n");  


  fwrite($file_handle,"$key\t$value[0]\t$value[1]\n");


  fclose($file_handle) or die(" error closing $order_dump"); 
?>



 

Edited by fridgebox
Link to comment
Share on other sites

  • 1 month later...
I would like csv to export the order amount when the shipping payment is higher or equal to 19$ (My cod is 19$) and show e.g. in the $cod field in exportordes.php

It is needed for cash on delivery COD when importing to DHL or other courier.

I've been trying to enter the rule for a few days - but I'm too weak in php to do this.

Currently, order_total ($Order_Grand_Total) shows regardless of the chosen payment method or payment amount:
Quote

// --------------------    QUERIES 7  ------------------------------------//
//Orders_Total -
$orders_total = tep_db_query("select value from orders_total
where class = 'ot_total' and orders_id = " . $Orders_id);
//$row_orders_total = tep_db_fetch_array($orders_total);
while($row_orders_total = mysqli_fetch_array($orders_total)) {
 // end //
$Order_Grand_Total = $row_orders_total["value"];
}


Can I count on your help?

 

 

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...