Forums / All Other Contributions/Addons / shipworks plugin

shipworks plugin

Started by delia on 7 Aug 2007, 11:50 PM · Views: 21,408

Results 1 to 20 of 88
7 Aug 2007, 11:50 PM
#1
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

shipworks plugin

I am working redoing the shipworks one file plugin. This file comes from Osc as just a drop in file into admin that the computer based shipworks program accesses.

I have converted osc contributions before but this has a new twist to it. In order to access the database I've included code/files but then run up against the illegal access problem. As Osc has no inbuilt admin/session management, they have made no allowances for this in the shipworks plugin.

I can't access the file any other way than directly accessing it on the web. The shipworks program only gives a generic error when encountering any problems. They have assured me that nothing in their program is cart specific so only the shipworks.php file needs changing.

So how in the world do I add in the admin/sessions management (I'm assuming it's like the cart itself) to that lone file?

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

8 Aug 2007, 8:35 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: shipworks plugin

I think that what you need is this in the other mod file:

require('includes/application_top.php'); 

Zen-Venom Get Bitten

8 Aug 2007, 2:26 PM
#3
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: shipworks plugin

Okay that did solve that problem but created another. Back to shipworks tech help. Thanks! (that was a duh - should have thought of that myself!)

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

22 Aug 2007, 3:56 PM
#4
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: shipworks plugin

well, that's a no go for sure. This requires specific output and cannot include any extraneous html. So I need to pick up only the database functions.

the oscommerce version only has these includes:

require('includes/configure.php');
require(DIR_WS_INCLUDES . 'database_tables.php');
require(DIR_WS_CLASSES . 'order.php');
require(DIR_WS_FUNCTIONS . 'database.php');
require(DIR_WS_FUNCTIONS . 'general.php');

I've changed to include the database_tables.php in the catalog/includes directory, but am I not right in assuming that I still need the db connection stuff that comes from the query_factory file?

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

22 Aug 2007, 4:09 PM
#5
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: shipworks plugin

To continue - the reason it looks this way is because this line:

$configuration_query = $db->Execute('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION);

gets this error message:
Call to a member function Execute() on a non-object

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

13 Sep 2007, 1:40 PM
#6
tmdelia avatar

tmdelia

New Zenner

Join Date:
May 2005
Posts:
69
Plugin Contributions:
0

Re: shipworks plugin

Any luck on porting this over? Any ETA of when it might be ready?

I'm willing to share in the development costs for porting this mod to ZC, and I know there are other Zenners out there that would be interested too.

13 Sep 2007, 1:42 PM
#7
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: shipworks plugin

Assuming that you call this inside a function, you have to declare $db as global:
global $db;

delia:

To continue - the reason it looks this way is because this line:

$configuration_query = $db->Execute('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION);

gets this error message:
Call to a member function Execute() on a non-object

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

13 Sep 2007, 2:57 PM
#8
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: shipworks plugin

Hi, Guys!

My client didn't want to spend much money to do this but I did start converting it to straight php without the zen functions in order to bypass the problems. He's paying only $50 since I thought it would be a easy conversion. Ha! And he's willing to go a little more money. Until I get done, I don't know how much more it will cost.

TMDelia - you want to send me a private message?

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

18 Sep 2007, 6:31 PM
#9
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: shipworks plugin

so I changed the config stuff to:

global $db;

	// Define all config values
	$configuration_query = $db->Execute('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION);
	
while (!$configuration_query->EOF) 
	{
	
		define($configuration->fields['cfgKey'], $configuration->fields['cfgValue']);
		$configuration_query->MoveNext();
		
	}

I get no errors and no data which may not be due to this but to something that comes after. Can someone tell me if the code above should work?

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

17 Oct 2007, 9:10 AM
#10
thomasw98 avatar

thomasw98

Zen Follower

Join Date:
Aug 2007
Location:
Eugene, OR
Posts:
166
Plugin Contributions:
0

Re: shipworks plugin

What does this mod actually do? I can not find any description in the downloads sections either...

17 Oct 2007, 1:44 PM
#11
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: shipworks plugin

interapptive.com

It's a cost per month shipping solution.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

18 Oct 2007, 4:32 AM
#12
thomasw98 avatar

thomasw98

Zen Follower

Join Date:
Aug 2007
Location:
Eugene, OR
Posts:
166
Plugin Contributions:
0

Re: shipworks plugin

Thanks. The useful link clarifies it!

20 Nov 2007, 8:32 PM
#13
kingbono avatar

kingbono

New Zenner

Join Date:
Apr 2006
Posts:
5
Plugin Contributions:
0

Re: shipworks plugin

Thanks for creating this mod. I saw it posted on 9/25 - does that mean you got it working?

I installed this mod and upon setting up the shipworks software I came across this error. "the 'meta' start tag on line '4' does not match the end tag of 'head'. Line 7, position 3." I think its an XML error.

Any ideas? I haven't touched the code.

20 Nov 2007, 9:27 PM
#14
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: shipworks plugin

such a lovely message! First, is your cart admin the original or has there been changes?

Secondly, what version of mysql, php and zen cart are you using?

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

20 Nov 2007, 11:13 PM
#15
kingbono avatar

kingbono

New Zenner

Join Date:
Apr 2006
Posts:
5
Plugin Contributions:
0

Re: shipworks plugin

The only change to the admin is that we are running Admin Profiles - or something similar.

MySQL 4.1.13
PHP Version: 4.3.10
Zen Cart 1.2.6

20 Nov 2007, 11:17 PM
#16
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: shipworks plugin

This is only tested with version 1.37 - if you haven't made any changes to core files and have done your overrides correctly, it would be worth upgrading - I strongly encourage you to do so.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

21 Nov 2007, 12:13 AM
#17
kingbono avatar

kingbono

New Zenner

Join Date:
Apr 2006
Posts:
5
Plugin Contributions:
0

Re: shipworks plugin

I would love to upgrade. Unfortunately this site has so many mods and changes it would take 6 months to upgrade.

When I go to the URL and enter shipworks.php?username=XXXXX&password=XXXXXX

I get back the message:

<?xml version="1.0" standalone="yes" ?>
  • <ShipWorks> <ModuleVersion>2.8.5</ModuleVersion>
  • <Admin> <Authenticated>true</Authenticated> </Admin> </ShipWorks>

so it doesn't appear to be the admin part. I also checked the logs and there are no errors there.

Could there be a port that is being blocked? If its not that it has to be my php version.

21 Nov 2007, 12:19 AM
#18
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: shipworks plugin

I really don't know. There could be a problem with the sql queries - that's why I asked about your mods but the database may be different. Can you export the sql structure file (no data) and upload it? I can compare it to the 1.37 structure to see.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

25 Nov 2007, 6:15 PM
#19
jayhos avatar

jayhos

New Zenner

Join Date:
Aug 2007
Posts:
8
Plugin Contributions:
0

Re: shipworks plugin

I received the same message after trying to download my orders. I'm trying to see now what files were changed in each of the mods. I will let everyone know.

25 Nov 2007, 6:39 PM
#20
jayhos avatar

jayhos

New Zenner

Join Date:
Aug 2007
Posts:
8
Plugin Contributions:
0

Re: shipworks plugin

I installed a native copy of zen without any mods on our server and received the same message. I'm not really sure what is going on.