Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New Contribution Order Export


mightyx

Recommended Posts

Hello, I am currently building a order export contribution, based on an already existing contrib. I want to adopt it for some specials I need, for example German bank transfer.

Now I wrote a query that defines the bank account variables I want to export. My problem:

If a customer pays by Paypal, no bank account data is inserted in the database. That means some order IDs have bank account data, some don't have an entry in the benktransfer table.

If I look at my export file, the last bank account data is repeated until the next customer inserts bank account data. Is there a function to "select only if order ID in table banktrnasfer exists"?

 

Here's my code:

 

//Bankdaten f?r Lastschrift

$banktransfer = tep_db_query("select banktransfer_owner, banktransfer_bankname, banktransfer_blz, banktransfer_number from banktransfer

where orders_id = " . $Orders_id);

//$row_banktransfer = tep_db_fetch_array($banktransfer);

while($row_banktransfer = mysql_fetch_array($banktransfer)) {

// end //

 

$bt_owner = filter_text($row_banktransfer["banktransfer_owner"]);

$bt_bankname = filter_text($row_banktransfer["banktransfer_bankname"]);

$bt_blz = filter_text($row_banktransfer["banktransfer_blz"]);

$bt_number = filter_text($row_banktransfer["banktransfer_number"]);

}

Link to comment
Share on other sites

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...