Meatballsub Posted November 27, 2006 Share Posted November 27, 2006 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. Quote Link to comment Share on other sites More sharing options...
SharkBait Posted November 27, 2006 Share Posted November 27, 2006 Does your function handle reversing the disabled setting? Quote Link to comment Share on other sites More sharing options...
Meatballsub Posted November 27, 2006 Author Share Posted November 27, 2006 <---- PHP Nub.That is probably the problem, but I have no idea how to go about fixing that. The only code I am using is what is shown above. Quote Link to comment Share on other sites More sharing options...
Meatballsub Posted November 28, 2006 Author Share Posted November 28, 2006 *Bump* ;) Quote Link to comment Share on other sites More sharing options...
SharkBait Posted November 28, 2006 Share Posted November 28, 2006 Anyway of showing us what the function [code=php:0] DisableDeliverymethod() [/code] does? Quote Link to comment Share on other sites More sharing options...
Meatballsub Posted November 28, 2006 Author Share Posted November 28, 2006 Okay initially, there are 3 options for delivery methods when you check out on my site:Postal ServiceFedexUPS (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 :) Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted November 28, 2006 Share Posted November 28, 2006 Please post the code for the function DisableDeliverymethod()Ken Quote Link to comment Share on other sites More sharing options...
Meatballsub Posted November 28, 2006 Author Share Posted November 28, 2006 Hmm....i'm thinking that the function code might be something that has to be retrieved through my webhost, because I can't find it anywhere. I'll get back to you guys with that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.