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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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

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.