Shipping Costs for Products

coachcoach Member
in Help edited June 2008
I have set up a simple shopping cart page here: http://www.saranokelley.com/events/index.php?id=3

A majority of these products are service based products that don't require shipping. However, there are 3 products on there that are books that do require shipping.

How can I apply shipping for these products 3 products only?
Comments
  • brettbrett FoxyCart Team
    A few notes:
    - Your form validation to accept the terms could be put inside the fc_PreProcess() function. Return false if you want it to error and not display the cart.
    http://wiki.foxycart.com/docs:json

    - You could use the weight attribute, or the category attribute to do shippable items. Create a category for "shippable" or something, then set that category to the shipping method you'd like. Make your default category "no shipping". You might be able to set the weight of the non-shippable items to 0, which might bypass shipping. Offhand I'm not sure about that since we coded it a while back and I haven't had use for it personally, but if you need to keep everything in a single category (possibly for category quantity discounts), that might be worth trying.

    Let me know if that helps.
  • coachcoach Member
    So I have created the 2 categories before, but I guess the more specific question I was looking to get answered is: how do I make those products that are shippable a part of the shippable category and the other products a part of the no shipping category?
  • brettbrett FoxyCart Team
    Depends on whether you're using links or forms to add your products, but:
    http://wiki.foxycart.com/getting_started:adding_links_and_forms#standard_attributes

    So it'd just be <input type="hidden" name="category" value="shippable" /> if you're using a form, or &category=shippable if you're using a link.
  • coachcoach Member
    Hey Brett -

    I created the following and got the following error:

    category name: Shippable
    description: Shippable
    category code: DEFAULT_shippable


    if(document.chk.checkbox12.checked)
    inner = inner + '<input name="12:name" type="hidden" value="The Game: Win Your Life
    in 90 Days (Book & 15 Min Coaching Call)"></input><input name="12:price"
    type="hidden" value="29.95"></input><input type="hidden" name="Category"
    value="Default_shippable" /></input>';

    And this is the error I keep getting in the shopping cart, any guidance you could provide?

    ERROR:

    You must specify a name to add a product to your shopping cart.
  • brettbrett FoxyCart Team
    Well... you'd want to do "category", lowercase, and you'd want "12:category". But that's not the problem.

    I'm seeing the following in Firebug:
    unterminated string literal
    http://www.saranokelley.com/events/index.php?id=3
    Line 62

    I think the issue is that you have a line break where you shouldn't. If you want a line break but you want javascript to ignore it, use \\ at the end of the line... I think... been a while since I've done that.

    Once we fix that error, let's see if we still have the problem.
Sign In or Register to comment.