Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2005
    Posts
    154
    Plugin Contributions
    0

    help question 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!

  2. #2
    Join Date
    Aug 2005
    Posts
    154
    Plugin Contributions
    0

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

    Ok, I'm digging this one up because I really need to make progress on it.

    All I'm trying to accomplish is...
    Add a checkbox at checkout, that if checked, will add $x dollars to the shipping price, otherwise leave it the same.

    I've outlined how I think I need to go about this but need help on finding variables and files to make this happen. Appreciate any help I can get!

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

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

    This is not just a case of adding a "simple" checkbox (in itself quite simple though) but your complications come in with the FUNCTION that you want it to perform... ie: ADDING a cost to the overall consignment value... and if this service is TAXABLE, then you have an additional challenge.

    And if it was checked by mistake, what processes need be invoked to SUBTRACT the amount?

    If it were SIMPLE, then you would have had several replies already.

    When plotting these sorts of requirements, you not only have to think of how to ADD the variable, but also how to SUBTRACT it, and each is a separate function.

    Your best bet is to solicit commercial help.
    20 years a Zencart User

 

 

Similar Threads

  1. Adding a Residential Shipping checkbox in the Table Rate Module
    By davemehta in forum Addon Shipping Modules
    Replies: 3
    Last Post: 24 May 2011, 06:20 PM
  2. Table Rate - Shipping Module
    By Lazar in forum General Questions
    Replies: 4
    Last Post: 12 Feb 2011, 02:42 PM
  3. How to kill the table rate module when shipping to Canada?
    By samar777 in forum Addon Shipping Modules
    Replies: 7
    Last Post: 18 Sep 2010, 10:25 PM
  4. Adding A Second Shipping Table Rate
    By inklingsolutions in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 10 Feb 2010, 04:12 PM
  5. Clone a shipping module or define a new shipping attribute under table rate module?
    By meeven in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 4 Sep 2007, 04:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR