Jump to content

Disabling Problem


Meatballsub

Recommended Posts

Hello,

I am having a problem with some PHP code on my website. Here is the code:

[code]if (get_orderinfo_shipping_field("country"))
  $country= get_orderinfo_shipping_field("country");
else
  $country= get_orderinfo_field("country");

if ($country = "CA") {
  DisableDeliveryMethod("Fedex Ground");
DisableDeliveryMethod("Postal Service");
}[/code]


Basically, when a customer enters a Canadian address for their invoice address, it is supposed to take away the options "Fedex" and "Postal Service" and force the user to accept UPS (Canadian) delivery option. The Code DOES take away the options, but when I change the invoice address to US, the disabled options from before are still disabled, when they should be visible now.

Any ideas? Thanks in advance.
Link to comment
https://forums.phpfreaks.com/topic/28641-disabling-problem/
Share on other sites

Okay initially, there are 3 options for delivery methods when you check out on my site:

Postal Service
Fedex
UPS (canada)

When the function is used, it takes away the Fedex/Postal Service options, leaving the customer with just the UPS choice. This is all fine and dandy, but when I try and use a  US address, the Fedex/Postal service options are still hidden.

If this doesn't help, then I will try and explain a little better. Thanks for looking :)
Link to comment
https://forums.phpfreaks.com/topic/28641-disabling-problem/#findComment-131602
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.