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. Link to comment https://forums.phpfreaks.com/topic/28641-disabling-problem/ 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? Link to comment https://forums.phpfreaks.com/topic/28641-disabling-problem/#findComment-131040 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. Link to comment https://forums.phpfreaks.com/topic/28641-disabling-problem/#findComment-131062 Share on other sites More sharing options...
Meatballsub Posted November 28, 2006 Author Share Posted November 28, 2006 *Bump* ;) Link to comment https://forums.phpfreaks.com/topic/28641-disabling-problem/#findComment-131541 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? Link to comment https://forums.phpfreaks.com/topic/28641-disabling-problem/#findComment-131557 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 :) Link to comment https://forums.phpfreaks.com/topic/28641-disabling-problem/#findComment-131602 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 Link to comment https://forums.phpfreaks.com/topic/28641-disabling-problem/#findComment-131611 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. Link to comment https://forums.phpfreaks.com/topic/28641-disabling-problem/#findComment-131614 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.