Forums / Addon Shipping Modules / Adding a Residential Shipping checkbox in the Table Rate Module

Adding a Residential Shipping checkbox in the Table Rate Module

Started by davemehta on 16 May 2011, 5:59 PM · Views: 1,694

Results 1 to 4 of 4
16 May 2011, 5:59 PM
#1
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Adding a Residential Shipping checkbox in the Table Rate Module

I have modified the table.php shipping module to calculate shipping costs based a percentage of product price for each category. Now I need one more thing... I want to add a checkbox (on the estimator page as well as the checkout shipping page) that can be checked if the buyer has a residential shipping address. Then my code will add a predetermined surcharge for the residential address.

I am using the Table Rate module so I don't need any UPS or FedEx stuff, just a simple checkbox so they can click it if they want to signify that we are shipping to a residential address.

I imagine I need to set a global variable (ie: RESIDENTIAL_ADDRESS) that will store if they choose the residential address checkbox either from the shipping estimator screen or the checkout shipping screen and then my code in table.php can check that and add the appropriate amount to the total shipping cost variable ($this->quotes: 'cost' => $shipping).

Now I'm foggy on how to actually do this though. I know I'd edit the template files to add the checkbox but how do I actually track/store the varaiable?

Thanks for the help!

18 May 2011, 1:52 AM
#2
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Re: Adding a Residential Shipping checkbox in the Table Rate Module

Any ideas guys? I wouldn't think this would be too difficult since it's just storing the variable and then referencing it when needed... but have no clue how to go about it!

18 May 2011, 5:41 AM
#3
marco_b avatar

marco_b

New Zenner

Join Date:
Dec 2006
Location:
Australia
Posts:
94
Plugin Contributions:
0

Re: Adding a Residential Shipping checkbox in the Table Rate Module

That feature is specialised, This isn't a php/web design forum as such. I can not teach you how to program here, It's to support the modules but doesn't cover how to modify the checkout process.

Your changes require edits outside of the shipping module code to be implemented properly. There - I already gave you a head start!

There is a place for this sort of thing ;)

24 May 2011, 5:20 PM
#4
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Re: Adding a Residential Shipping checkbox in the Table Rate Module

Ok, so seems I got the wrong forum category then. Can an admin move this to the "General Quesitons" category? I really need to figure this out and I don't think it would be that difficult if I knew variable names and how to track them. Thanks!