Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

BAXGlobal Shipping Module


kymation

Recommended Posts

I'm attempting to get this contrib working but keep getting the following error upon entering checkout_shipping.php:

 

2013 - Lost connection to MySQL server during query

 

select configuration_id, configuration_title, configuration_value from configuration where configuration_key = 'PAYMENT_CC_CRYPT_PATH'

 

[TEP STOP]

 

I checked the error log and got this:

<snip>

Error from cURL: Error [28]: connect() timed out!

BAX RESPONSE:

 

Any ideas? Thanks!

That's actually two separate errors; The first is a dropped connection to the database in admin/configuration.php, and the second is a dropped connection during the BAX data request. It looks like problems with your server or with its network connection.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

That's actually two separate errors; The first is a dropped connection to the database in admin/configuration.php, and the second is a dropped connection during the BAX data request. It looks like problems with your server or with its network connection.

 

Regards

Jim

 

So do you think I have everything on my end setup correctly? Basically, does it seem like the query is getting passed correctly? I'm trying to isolate the error to my end or server side. Thanks so much for your help!

Link to comment
Share on other sites

So do you think I have everything on my end setup correctly? Basically, does it seem like the query is getting passed correctly? I'm trying to isolate the error to my end or server side. Thanks so much for your help!

The query looks ok. You aren't getting any response, so I can't tell if it is even getting out to the BAX server. Along with the other error you showed form your log, I would guess that you have an overloaded server or a flaky/slow internet connection. It could also be hardware problems.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

The query looks ok. You aren't getting any response, so I can't tell if it is even getting out to the BAX server. Along with the other error you showed form your log, I would guess that you have an overloaded server or a flaky/slow internet connection. It could also be hardware problems.

 

Regards

Jim

 

I've got a whole bunch of add-ons installed so here is my product query:

 $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, p.products_price, p.products_weight, p.products_height, p.products_width, p.products_length, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

Does everything look alright there? Also, I didn't even think about it but I am chugging along on a 56k connection while my broadband is getting installed, however, the bax module works on other sites. I guess they might not be running such a huge query though haha.

Edited by spitznas
Link to comment
Share on other sites

Actually, this would be the modified query:

tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model, products_image, products_image_med, products_image_lrg, products_image_sm_1, products_image_xl_1, products_image_sm_2, products_image_xl_2, products_image_sm_3, products_image_xl_3, products_image_sm_4, products_image_xl_4, products_image_sm_5, products_image_xl_5, products_image_sm_6, products_image_xl_6, products_price, products_price1, products_price2, products_price3, products_price4, products_price5, products_price6, products_price7, products_price8, products_price9, products_price10, products_price11, products_price1_qty, products_price2_qty, products_price3_qty, products_price4_qty, products_price5_qty, products_price6_qty, products_price7_qty, products_price8_qty, products_price9_qty, products_price10_qty, products_price11_qty, products_qty_blocks, products_date_added, products_date_available, products_weight, products_length, products_width, products_height, products_status, products_tax_class_id, manufacturers_id) values 
('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_image_med']) . "', '" . tep_db_input($product['products_image_lrg']) . "', '" . tep_db_input($product['products_image_sm_1']) . "', '" . tep_db_input($product['products_image_xl_1']) . "', '" . tep_db_input($product['products_image_sm_2']) . "', '" . tep_db_input($product['products_image_xl_2']) . "', '" . tep_db_input($product['products_image_sm_3']) . "', '" . tep_db_input($product['products_image_xl_3']) . "', '" . tep_db_input($product['products_image_sm_4']) . "', '" . tep_db_input($product['products_image_xl_4']) . "', '" . tep_db_input($product['products_image_sm_5']) . "', '" . tep_db_input($product['products_image_xl_5']) . "', '" . tep_db_input($product['products_image_sm_6']) . "', '" . tep_db_input($product['products_image_xl_6']) . "', '" . tep_db_input($product['products_price']) . "', 
'" . tep_db_input($product['products_price1']) . "', '" . tep_db_input($product['products_price2']) . "', '" . tep_db_input($product['products_price3']) . "', '" . tep_db_input($product['products_price4']) . "', '" . tep_db_input($product['products_price5']) . "', '" . tep_db_input($product['products_price6']) . "', '" . tep_db_input($product['products_price7']) . "', '" . tep_db_input($product['products_price8']) . "', '" . tep_db_input($product['products_price9']) . "', '" . tep_db_input($product['products_price10']) . "', '" . tep_db_input($product['products_price11']) . "', '" . tep_db_input($product['products_price1_qty']) . "', '" . tep_db_input($product['products_price2_qty']) . "', '" . tep_db_input($product['products_price3_qty']) . "', '" . tep_db_input($product['products_price4_qty']) . "', '" . tep_db_input($product['products_price5_qty']) . "', '" . tep_db_input($product['products_price6_qty']) . "', '" . tep_db_input($product['products_price7_qty']) . "', '" . tep_db_input($product['products_price8_qty']) . "', '" . tep_db_input($product['products_price9_qty']) . "', '" . tep_db_input($product['products_price10_qty']) . "', '" . tep_db_input($product['products_price11_qty']) . "', '" . tep_db_input($product['products_qty_blocks']) . "',
now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "','" . tep_db_input($product['products_length']) . "', '" . tep_db_input($product['products_width']) . "', '" . tep_db_input($product['products_height']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");

 

;)

Link to comment
Share on other sites

I've got a whole bunch of add-ons installed so here is my product query:

<snip>

Does everything look alright there? Also, I didn't even think about it but I am chugging along on a 56k connection while my broadband is getting installed, however, the bax module works on other sites. I guess they might not be running such a huge query though haha.

I think that the 56k connection is probably choking. The BAX interface uses XML, so it's not exactly low bandwidth, and the BAX server is pretty slow. You might try increasing the connection timeout on your server to compensate for the slow speed. If that doesn't do it, you will probably need to wait for the high-speed connection to get this to work.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

I think that the 56k connection is probably choking. The BAX interface uses XML, so it's not exactly low bandwidth, and the BAX server is pretty slow. You might try increasing the connection timeout on your server to compensate for the slow speed. If that doesn't do it, you will probably need to wait for the high-speed connection to get this to work.

 

Regards

Jim

 

Thanks for all your help :D I'll have to contact my hosting company and ask about adjusting the timeout on php/mysql.

Link to comment
Share on other sites

  • 2 weeks later...

I have the module receiving quotes and such but it will not list them because I have a problem with my configuration. The module is saving the configuration values for the checkboxes as the text "Array" rather than a serialized or imploded version. How should it save the settings and what might be wrong?

Link to comment
Share on other sites

  • 6 months later...
  • 2 months later...
  • 1 month later...

I'm looking to install this mod on CRE pro B2B. I think the install will be the standard trial and error as with all modded installs. If anyone has made this install then any suggestions would be greatly appreciated.

 

Also,

 

I was wondering if the international shipping support been addressed with BAX global yet? I went to the web services page on BAX global : http://www.baxworld.com/WebServices/ratequote.asp and found a lot of useful information, or what appears to be useful information for a developer.

 

Just curious before I begin the daunting install tasks.

 

Thanks in advance!

Link to comment
Share on other sites

p.s. the link I provided above has links to the latest xml and soap tools. Thought it ,ight be useful.

 

Thanks again for the contribution.

Edited by Herkermer
Link to comment
Share on other sites

  • 6 months later...

I've uploaded a copy of version 2.0 of this contribution to the usual location. The module has been redesigned using a standard XML library. This should make it much easier to keep up with changes by BAX. I also changed the format of the returned data to fix changes by BAX, and changed the list of services to match as well. This release includes the modified files for the MVS Contribution as well as the standard osCommerce version.

 

It appears that this forum deleted my email notification for this thread, so I didn't know that anybody was posting here. If you still have any questions please repost. If I don't reply in a day or two, please send me a PM with a link to the thread.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

  • 7 months later...
I've uploaded a copy of version 2.0 of this contribution to the usual location. The module has been redesigned using a standard XML library. This should make it much easier to keep up with changes by BAX. I also changed the format of the returned data to fix changes by BAX, and changed the list of services to match as well. This release includes the modified files for the MVS Contribution as well as the standard osCommerce version.

 

It appears that this forum deleted my email notification for this thread, so I didn't know that anybody was posting here. If you still have any questions please repost. If I don't reply in a day or two, please send me a PM with a link to the thread.

 

Regards

Jim

 

Hi Jim,

 

I've downloaded this latest version of Bax Global. I am also trying to get my MVS to work. I wonder if I could impose on you and ask for assistance?

 

My specific problem here is twofold: BAX won't fully download. (I think this is because of the XML specifics. I'm running on php 4.4.7 which means I need to amend my .htaccess file as you described in your BAX Global. I am, however, uncertain of the exact wording and how it is placed within this file. Here are the errorlogs:

PHP Fatal error:  Call to undefined function:  sort_order() in /xxxx/oscommerce/admin/vendor_modules.php on line 140
PHP Warning:  Call-time pass-by-reference has been deprecated - argument passed by value;  If you would like to pass it by reference, modify the declaration of xml_parse().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file.  However, future versions may not support this any longer.  in /xxxx/oscommerce/admin/includes/classes/xml.php on line 73
PHP Warning:  Call-time pass-by-reference has been deprecated - argument passed by value;  If you would like to pass it by reference, modify the declaration of xml_parse().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file.  However, future versions may not support this any longer.  in /xxxx/oscommerce/admin/includes/classes/xml.php on line 73
PHP Warning:  Call-time pass-by-reference has been deprecated - argument passed by value;  If you would like to pass it by reference, modify the declaration of xml_parser_free().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file.  However, future versions may not support this any longer.  in /xxxx/oscommerce/admin/includes/classes/xml.php on line 68
PHP Warning:  Call-time pass-by-reference has been deprecated - argument passed by value;  If you would like to pass it by reference, modify the declaration of xml_set_character_data_handler().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file.  However, future versions may not support this any longer.  in /xxxx/oscommerce/admin/includes/classes/xml.php on line 66
PHP Warning:  Call-time pass-by-reference has been deprecated - argument passed by value;  If you would like to pass it by reference, modify the declaration of xml_set_element_handler().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file.  However, future versions may not support this any longer.  in /xxxx/oscommerce/admin/includes/classes/xml.php on line 65
PHP Warning:  Call-time pass-by-reference has been deprecated - argument passed by value;  If you would like to pass it by reference, modify the declaration of xml_set_object().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file.  However, future versions may not support this any longer.  in /xxxx/oscommerce/admin/includes/classes/xml.php on line 64

 

I've tried to get my webhost to help me but they refuse and defer to "oscommerce".

 

My other problem is in vendor shipping (MVS). Can't get the shipping modules to activate when I'm in admin/vendormanagement. Just a list of shipping options with ability to get one to show the arrow but nothing on the side of the page like the rest of oscommerce (where you activate or edit, etc.) (The first errorlog entry may be a part of this problem.==vendorsmodules line 140.)

 

Any help here?

 

I really would appreciate some help here. I know you are the man. Heartfully thank you for all your contributions.

 

Larry

Link to comment
Share on other sites

Oh, yea,

 

Here's what was pasted into the .htaccess file. at the bottom of the page on its own lonesome line.

 

php_flag allow_call_time_pass_reference on

 

 

Doesn't seem to make a difference if it's there or not.

 

Larry

Link to comment
Share on other sites

The warning messages indicate that call-time pass-by-reference is disabled. This is unusual in PHP 4.x; the default is to allow it. The default is changed to disallow in PHP 5.x. The line that was added to your .htaccess file should fix this. If that line makes no difference, your host has disabled the ability to override settings in .htaccess, as well as having an unusual setup for PHP. Fortunately this problem is easily fixed. In catalog/includes/modules/vendors_shipping/bax.php, find this code (Lines 14ff)

// Incorporate the XML conversion library 
 if (PHP_VERSION >= '5.0.0') { // PHP 5 does not need to use call-time pass by reference
require_once (DIR_WS_CLASSES . 'xml_5.php');
 } else {
require_once (DIR_WS_CLASSES . 'xml.php');
 }

and change it to this

// Incorporate the XML conversion library 
//  if (PHP_VERSION >= '5.0.0') { // PHP 5 does not need to use call-time pass by reference
require_once (DIR_WS_CLASSES . 'xml_5.php');
//  } else {
//	require_once (DIR_WS_CLASSES . 'xml.php');
//  }

That will force the module to use the PHP 5 version of the library, which has already been modified to take care of this issue.

 

Now for the hard part. Well, maybe. I'm hoping that the fatal error is a result of the above bug, although that's a faint hope. If you are still getting the error after the above fix, please post the error here and I'll try again.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

The warning messages indicate that call-time pass-by-reference is disabled. This is unusual in PHP 4.x; the default is to allow it. The default is changed to disallow in PHP 5.x. The line that was added to your .htaccess file should fix this. If that line makes no difference, your host has disabled the ability to override settings in .htaccess, as well as having an unusual setup for PHP. Fortunately this problem is easily fixed. In catalog/includes/modules/vendors_shipping/bax.php, find this code (Lines 14ff)
// Incorporate the XML conversion library 
 if (PHP_VERSION >= '5.0.0') { // PHP 5 does not need to use call-time pass by reference
require_once (DIR_WS_CLASSES . 'xml_5.php');
 } else {
require_once (DIR_WS_CLASSES . 'xml.php');
 }

and change it to this

// Incorporate the XML conversion library 
//  if (PHP_VERSION >= '5.0.0') { // PHP 5 does not need to use call-time pass by reference
require_once (DIR_WS_CLASSES . 'xml_5.php');
//  } else {
//	require_once (DIR_WS_CLASSES . 'xml.php');
//  }

That will force the module to use the PHP 5 version of the library, which has already been modified to take care of this issue.

 

Now for the hard part. Well, maybe. I'm hoping that the fatal error is a result of the above bug, although that's a faint hope. If you are still getting the error after the above fix, please post the error here and I'll try again.

 

Regards

Jim

 

Jim,

Thank you VERY MUCH for your personal assistance!

 

I have changed the file: catalog/includes/modules/vendor_shipping/bax.php

as you indicated I should. Unfortunately this has NOT resolved the issue. I still get the following in the errorlog:

 

PHP Fatal error: Call to undefined function: sort_order() in /XXXX/oscommerce/admin/vendor_modules.php on line 139

 

My admin / vendor / manage page still doesn't have the right column. I do suppose it's supposed to be there. The list of shipping modules does show up, but on the right side normally it would have the ACTIVATE, EDIT, DELETE commands and boxes wouldn't it?

 

Therefore I still cannot activate any of the shipping models within vendor shipping.

 

Again,

Thank you for your attention.

 

Larry

Link to comment
Share on other sites

Jim,

Thank you VERY MUCH for your personal assistance!

 

I have changed the file: catalog/includes/modules/vendor_shipping/bax.php

as you indicated I should. Unfortunately this has NOT resolved the issue. I still get the following in the errorlog:

 

PHP Fatal error: Call to undefined function: sort_order() in /XXXX/oscommerce/admin/vendor_modules.php on line 139

<snip>

I was afraid of that. The function does in fact exist, so that's not the problem. Please check that your /admin/vendor_modules.php does contain the following at Line 139

		if ($module->sort_order($vendors_id) > 0) {

You could also try (temporarily) removing the BAX module. If none of this works, my only guess would be that your hosting provider has another weird setting in their PHP config that is preventing this from working. It may be time to look for a new host for your store.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

I was afraid of that. The function does in fact exist, so that's not the problem. Please check that your /admin/vendor_modules.php does contain the following at Line 139
		if ($module->sort_order($vendors_id) > 0) {

You could also try (temporarily) removing the BAX module. If none of this works, my only guess would be that your hosting provider has another weird setting in their PHP config that is preventing this from working. It may be time to look for a new host for your store.

 

Regards

Jim

 

 

Jim,

I want to thank you for your willingness to help. I do very much appreciate your feedback.

I can't get over the feeling that this all may be due to my inability to merge several contributions. All on one page admin/categories . I don't know why. But ignorant me. I'll keep on trying.

 

Thanks again,

Larry

Link to comment
Share on other sites

  • 1 year later...

BAX Global is apparently no longer in business, so this module is now an orphan. If anyone is still using this, or trying to, I suggest using the Freightquote module.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

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