Jump to content
adam5532

QBI Quickbooks Import

Recommended Posts

The error message occurs because you haven't matched any products and the array variable is empty. This error will be corrected in the next version (3.0), but it shouldn't functionally cause a problem.

 

Assemblies are not supported in the current version, but will be included in 3.0. If you search the posts back a bit you'll find discussion of this and a work-around.

 

Thanks,

Adam

 

I also got this error - To correct it open up admin/includes/functions/qbi_productsmatch.php and find this

 

function prod_update($product_menu) {
// Parse form results
foreach ($product_menu as $compid=>$itemid) {
	$compids=explode("-",$compid);
	$prodid=$compids[0];
	$optvalid=$compids[1];
	settype($prodid,'integer');		
	settype($optvalid,'integer');
	settype($itemid,'integer');

 

Change it to read this

 

function prod_update($product_menu) {
// Parse form results
foreach ((array) $product_menu as $compid=>$itemid) {
	$compids=explode("-",$compid);
	$prodid=$compids[0];
	$optvalid=$compids[1];
	settype($prodid,'integer');		
	settype($optvalid,'integer');
	settype($itemid,'integer');

 

The error should then go away


Regards

 

Mark A Reynolds

Share this post


Link to post
Share on other sites

So far this contrib has been impressive in its quality and functionality. I have however run into two problems when trying to export the 3000+ transactions of our store:

 

1.)The larger IIF export (qbi_orders) always times out in the web browser when I attempt to download it.

2.)When I FTP into the server and manually download it from the admin\qbi_output directory the IIF file only has about half of the transactions.

 

I am not sure why it is doing this and I don't see any controls in the back end that would allow me to change the output to solve this. Does anyone have an idea what might be causing this? Once this is working I can start using our new store!

Share this post


Link to post
Share on other sites

There is a limit to how long a php transaction can run.

 

You might be able to increase the limit.

 

Failing that the code needs to break the transaction into "sections".


Kym

Projects Director @ ozEworks.com

Share this post


Link to post
Share on other sites
So far this contrib has been impressive in its quality and functionality. I have however run into two problems when trying to export the 3000+ transactions of our store:

 

1.)The larger IIF export (qbi_orders) always times out in the web browser when I attempt to download it.

2.)When I FTP into the server and manually download it from the admin\qbi_output directory the IIF file only has about half of the transactions.

 

I am not sure why it is doing this and I don't see any controls in the back end that would allow me to change the output to solve this. Does anyone have an idea what might be causing this? Once this is working I can start using our new store!

Hi,

 

You can adjust your PHP timeout in your PHP ini file.

 

You can also download in batches:

In the orders table, set the field qbi_imported to 3 for all orders you want to ignore, and 2 for all orders you want to download (these will appear in ALl Previous Orders). Using SQL statements, you can make batches this way.

 

Note that downloading old orders will not be successful if you have deleted products that may be in those orders, or you charge sales tax and the rate has changed.

 

Thanks,

Adam

Share this post


Link to post
Share on other sites

We once wrote a version that downloaded in one go using multiple php transactions so there was no timeout issue ever to deal with. If you want this code to include the technique into the current QBI then PM me.


Kym

Projects Director @ ozEworks.com

Share this post


Link to post
Share on other sites
We once wrote a version that downloaded in one go using multiple php transactions so there was no timeout issue ever to deal with. If you want this code to include the technique into the current QBI then PM me.

 

Acutally I would be really interested in that, I will PM you ASAP. Since I am on a shared box right now editing the php.ini file might prove to be too much for the admins to accept since that would affect everyone else on the server.

 

THANK YOU!!

Share this post


Link to post
Share on other sites

Hiya

 

I've just started installing this contribution - I've done all the admin edits and uploaded the files etc.

 

The database installation went without problem - all tables inserted into the database as far as I can tell and I got presented with the prompt to now go to the configuration page:

 

Quickbooks Import QBI

Database table installation successfull.

 

Now you must go to the configuration page.

 

When I clicked on the link I first of all got the error message that someone else reported :

 

...the server is redirecting the request for this address in a way that will never complete.

* This problem can sometimes be caused by disabling or refusing to accept cookies.

 

But as the store is not using SSL the thing that made this work for them would not fix it for me. It was falling over trying to access this page: admin/qbi_config.php?msg=1

 

I retried going to /admin/qbi_config.php directly and each time I get thrown back to the /admin/qbi_db.php page with the following message:

 

Quickbooks Import QBI

 

Database table upgrades successfull. Now you must go to the configuration page.

1) Recheck your configuration options and configure new options.

2) Click "Update" at the bottom of the page.

Note: You must click update to finish the upgrade, even if you did not change any settings!

 

Now you must go to the configuration page.

 

I click on the link to goto configuration page and get presented with the following page: /admin/qbi_db.php?db_ver=&qbi_vers=2.10 which gives me the message:

Quickbooks Import QBI

Upgrade QBI database from version to 2.10?

 

So I assume it is incorrectly working out the version I am using for some reason - though I checked and its correctly inserted the version '2.10' into the 'qbi_config' table.

 

I've tried deleting all references from the database (qbi tables and the entries in products and orders) and still get exactly the same thing happening...

 

All settings in the configure.php file seem to be fine (certainly the stores been running without problems for the last year or so). File permissions on the folders are set to 775 and 777 as specified in the install instructions - just incase that could be a potential thing for it to stumble over too.

 

If anyone can help at all I'd really appreciate it, seems like people have encountered this kind of thing before so if you could let me know how they got around it I'd be grateful - not found anything in this thread.

 

TIA!

Sadie

Share this post


Link to post
Share on other sites

One thing that I've noticed going through the qbi_config file is that $msg is never actually declared anywhere.

 

The only instance of it is: if ($msg==1) $message=CONFIG_SET_OPT."<br />".CONFIG_SET_OPT2."<br /><br />";

 

So how can it be 1 if its not been fetched from the url? Having said that its not the cause of the problem as I added in $msg = $_GET['msg']; above it to check and its still giving the same error.

 

... Sadie

Share this post


Link to post
Share on other sites

OK and now I've fixed it!

 

There was an infinite loop:

 

qbi_version file:

// Check if QB Import configured and installed

$resultqbc=mysql_query("SELECT * FROM ".TABLE_QBI_CONFIG) or die(header("Location: qbi_db.php?db_ver=0.00&qbi_vers=".QBI_VER));

if ($myrowqbc=tep_db_fetch_array($resultqbc) AND $myrowqbc["qbi_config_ver"]==QBI_VER) {

if ($myrowqbc["qbi_config_active"]!=1 AND $PHP_SELF!=DIR_WS_ADMIN."qbi_config.php") header("Location: qbi_config.php?msg=1");

} else {

header("Location: qbi_db.php?db_ver=".$myrowqbc["qbi_config_ver"]."&qbi_vers=".QBI_VER);

// Note: Absolutely no spaces allowed after the following php closing tag to avoid header error.

}

 

The first time you land on the qbi_config file it checks if the versions are valid, on mine they were, so it checks its on the right page, which is was, then it redirects to itself with the msg on the end. However it then runs the qbi_version file again before it does anything else!

 

So if we edit the qbi_config file at line 46 to read:

 

// Now read new configuration

$msg = $_GET['msg'];

if ($msg==1) {}

else require(DIR_WS_INCLUDES . 'qbi_version.php');

require(DIR_WS_INCLUDES . 'qbi_definitions.php');

require(DIR_WS_INCLUDES . 'qbi_page_top.php');

require(DIR_WS_INCLUDES . 'qbi_menu_tabs.php');

 

Instead of:

 

// Now read new configuration

require(DIR_WS_INCLUDES . 'qbi_version.php');

require(DIR_WS_INCLUDES . 'qbi_definitions.php');

require(DIR_WS_INCLUDES . 'qbi_page_top.php');

require(DIR_WS_INCLUDES . 'qbi_menu_tabs.php');

 

You eliminate the loop :D

 

Now I've not gone any further than this yet so I may come across something else but at least that page will load now without falling over.,

 

Hope this helps someone else :)

Sadie

Share this post


Link to post
Share on other sites

Sadie,

Now I've not gone any further than this yet so I may come across something else but at least that page will load now without falling over.,

 

Hope this helps someone else :)

Sadie

The automatic installation routine for 2.10c works 95% of the time, and for a few people has problems which I haven't tracked down. I re-wrote and improved the automatic installation system for QBI 3.x and that works 100% of the time.

 

Thanks,

Adam

Share this post


Link to post
Share on other sites

Hi Adam,

 

I think that the changes I mentioned above should hopefully stop the problems that have been reported by people previously as they eliminate the occurence of the infinite loop in the configuration page :)

 

Maybe worth integrating into the next release of v2 - unless you are releasing v3 under the GPL licence?

 

:) Sadie

Share this post


Link to post
Share on other sites
Hi Adam,

 

I think that the changes I mentioned above should hopefully stop the problems that have been reported by people previously as they eliminate the occurence of the infinite loop in the configuration page :)

 

Maybe worth integrating into the next release of v2 - unless you are releasing v3 under the GPL licence?

 

:) Sadie

I will look at this fix for version 2. The first version 3 release came out one year ago, is not under the GPL, and is a paid product. Version 4 will be ready in a few months. I am thinking of possibly releasing a version 4 Basic under the GPL and a version 4 Pro that is paid.

 

Thanks,

Adam

Share this post


Link to post
Share on other sites
Ken,

 

PHP must be 4.23 or later.

The only reason to create the customers iif is if you want to put old customers into QB for historical reasons. Otherwise, there is no reason to use this feature, as customers are always automatically exported with their orders.

 

Thanks,

Adam

 

Adam,

I am using PHP 4.4.1 and I cannot export my customers from osC to QB. I need to use this functionality because I do not want to import my sales from osC to QB. All the other exports work and create their respective files. Any help would be greatly appreciated.

 

TIA

Share this post


Link to post
Share on other sites
Adam,

I am using PHP 4.4.1 and I cannot export my customers from osC to QB. I need to use this functionality because I do not want to import my sales from osC to QB. All the other exports work and create their respective files. Any help would be greatly appreciated.

 

TIA

TIA,

 

I can't locate your earlier post. What happens when you try to create the customers file?

 

Thanks,

Adam

Share this post


Link to post
Share on other sites
TIA,

 

I can't locate your earlier post. What happens when you try to create the customers file?

 

Thanks,

Adam

 

The webpage qbi_create.php simply refreshes and that's it. No file dumped on the server, no prompt on the browser to save the file. Also no logs in error_log for apache.

 

Thanks for your help!

Share this post


Link to post
Share on other sites
The webpage qbi_create.php simply refreshes and that's it. No file dumped on the server, no prompt on the browser to save the file. Also no logs in error_log for apache.

 

Thanks for your help!

How many customers do you have that have placed orders? The products and orders downloads work OK?

 

Thanks,

Adam

Share this post


Link to post
Share on other sites
How many customers do you have that have placed orders? The products and orders downloads work OK?

 

Thanks,

Adam

 

10 customers, no orders from any of them, and the other "Download iif file" buttons work ok on that page.

 

TIA

Share this post


Link to post
Share on other sites
10 customers, no orders from any of them, and the other "Download iif file" buttons work ok on that page.

 

TIA

The customers download only includes customers who have placed orders. This is why it is not creating a file. Version 4 will give you the option to include customers without orders.

 

Thanks,

Adam

Share this post


Link to post
Share on other sites
The customers download only includes customers who have placed orders. This is why it is not creating a file. Version 4 will give you the option to include customers without orders.

 

Thanks,

Adam

 

Thanks for the clarification.

Share this post


Link to post
Share on other sites

Hello, I am new to OS commerce. Can someone please point me to where I can find detailed installation instructions for this Add in? I'd appreciate it.

Share this post


Link to post
Share on other sites
Hello, I am new to OS commerce. Can someone please point me to where I can find detailed installation instructions for this Add in? I'd appreciate it.

When you download the contribution the instructions are included in the zip package.

 

Thanks,

Adam

Share this post


Link to post
Share on other sites

Thanks. I thought that was the module itself. I see there are several instructions in there.

Share this post


Link to post
Share on other sites
The customers download only includes customers who have placed orders. This is why it is not creating a file. Version 4 will give you the option to include customers without orders.

 

Thanks,

Adam

 

Adam,

I tried to export my customers after they completed an order and it does the same thing. It does not dump a file on my UNIX server nor let me save the file via the browser. Any other thoughts?

 

TIA

Share this post


Link to post
Share on other sites
The customers download only includes customers who have placed orders. This is why it is not creating a file. Version 4 will give you the option to include customers without orders.

 

Thanks,

Adam

 

Adam,

I tried to export my customers after they completed an order and it does the same thing. It does not dump a file on my UNIX server nor let me save the file via the browser. Any other thoughts?

 

TIA

Share this post


Link to post
Share on other sites
Adam,

I tried to export my customers after they completed an order and it does the same thing. It does not dump a file on my UNIX server nor let me save the file via the browser. Any other thoughts?

 

TIA

Then you probably don't have permissions set correctly for the qbi_output and qbi_input directories. They should be set to 777. Certain control panels do not allow you to use 777 and may need 775.

 

Thanks,

Adam

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×