The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Shipping Costs for Products

coachcoach Member
in Help edited June 2008
I have set up a simple shopping cart page here:

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?
  • 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.

    - 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:

    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

    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?


    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
    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.