Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.

MYOB export help

Started by tyroneneous on 28 May 2008, 9:03 AM · Views: 7,699

Results 1 to 20 of 31
28 May 2008, 9:03 AM
#1
tyroneneous avatar

tyroneneous

New Zenner

Join Date:
May 2006
Posts:
16
Plugin Contributions:
0

Post #1 by tyroneneous

Hi,

I have some code that was copied from OsCommerce MYOB module and I have tried to implement it into Zen-Cart. At this point it seems to work, but it's not generating the files for downloading.

Could some one have a look at it and recommend or help with the code to get it to work?

I hope that we can have this code shared in the downloads section soon so that people who need this can also use it.

Thank you.

Tyrone.

10 Jun 2008, 2:45 PM
#2
simondale123 avatar

simondale123

New Zenner

Join Date:
Jun 2008
Posts:
60
Plugin Contributions:
0

Post #2 by simondale123

This sounds great. Did you manage to get it working?

I am backing up my Zen Cart and Zen Cart DB as we speak and then I will give it a try.

Thanks

Simon

10 Jun 2008, 7:53 PM
#3
simondale123 avatar

simondale123

New Zenner

Join Date:
Jun 2008
Posts:
60
Plugin Contributions:
0

Post #3 by simondale123

OK - I have now followed the instructions and installed this on my test server.

Alas, it doesn't error, and there's nothing in the logs, but no files are produced.

What a shame.

I wonder if anyone who knows what they are doing can help us out? I can give access to my test server if that helps.

Thanks

Simon

16 Jun 2008, 1:05 PM
#4
tyroneneous avatar

tyroneneous

New Zenner

Join Date:
May 2006
Posts:
16
Plugin Contributions:
0

Post #4 by tyroneneous

Hi simondale123,

Thanks for trying the module. I have managed to get it to work. The problem I'm having is that the exported files are not doing what it suppose to. It's not generating a /n properly so I can import it into MYOB. I'll upload the modified files soon. Any ideas or suggestions as well?

Thanks.

17 Jun 2008, 2:21 AM
#5
tyroneneous avatar

tyroneneous

New Zenner

Join Date:
May 2006
Posts:
16
Plugin Contributions:
0

Post #5 by tyroneneous

Hi simon,

I've got the code to finally work. Test to see if this works for you as well.

Thanks.

17 Jun 2008, 12:47 PM
#6
car86l avatar

car86l

New Zenner

Join Date:
Jun 2008
Posts:
18
Plugin Contributions:
0

Post #6 by car86l

Tyroneneous, i'd love to get a more in depth description on how this mod actually works.

Also what MYOB packages it is compatible with.

17 Jun 2008, 1:20 PM
#7
tyroneneous avatar

tyroneneous

New Zenner

Join Date:
May 2006
Posts:
16
Plugin Contributions:
0

Post #7 by tyroneneous

Hi,

After a bit of testing today and recoding I have managed to get it to work in my version of MYOB. Currently I've only tested it on MYOB Accounting v17.

Basically it exports any new orders to a file in the MYOB directory, which you create in your Zencart directory.

With this file you can import it directly into the MYOB accounting software. Additionally it has an option to allow you to import customers as well.

The instructions should give you an idea of how it works.

Thanks.

Tyrone.

17 Jun 2008, 1:23 PM
#8
car86l avatar

car86l

New Zenner

Join Date:
Jun 2008
Posts:
18
Plugin Contributions:
0

Post #8 by car86l

once i import the file into MYOB what do i do then, do i manually delete the file? otherwise wont i just keep reimporting the same data?

17 Jun 2008, 1:41 PM
#9
tyroneneous avatar

tyroneneous

New Zenner

Join Date:
May 2006
Posts:
16
Plugin Contributions:
0

Post #9 by tyroneneous

Hi,

Yes you can manually delete the file. Though each file has a date stamp on the end of it, so it won't overwrite the previous days one. Also if an order is placed on the same day, it will append it to the file and not overwrite the data. Therefore you will only need to import the file once a day and it will be sufficient enough to update your accounting software.

Tyrone

18 Jun 2008, 8:53 PM
#10
simondale123 avatar

simondale123

New Zenner

Join Date:
Jun 2008
Posts:
60
Plugin Contributions:
0

Post #10 by simondale123

OOPS - IGNORE THE BELOW - I MISSED THE PROGRESS ABOVE! I WILL DOWNLOAD AND INSTALL THE LATEST VERSION NOW!

I emailed the authors mentioned in the script and got this response from Steve:

*Hi Simon,

I downloaded myob.zip and had a quick look at the code. It has been bastardized all to hell from what I wrote six years ago :(

I see that one variable is $DOCUMENT_ROOT but that used to be a php variable, since deprecated. Maybe that is the problem, so renaming the variable could help.

I also see usage of the now deprecated php array $HTTP_POST_VARS, so those need to be renamed to $_POST

Other than that, and making sure the path is correct that it is writable by the web-server user (usually "nobody" or "apache"), I see no obvious reason for it to fail.

Best Regards,
Steve*

Unfortunately I have tried to make those changes but I still have the same problem. What a shame.

Simon

18 Jun 2008, 9:50 PM
#11
simondale123 avatar

simondale123

New Zenner

Join Date:
Jun 2008
Posts:
60
Plugin Contributions:
0

Post #11 by simondale123

Hi Tyroneneous,

I have tried this now and lots and lots of fiddling but I can't get it to produce a file at all!

I've tried running includes/myob_cust.php directly and it produces a file in my MYOB directory with the field headings so I reckon I've got the path and permissions correct.

I've included a ZIP file with my myob_cust.php, myob_sale.php, application_top.php and header_php.php. I think those are all the relevant files?

Could you please please take a quick look and see where I'm being stupid?! I'd really appreciate it!

Many thanks for all of your help

Regards

Simon

18 Jun 2008, 10:48 PM
#12
tyroneneous avatar

tyroneneous

New Zenner

Join Date:
May 2006
Posts:
16
Plugin Contributions:
0

Post #12 by tyroneneous

Hi Simon,

I had a quick look at your code and fixed it up. You had placed the code to run before the "process checkout" line was to be finished. Now I've put it into the right place for you. I've attached the files in the structure of the correct directories for it to run. It should work now.

Also I'm very disappointed for the author to say that we've basterized his file. I'll clarify that, I only changed the names of the functions to fit for Zencart, so that it would call to the right function. I have not even added anything to it, so he can't blame us for us mucking his code up. Additionally his code was very messy as well and that's not the way I would program. Anyway let's see if there can be additional improvements to it. e.g:

  1. Add an option to click a button in the admin controls to d/l the files or for it to automatically email us all the files at the end of the day when all the transactions have been done.
  2. Add a surcharge function so that it can include it in the MYOB journal entries. (For people like me who are charging a CC surcharge to a customer on any CC transaction).

Thanks.

Tyrone.

19 Jun 2008, 4:55 PM
#13
simondale123 avatar

simondale123

New Zenner

Join Date:
Jun 2008
Posts:
60
Plugin Contributions:
0

Post #13 by simondale123

Hi Tyrone,

I wouldn't worry about what Steve said. I think the changes that he means probably happened before you came across the code, when it was translated from Quickbooks, etc.

Thanks for much fox fixing my code! That's really kind of you! Unfortunately it doesn't work...

Strangely the first couple of times that I tried it I got to the NoChex part (the checkout pages on my payment provider's servers) and a username and password prompt came up for [email protected].

It doesn't do that now, but it doesn't produce a file either! Doh!

What else could it be?!?!?!

Thanks Tyrone

Simon

20 Jun 2008, 3:57 AM
#14
tyroneneous avatar

tyroneneous

New Zenner

Join Date:
May 2006
Posts:
16
Plugin Contributions:
0

Post #14 by tyroneneous

Hi Simon,

Thanks for the response. I would suggest installing a debugging problem and to see where the problem is. Click this link below and install the Zen-Cart debugging tool which will help you determine where the problem is:

http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_54&products_id=860

(Debugging Error Logging Utility)

Also which version of Zen-Cart are you running and also if have a site online I could perhaps have a quick look for you to see where the potential problem is.

Thanks.

Tyrone.

21 Jun 2008, 2:26 PM
#15
simondale123 avatar

simondale123

New Zenner

Join Date:
Jun 2008
Posts:
60
Plugin Contributions:
0

Post #15 by simondale123

Hi Tyrone,

Thanks so much for the help. Unfortunately for some reason I can no longer FTP into my test site. I have logged a call with the hosting guys so hopefully I will get back in soon!

Thanks

Simon

23 Jun 2008, 12:37 AM
#16
simondale123 avatar

simondale123

New Zenner

Join Date:
Jun 2008
Posts:
60
Plugin Contributions:
0

Post #16 by simondale123

Hi Tyrone,

I've sorted the FTP issue and logged in to install the Debug tool. I've run through the purchase process and checked out the debug file but this is all it says:

[22-Jun-2008 20:28:46] PHP Warning: imagejpeg() [<a href='function.imagejpeg'>function.imagejpeg</a>]: Unable to open '/home/fstperso/public_html/bmz_cache/7/77a7ab41fac4323fd1c6de71d396ec97.image.68x62.jpg' for writing in /home/fstperso/public_html/includes/classes/bmz_image_handler.class.php on line 651

That doesn't seem relevant to me?!

My test site is at: http://saturn.dotcolo.com/~fstperso/

I'd really appreciate it if you can help me. I'll PM you the details just in case you do have chance/ the inclination to log in and have a poke around.

Thanks so much for all of your help

Simon

25 Jun 2008, 5:32 AM
#17
tyroneneous avatar

tyroneneous

New Zenner

Join Date:
May 2006
Posts:
16
Plugin Contributions:
0

Post #17 by tyroneneous

Hi Simon,

I had a look at your site and tried finding the problem. I can see that the Nochex redirection is not processing the checkout page and that's why it's not process the MYOB commands in there. Have you tried processing the check out with just say payment as cash?

I know it works for Cash, Cheque, manual credit card payments. Once it exits out of your cart and tries processing it away from the site, the site address changes and that's where I think it's not working.

Give that a go and let me know how you go. By the way, what a coincidence that you got the same template for your site as mine! ehheh

Here's my site if you want to have a look around:

https://www.dbv.com.au

Thanks!

29 Jun 2008, 9:00 AM
#18
fuzzybunny avatar

fuzzybunny

New Zenner

Join Date:
Sep 2007
Location:
Melbourne Australia
Posts:
60
Plugin Contributions:
0

Post #18 by fuzzybunny

Hey there Tyrone and Simon,

Thank you very, very much for putting in some time on the MYOB integration.

Is the MYOBfixed file the best one to download?

I am very much looking forward to using and if possible adding something to this contribution.

Thanks in advance.
Max

@MaxOnTheHill
Molehill Web Works

29 Jun 2008, 10:53 PM
#19
tyroneneous avatar

tyroneneous

New Zenner

Join Date:
May 2006
Posts:
16
Plugin Contributions:
0

Post #19 by tyroneneous

Hi,

Thanks for your reply. The best file to download is the myob_export.zip, which is located on the first page.

The other file was to help Simon fix up his code.

Let me know how it goes. It would be great to get some more add ons to this module.

Thanks!

Tyrone.

4 Jul 2008, 6:16 AM
#20
car86l avatar

car86l

New Zenner

Join Date:
Jun 2008
Posts:
18
Plugin Contributions:
0

Post #20 by car86l

Hi guys,

i've done some work on the module

its now easier to install and you set settings via admin

Hope its helpful