Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

FedEx - Web Services v9


greasemonkey

Recommended Posts

function & XML_unserialize(&$xml){

$xml_parser = &new XML();

$data = &$xml_parser->parse($xml);

$xml_parser->destruct();

return $data;

 

That is line 24 through 28, of the xml_5.php that was also giving me a deprecated error on line 25:

 

$xml_parser = &new XML();

 

Can anybody help me with it?

Edited by EJR914
Link to comment
Share on other sites

'products_ship_sep' => '',

'manufacturers_id' => '';

 

 

 

Parse error: syntax error, unexpected ';', expecting ')' in /home/content/66/9703366/html/catalog/admin/categories.php on line 405

 

This Parse error looks like it was caused by following the "Install.txt" file I believe. Man this stinks.

Link to comment
Share on other sites

The deprecated errors are easily fixed...

A Good alternative for eregi() is preg_match() with i modifier:

 

try replacing

// po box hack by JD
	    if (eregi("^P(.+)O(.+)BOX",$order->delivery['street_address']) ||eregi("^PO BOX",$order->delivery['street_address']) || eregi("^P(.+)O(.+)BOX",$order->delivery['suburb']) || eregi("^[A-Z]PO",$order->delivery['street_address']) || eregi("^[A-Z]PO",$order->delivery['suburb'])) {
    $this->quotes = array('module' => $this->title,
						  'error' => '<font size=+1 color=red><b>Federal Express cannot ship to Post Office Boxes.<b></font><br>Use the Change Address button above to use a FedEx accepted street address.'); }
// end po box hack by JD

 

with

// po box hack by JD
	    if (preg_match("/^P(.+)O(.+)BOX/i",$order->delivery['street_address']) || preg_match("/^PO BOX/i",$order->delivery['street_address']) || preg_match("/^P(.+)O(.+)BOX/i",$order->delivery['suburb']) || preg_match("/^[A-Z]PO/i",$order->delivery['street_address']) || preg_match("/^[A-Z]PO/i",$order->delivery['suburb'])) {
    $this->quotes = array('module' => $this->title,
						  'error' => '<font size=+1 color=red><b>Federal Express cannot ship to Post Office Boxes.<b></font><br>Use the Change Address button above to use a FedEx accepted street address.'); }
// end po box hack by JD

 

I havent tested that so please report back

-Dave

Link to comment
Share on other sites

This Parse error looks like it was caused by following the "Install.txt" file I believe. Man this stinks.

 

You possibly messed up the install, go back and check your installation, or restore and start over. Also note that the code is optimized for a 2.2RC2a shop and may need to be tweaked to work with 2.3+

Edited by Roaddoctor

-Dave

Link to comment
Share on other sites

I think this regex might help reduce the extra code in that line.

 

if (preg_match('/^P\.?\s?O\.?\s+?BOX/i', $order->delivery['street_address']) || (preg_match('/^P\.?\s?O\.?\s+?BOX/i', $order->delivery['suburb']))) {
  $this->quotes = array('module' => $this->title,
						'error' => '<font size=+2 color=red><b>Federal Express cannot ship to Post Office Boxes.<b></font><br>Use the Change Address button above to use a FedEx accepted street address.');
}

I'm not really a dog.

Link to comment
Share on other sites

I have a issue with this contribution, Currently shipping cost are showing high to low format. But I want to change it like (LOW to HIGH format) Is it possible, please help!

post-265579-0-05492500-1346309220_thumb.png

Edited by lachitmonstar

Lachit Kashyap

Link to comment
Share on other sites

Hi, I istall this contribution (http://addons.oscommerce.com/info/7977) sucessfully and it's 100% working. I have a issue with this contribution, Currently shipping cost are showing high to low format.

 

Priority Overnight $171.45

Fedex 2 Day $69.96

Fedex Express Saver $52.32

Fedex Ground (3 days) $27.54

 

But I want to change it like (LOW to HIGH format)

 

Fedex Ground (3 days) $27.54

Fedex Express Saver $52.32

Fedex 2 Day $69.96

Priority Overnight $171.45

 

Is it possible, please help!

 

Thanks in advance.

post-265579-0-70569400-1346309781_thumb.png

Lachit Kashyap

Link to comment
Share on other sites

Installed together with order editor giving a fatal error in the order editor (admin/edit_orders.php):

Fatal error: Call to a member function show_total() on a non-object in /includes/modules/shipping/fedexwebservices.php on line 127

Line 127 of fedexwebservices.php:

$totals = $order->info['subtotal'] = $_SESSION['cart']->show_total();

Anybody else having the same problem? Any ideas on how to fix it?

 

Thanks.

Link to comment
Share on other sites

Installed together with order editor giving a fatal error in the order editor (admin/edit_orders.php):

 

Line 127 of fedexwebservices.php:

$totals = $order->info['subtotal'] = $_SESSION['cart']->show_total();

Anybody else having the same problem? Any ideas on how to fix it?

 

Thanks.

 

See this:

http://www.oscommerce.com/forums/topic/375063-fedex-web-services-v9/page__view__findpost__p__1638019

-Dave

Link to comment
Share on other sites

Thank you for that, Dave. Now it's giving me another error:

Fatal error: Call to a member function get_products() on a non-object in /includes/modules/shipping/fedexwebservices.php on line 183

Line 183 of fedexwebservices.php:

$products = $_SESSION['cart']->get_products();

How do I go about fixing this?

 

Thanks.

Link to comment
Share on other sites

The deprecated errors are easily fixed...

A Good alternative for eregi() is preg_match() with i modifier:

 

try replacing

// po box hack by JD
		if (eregi("^P(.+)O(.+)BOX",$order->delivery['street_address']) ||eregi("^PO BOX",$order->delivery['street_address']) || eregi("^P(.+)O(.+)BOX",$order->delivery['suburb']) || eregi("^[A-Z]PO",$order->delivery['street_address']) || eregi("^[A-Z]PO",$order->delivery['suburb'])) {
	$this->quotes = array('module' => $this->title,
						  'error' => '<font size=+1 color=red><b>Federal Express cannot ship to Post Office Boxes.<b></font><br>Use the Change Address button above to use a FedEx accepted street address.'); }
// end po box hack by JD

 

with

// po box hack by JD
		if (preg_match("/^P(.+)O(.+)BOX/i",$order->delivery['street_address']) || preg_match("/^PO BOX/i",$order->delivery['street_address']) || preg_match("/^P(.+)O(.+)BOX/i",$order->delivery['suburb']) || preg_match("/^[A-Z]PO/i",$order->delivery['street_address']) || preg_match("/^[A-Z]PO/i",$order->delivery['suburb'])) {
	$this->quotes = array('module' => $this->title,
						  'error' => '<font size=+1 color=red><b>Federal Express cannot ship to Post Office Boxes.<b></font><br>Use the Change Address button above to use a FedEx accepted street address.'); }
// end po box hack by JD

 

I havent tested that so please report back

 

I happened to write the same thing, then came here to see if had been done.

My goal was to make it php 5.3 compliant (which lunarpages upgraded to the other day out of the blue)

Doesn't throw an error, but I have not tested a PO Box tho.

 

Ill try the regex down the line, more important to get the store back in service....

Link to comment
Share on other sites

Thank you for that, Dave. Now it's giving me another error:

 

Line 183 of fedexwebservices.php:

$products = $_SESSION['cart']->get_products();

How do I go about fixing this?

 

Thanks.

 

Try this and let me know the result

 

   // check for ready to ship field
   if (MODULE_SHIPPING_FEDEX_WEB_SERVICES_READY_TO_SHIP == 'true') { 
    if (isset($_SESSION['cart'])) {
	  $products = $_SESSION['cart']->get_products();
	  } else {
	  $products = $cart->contents;
  }

-Dave

Link to comment
Share on other sites

undo that change from post 314 and try this first

 

change

$totals = $order->info['subtotal'] || $_SESSION['cart']->show_total();

to

$totals = $cart->show_total();

 

There are so many versions of order editor... I use one of the pre-ajax versions so I'm not sure what will work for you.

Edited by Roaddoctor

-Dave

Link to comment
Share on other sites

here is what I did, and it works. the error is gone and the shipping methods are available.

change

$products = $_SESSION['cart']->get_products();

to

$products = $cart->get_products();

thanks for your help.

Link to comment
Share on other sites

Issues with latest version of OSC 2.2

 

DIsplays incorrect number of packages

 

Cart has 3 items in it. 2 of the 3 items have no weight set (free shipping) and qty 1

3rd item has qty of 4 and the weight stated is 33 lbs

 

On checkout the total says FedEx (Total items: 3 pcs. Total weight: 132 lbs.)

 

Thank you

Edited by kieran_mullen
Link to comment
Share on other sites

Issues with latest version of OSC 2.2

 

DIsplays incorrect number of packages

 

The output is stating how many "pieces" i.e. "Phisical packages, each with a ship label" that the order consists of. This is determined by your stores shipping configuration settings, your products weights and your "ready to ship" and/or "ship seperate" settings, and in some cases your dimension settings if they exist. Things could also be affected by the by the "free ship if weight 0" contribution, but I'm not familiar with that.

-Dave

Link to comment
Share on other sites

post the line

post the error

 

 

Warning: include(/home/bourques/public_html/includes/languages/english/modules/shipping/fedexwebservices.php) [function.include]: failed to open stream: No such file or directory in/home/bourques/public_html/admin/modules.php on line 129

 

Warning: include() [function.include]: Failed opening '/home/bourques/public_html/includes/languages/english/modules/shipping/fedexwebservices.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in/home/bourques/public_html/admin/modules.php on line 129

Link to comment
Share on other sites

Warning: include(/home/bourques/public_html/includes/languages/english/modules/shipping/fedexwebservices.php) [function.include]: failed to open stream: No such file or directory in/home/bourques/public_html/admin/modules.php on line 129

 

Warning: include() [function.include]: Failed opening '/home/bourques/public_html/includes/languages/english/modules/shipping/fedexwebservices.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in/home/bourques/public_html/admin/modules.php on line 129

 

Make sure you uploaded /includes/languages/english/modules/shipping/fedexwebservices.php

post admin/modules.php , line 129

-Dave

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