Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

?Peachtree CSV Export?


Irin

Recommended Posts

Hello,

 

I?ve installed ?Peachtree CSV Export? contribution. I have a few problems. When I click batch export button, I get the following error:

Warning: fwrite(): supplied argument is not a valid stream resource in ??..\osCommerce\admin\osc_export_batch.php on line 217

 

Warning: fclose(): supplied argument is not a valid stream resource in ??..\osCommerce\admin\osc_export_batch.php on line 218

File completed:

 

Warning: chmod(): Permission denied in ????\osCommerce\admin\osc_export_batch.php on line 220

 

Peachtree CSV Export 1.0

 

--------------------------------------------------------------------------------

 

Customer ID,Sales Order #,Date,Ship to Name,Ship to Address-Line One,Ship to City,Ship to State,Ship to Zipcode,Ship to Country,Accounts Receivable Account,Sales Tax Code,Number of Distributions,So Distribution,Quantity,Item ID,Description,G/L Account,Unit Price,Tax Type,Amount,Sales Tax Authority

And when I click export button, I get:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ???\osCommerce\admin\osc_export.php on line 92

File completed: peachtree-order-121.csv

 

Order Information Record:

 

Order ID: 121

Customer ID: 127

Ship To: First Last Name

Company: Company Name

City: City, State

E-mail company:

 

Peachtree CSV Export 1.0

 

--------------------------------------------------------------------------------

 

Customer ID,Sales Order #,Date,Ship to Name,Ship to Address-Line One,Ship to City,Ship to State,Ship to Zipcode,Ship to Country,Accounts Receivable Account,Sales Tax Code,Number of Distributions,So Distribution,Quantity,Item ID,Description,G/L Account,Unit Price,Tax Type,Amount,Sales Tax Authority

<P>SAME,121,,First Last Name,508 Street Rd.,City,TX,00000,000-000-0000,00000,OH,3,0,0,, SALES TAX,23100,0,0,-13.49,</P>

 

<P>SAME,121,,First Last Name,508 Street Rd.,City,TX,00000,000-000-0000,11000,OH,3,1,1,TM-05,LCD Kit,,163.50,1,-163.50,</P>

 

<P>SAME,121,,First Last Name,508 Street Rd.,City,TX,00000,000-000-0000,11000,OH,3,0,0,,Freight Amount,45500,0,26,-5.90,</P>

And my other question is how I can change an Ohio County Sales Tax provided with contribution to my Texas Sales Tax. What exactly I have to change? Any help would be greatly appreciated.

 

Thanks in advance,

Irina.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

I have figured out why I was getting the above error.

 

$orders_result = mysql_query("SELECT orders_id FROM orders WHERE orders_status=1");

 

The above query looks for records that have a status of Pending. I did not have any Pending Orders.

 

Once I changed a few orders to "Pending" the file works great.

Hope this helps.

Link to comment
Share on other sites

  • 2 months later...

Hi,

on line 17 of the osc_export.php file it says:

//If you uncomment the next line you will have to edit around lines 145 & 181

 

Does anyone know what exactly needs to be edited and how?

 

thanks

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself.

Therefore, all progress depends upon the unreasonable man."

-- George Bernard Shaw

Link to comment
Share on other sites

Also on line 17 of the osc_export.php code it says:

//If you uncomment the next line you will have to edit around lines 145 & 181

 

Exactly what do i need to change?

The line of code commented out was to set all products to have the same g/l sales account. I used this for testing purposes, and kept it in for those who hadn't loaded their own g/l sales account. You don't need to change anything.

 

For those who want the file auto-generated use this below.

Download mime_export.zip

If you have it working cleanly here is a little added something. It requires cURL to be installed on your server, which is pretty common. In admin go to Tools->Server Info and look for curl support enabled. This goes into the site.com/catalog/includes directory. You need to edit the first three variables of the file to match your installation. When someone checks out you will be emailed the peachtree file.

 

In checkout_process.php below:

 

tep_mail('', , EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

add

 

// email peachtree export
include (DIR_WS_INCLUDES.'mime_export.php');

 

If you use paypal or another payment that doesn't process the order in checkout_process.php, you will need to add the same thing to the below the same line in /catalog/includes/modules/payment/paypal(or_ipn).php

Link to comment
Share on other sites

  • 3 months later...

Does this work with Peachtree complete accounting 2006?

 

 

The line of code commented out was to set all products to have the same g/l sales account. I used this for testing purposes, and kept it in for those who hadn't loaded their own g/l sales account. You don't need to change anything.

 

For those who want the file auto-generated use this below.

Download mime_export.zip

If you have it working cleanly here is a little added something. It requires cURL to be installed on your server, which is pretty common. In admin go to Tools->Server Info and look for curl support enabled. This goes into the site.com/catalog/includes directory. You need to edit the first three variables of the file to match your installation. When someone checks out you will be emailed the peachtree file.

 

In checkout_process.php below:

 

tep_mail('', , EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

add

 

// email peachtree export
include (DIR_WS_INCLUDES.'mime_export.php');

 

If you use paypal or another payment that doesn't process the order in checkout_process.php, you will need to add the same thing to the below the same line in /catalog/includes/modules/payment/paypal(or_ipn).php

Link to comment
Share on other sites

Does this work with Peachtree complete accounting 2006?

This should work for all version of Peachtree, just compare the file output to how you need to map the data in Peachtree. This will generate a CSV file that can be imported under File-Select Import/Export. In the readme is a example of how the file mapped.

Link to comment
Share on other sites

  • 5 months later...

Hello:

 

I am having problems with the contribution. While it works in every aspect except one, its quite a pain. It will not export in the CSV my total price (the unit price * the quantity) and when it imports into peachtree (premium 07), it simply divides that amount by the quantity, instead of multiplying it. Can anybody help me with this???

 

Brent B.

Link to comment
Share on other sites

Hi Joe,

 

I have just installed your patches.

 

When I click on the single export button the following message is received from osc_export.php?id=5003 "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1".

 

It is interesting that it has at least found the highlighted Order#5003.

 

Have you encountered this error message before?

 

The server is running MySQL 5.0.16-Debian_0.dotdeb.0 and PHP Version: 4.4.1-0.dotdeb.2 (Zend: 1.3.0)

 

Regards,

Peter

Link to comment
Share on other sites

  • 1 year later...
  • 11 months later...

I've installed this module -- and it seems to be working for individual exports, but I can't find the batch export button. (I just read back over the install instructions, to make sure I didn't miss something -- but I drew a blank...)

 

Where is the "Batch Export" button supposed to be located? (Which admin screen?)

 

Thx!

Julie Williams

Link to comment
Share on other sites

Ok. I found the solution to that problem. For anyone else interested in using this module with the batch export, the instructions that include the batch functionality are in the directory for the "County" sales tax option -- but not in the "State" sales tax option.

 

---

 

Now, I have another issue... :rolleyes:

 

I am probably going "blind", but I can't see where in the database the data on how the order was shipped is stored...? (I've looked in all the "orders" tables...) I know it has to be tied to the individual order somehow -- otherwise the system couldn't display it in the Order History -- but I am not finding it. (My accountant has requested I add that information to the export...)

 

Knowledgeable assistance would be greatly appreciated!!

 

Regards,

Julie Williams

Link to comment
Share on other sites

  • 1 year later...

Does this contribution populate PeachTree or sync it?

 

We are looking for a contribution that will sync with PeachTree or we will try to create it *gasp*. We have learned how to move the customer data out within MYSQL, but we want to take it a step further with the ability to push orders into PeachTree.... from the admin side instead of MYSQL. I had a second thought that this might be a contribution for QuickBooks and we just need to model after one of those contributions? Any thoughts are greatly appreciated.

 

Thanks!

 

Vid

Edited by videod
Link to comment
Share on other sites

  • 2 months later...

Does this contribution populate PeachTree or sync it?

 

We are looking for a contribution that will sync with PeachTree or we will try to create it *gasp*. We have learned how to move the customer data out within MYSQL, but we want to take it a step further with the ability to push orders into PeachTree.... from the admin side instead of MYSQL. I had a second thought that this might be a contribution for QuickBooks and we just need to model after one of those contributions? Any thoughts are greatly appreciated.

 

Thanks!

 

Vid

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