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.

Cart Questions

stkstk Member
in Help edited May 2014
Hello,

We're building out our first ecommerce product page, which will be a single webpage with 7 similar products which will be their own category (as we will be allowing free shipping after a minimum number are ordered). The construction page can be seen here - https://nicolpawn.ca/pawn.php/spirit-beads - (the idea being a "quantity" selection to the right of each of the seven different products under "Own the Legends".

It would probably be easier to pick a single product for a first effort, but these spirit beads are perennial sellers, so this is what the client wants.

So I have two questions:

1) Is it possible to build out a form that allows a customer to select a number from each of the seven products, then have one "buy now" button that passes those quantities to the cart all at once? (i.e., select quantities from 7 products, THEN hit a -single - "buy now" button) If yes, what's the basic format for that form?

2) Is it possible to add items to the cart without launching the cart? (i.e., hitting the "add to cart" adds the item to the cart, but the overlay doesn't pop up, just have the - forget the term - but I'll call it "the persistent 'checkout now' link" show a bump-up of the number of items in the cart?

Thanks in advance for your help.
Tagged:
Comments
  • fc_adamfc_adam FoxyCart Team
    @stk,

    Yes on both counts!

    1) For the form, something like this would work:
    <form>
    	<input type="hidden" name="1:name" value="Product 1" />
    	<input type="hidden" name="1:price" value="5" />
    	<input type="text" name="1:quantity" value="0" />
    	<input type="hidden" name="2:name" value="Product 2" />
    	<input type="hidden" name="2:price" value="10" />
    	<input type="text" name="2:quantity" value="0" />
    	<input type="hidden" name="3:name" value="Product 3" />
    	<input type="hidden" name="3:price" value="10" />
    	<input type="text" name="3:quantity" value="0" />
    </form>
    


    2) What you're talking about we generally call 'silently adding to the cart', check out this snippet for some notes on that: https://wiki.foxycart.com/snippets/add_to_cart_form/add_products_without_colorbox
  • stkstk Member
    @fc_adam,

    PERFECT and THANK YOU!

    It was the "built by developers for developers" bit that sold me on FC and so far, I have not been disappointed.
  • stkstk Member
    edited May 2014
    @fc_adam

    Ended up creating the following today, based on your input. (Just following up and pasting - in case there's an obvious error - and to help anyone else that's seeking something similar).

    I assume that if we have another page that has a similar layout, we don't need to worry about indexing (i.e., we can start the product names at 1:NAME again and not have to keep track and start at 8:NAME?)

    (Oh ... and yes, I've not yet added/styled a submit button. ;) )

    .
    .
    .
    <form class="foxycart" action="http://nicolpawn.foxycart.com/cart"; method="post">
        <fieldset>
          <div>
      
            <span class="wolf">
              <input type="hidden" name="1:name" value="spirit-bead-wolf"></input>
              <input type="hidden" name="1:category" value="spirit_beads"></input>
              <input type="hidden" name="1:price" value="34.99"></input>
              <label>Wolf QTY</label>
              <select name="1:quantity">
                <option>0</option>
                <option>1</option>
                <option>2</option>
                <option>3</option>
                <option>4</option>
                <option>5</option>
                <option>6</option>
                <option>7</option>
                <option>8</option>
                <option>9</option>
                <option>10</option>
              </select>
            </span>
    
            <span class="whale">
              <input type="hidden" name="2:name" value="spirit-bead-whale"></input>
              <input type="hidden" name="2:category" value="spirit_beads"></input>
              <input type="hidden" name="2:price" value="34.99"></input>
              <label>Whale QTY</label>
              <select name="2:quantity">
                <option>0</option>
                <option>1</option>
                <option>2</option>
                <option>3</option>
                <option>4</option>
                <option>5</option>
                <option>6</option>
                <option>7</option>
                <option>8</option>
                <option>9</option>
                <option>10</option>
              </select>
            </span>
    
            <span class="eagle">
              <input type="hidden" name="3:name" value="spirit-bead-eagle"></input>
              <input type="hidden" name="3:category" value="spirit_beads"></input>
              <input type="hidden" name="3:price" value="34.99"></input>
              <label>Eagle QTY</label>
              <select name="3:quantity">
                <option>0</option>
                <option>1</option>
                option>2
                <option>3</option>
                <option>4</option>
                <option>5</option>
                <option>6</option>
                <option>7</option>
                <option>8</option>
                <option>9</option>
                <option>10</option>
              </select>
            </span>
    
            <span class="raven">
              <input type="hidden" name="4:name" value="spirit-bead-raven"></input>
              <input type="hidden" name="4:category" value="spirit_beads"></input>
              <input type="hidden" name="4:price" value="34.99"></input>
              <label>Raven QTY</label>
              <select name="4:quantity">
                <option>0</option>
                <option>1</option>
                <option>2</option>
                <option>3</option>
                <option>4</option>
                <option>5</option>
                <option>6</option>
                <option>7</option>
                <option>8</option>
                <option>9</option>
                <option>10</option>
              </select>
            </span>
    
            <span class="h-bird">
              <input type="hidden" name="5:name" value="spirit-bead-hum-bird"></input>
              <input type="hidden" name="5:category" value="spirit_beads"></input>
              <input type="hidden" name="5:price" value="34.99"></input>
              <label>H.Bird QTY</label>
              <select name="5:quantity">
                <option>0</option>
                <option>1</option>
                <option>2</option>
                <option>3</option>
                <option>4</option>
                <option>5</option>
                <option>6</option>
                <option>7</option>
                <option>8</option>
                <option>9</option>
                <option>10</option>
              </select>
            </span>
    
            <span class="bear">
              <input type="hidden" name="6:name" value="spirit-bead-bear"></input>
              <input type="hidden" name="6:category" value="spirit_beads"></input>
              <input type="hidden" name="6:price" value="34.99"></input>
              <label>Bear QTY</label>
              <select name="6:quantity">
                <option>0</option>
                <option>1</option>
                <option>2</option>
                <option>3</option>
                <option>4</option>
                <option>5</option>
                <option>6</option>
                <option>7</option>
                <option>8</option>
                <option>9</option>
                <option>10</option>
              </select>
            </span>
    
            <span class="frog">
              <input type="hidden" name="7:name" value="spirit-bead-frog"></input>
              <input type="hidden" name="7:category" value="spirit_beads"></input>
              <input type="hidden" name="7:price" value="34.99"></input>
              <label>Frog QTY</label>
              <select name="7:quantity">
                <option>0</option>
                <option>1</option>
                <option>2</option>
                <option>3</option>
                <option>4</option>
                <option>5</option>
                <option>6</option>
                <option>7</option>
                <option>8</option>
                <option>9</option>
                <option>10</option>
              </select>
            </span>
          </div>
        </fieldset>
      </form>
    </div>
    
  • fc_adamfc_adam FoxyCart Team
    @stk,

    Yep - that looks great.

    You don't need to reset the number prefix - it's only within each individual form that you need to worry about it - so you could have two forms on the same page that both start at 1 without any issue. Just as long as each product within an individual form starts with a unique number.
  • stkstk Member
    edited May 2014
    Trying to grok the volume discount syntax. We want to offer free shipping if customers purchase 3 or more spirit beads. (Not talked to the owner about larger volume discounts, but just using this as a basis to get started).

    From the manual:

    Examples:
    Scenario: Buy two products, take $2 off of both.
    Method: discount_quantity_amount
    Logic: allunits|2-2

    and using the snippets page I get:

    Discount Name = Free shipping on orders of 3 or more!

    Scenaio - Buy 3 or more and get free shipping
    Method: discount_quantity_amount
    Logic: allunits|3-8 (based on $8 flat-rate per shipment)

    Would this be the correct logic for this scenario, or am I missing something (e.g., does this only cover a 3-count purchase, but nothing greater?)

    Alternatively, is it possible to combine methods (i.e., cover a more complex scenario like $8 flat-rate shipping for first two ordered, free shipping for three and free shipping + percentage off for 4+?)

    Thanks!
  • fc_adamfc_adam FoxyCart Team
    @stk,

    So your second example there from the snippets will discount $8 if there are 3 or more products - nothing more. If you want to have those discounts tiered, you can add in more tiers, like "allunits|3-8|5-12", that would discount then by $12 instead after 5 products instead of $8.

    You can't mix amount and percentages though - so you'd either need to use flat rate amounts or percentages.
  • stkstk Member
    @fc_adam,

    Thanks for clarifying. Appreciate it. ;)
  • stkstk Member
    edited May 2014
    The logic: allunits|3-8 takes off 8/3 for each of the first 3 items and then 16/4, 24/5 ... (n-2)*8/n ... which is not exactly what we wanted.

    We were hoping to offer FREE shipping to anyone buying 3 or more units.

    So, at the end of the day, we did re-think how we applied the discounts, but have some suggestions:

    1) There's currently no "Free Shipping" discount option (i.e., it would be nice to have similar logic that's allowed for discounts, but tallied up in the shipping cost ... so shipping shows $0 ... or so there's a line item just below shipping that shows "shipping discount = -(price of shipping)"

    2) In order to allow $8 off for purchases of 3 items or more requires some fairly lengthy logic statements ( i.e., allunits|3-8|4-8|5-8|6-8|7-8 ... n-8 ) ... seems that this could be allowed with some additional syntax like "allunits|3-8+" (or something).

    Hope this helps (and if there's a way to allow free shipping that shows "shipping == 0" ... please let me know, as my client was pretty disappointed that the discounts didn't show up in the subtotal area as "(whatever) discount = -discount") ... instead, it's all shown as a "per-unit" thing. Need some more flexibility here.

    Cheers,
    -Scott
  • fc_adamfc_adam FoxyCart Team
    @stk,

    Currently we don't support discounts that apply to shipping - but it's definitely something we're planning for - it's oft requested and you can add a vote for it here: http://requests.foxycart.com/forums/4162-general-requests/suggestions/34441-free-shipping-coupon-code - that will update you when we make any progress on it's integration.

    In terms of your shipping logic, the allunits call isn't repeating as much as it's applying to each tier after three - sorry for the confusion on my part. I got confused between a couple discount types. The allunits is working as it's expected to, starting from 3 products, each product is discounted by $8.

    What you'll actually want to use is the 'single' discount type. So single|3-8 will take a single $8 if 3 or more products are ordered.

    Again - sorry for leading you astray!
  • stkstk Member
    @FC_adam -

    Thanks! I'll definitely put in a vote for shipping discounts (and maybe coerce my client into getting a forum account so we can stuff the ballot on that one! LOL ... he was a tad disappointed to discover there was no way to "zero" the shipping amount, which would be an "expected" result for any "free shipping" offers).

    I'll have another look at the discount logic. Can single be used in tiers? (i.e., single|3-8|10-20 ... or $8 off for 3-9 units purchased and $20 off for 10+ units?)

    Also as an aside, I notice last week that using the "magi-cache" (or whatever it's called for templating the shopping cart) has erroneously modified some of the links. (I assume the problem is that I've specified a [ href="/folder/file.php" ] instead of a fully-qualified [ href=" http://domain.com/folder/file.php ] location. While it's not a huge deal to swipe the template code into an editor and fix those that are incorrect - (they link to a 404 on https://domain.foxycart.com/folder/file.php) - I'm wondering if this is an intended thing, or a bug?

    (I'm not sure if I've got a "base" meta-tag specified or not, but it just seems odd that it would try to utilize a foxycart domain).

    Thanks in advance for your help ... I'm gradually learning to fly the plane a tad better!
  • fc_adamfc_adam FoxyCart Team
    I'll have another look at the discount logic. Can single be used in tiers? (i.e., single|3-8|10-20 ... or $8 off for 3-9 units purchased and $20 off for 10+ units?)

    Yup - what that will mean is if you order 8 products, $8 will be taken off, but if you order 11, $20 will be taken off. It's not a cumulative discount, so 11 products wouldn't equal a $28 discount.

    I'm wondering if this is an intended thing, or a bug?

    Caching PHP files isn't currently supported with automagicache - what exactly are you trying to include there? If you rewrite the links to still point to your own domain - if that's not secured behind an SSL certificate as well, then customers will see an insecure page warning from their browser, which is not something you'll want displayed on your checkout.
  • stkstk Member
    @fc_adam

    Here's where we're at (this will be a fairly lengthy question/discussion and I've broken it down into 3 distinct parts):

    1) Use of automatic coupons;
    2) Shipping logic (specifically between categories);
    3) FC 2.0 & shipping logic changes (if any);

    ============

    (1) Auto coupons: - So following up with your suggestion of using "single", we did that using (single|5-10|10-15), so thereby allowing 10% off for purchases of 5-9 and 15% for anything over 10.

    My client @nicolpawn, still wanted to allow free shipping for 3 or more purchases, so we made an automatic coupon that kicked it at 3+ units. The auto-coupon seems like a powerful tool and we will have to explore its use more thoroughly, as it looks like it may be applied elegantly and automatically for a variety of situations.

    However, we noticed a problem. In using an automatic coupon, it correctly kicked in when the situation arose and we were able to modify the text to something meaningful. However, it also sparked off a "Add Coupon Code" field (for which, we have no available coupon codes).

    (FWIW, our plan is NOT to use coupon codes - other than automatically-applied codes - as this we see as something that leads to cart abandonment (people spend time searching for a coupon code that's either not available or expired, or abandon the cart because they're not getting a perceived discount).

    What is the best way to (a) [best] defeat the "Add a Coupon Code" field for all auto-generated coupon code purchases (and only show it if there is really a coupon code to add); or (b) [sufficient] defeat the "Add a Coupon Code" field permanently?

    =============

    (2) Shipping Logic - So far, we've only been playing with one product and one category. In the process of moving forward with more products and flat-rate shipping (our only current option, since there's no live-ship tie-in with Canada Post) ... we have run into a bit of a snag.

    We read the shipping Haiku and some of discussion on the Foxy Cart page and realized - we ARE the mattress store. We are beginning to realize that shipping will create a huge problem for us and we thought we'd explain a few of the scenarios and then ask you to point us in the right direction (especially in light of a soon-to-be set free v2.0 on the horizon).

    Our specific concerns regard flexibility and control for shipping specifically BETWEEN categories.

    Because of the variety of products we carry and their unique shipping requirements and needs, we MUST HAVE the ability to apply shipping logic that presents the buyer with an intelligently-computed shipping estimate that closely matches the real-world cost. Understanding that shipping is tad of a moving target (because rates change & various packages can be combined to help reduce cost), our goal is to "not scare away customers" with an overly large shipping cost, nor cut into margins with overly underestimated shipping costs.

    Here are a few of the items we will sell and their unique needs:

    a) We started with silver spirit beads, which sell for $35 and ship for $8. However, as they are small and relatively light, shipping multiples isn't a problem, so it's pretty much $8 to ship as many as anyone wants, anywhere in N.A.

    b) We also sell diamond rings. These too are small and light, but are typically much more expensive and generally not bought in multiples, but do require tracking numbers and insurance.

    c) Jewellery is one thing, but expensive or not, it all shares one thing in common - they're small and light. But we also sell paintball gear. Consider paintballs themselves, which we sell in individual bags (so many balls per bag) or in whole boxes. A box of paintballs weighs about 10 pounds, so one can see that paintball shipping costs would trump spirit beads if both were purchased (as we could add the spirit beads to the balls and ship as one).

    d) We also sell guitars, which are relatively bulky, fairly light, but extremely delicate and have to be packaged accordingly. Again, depending on what is purchased with a guitar (extra strings, picks, music stand) ... packaging can be combined - or not - depending.

    e) We also sell bulky, heavy musical equipment (think Peavey amplifiers and speakers) and their weight can be up to 40-50 pounds. (We don't expect to sell many online, but you never know).

    f) We also sell some one-off items that would require special packaging and handling (think Harley Davidson motorcycle), which would likely require a shipping quote to be provided to the customer (so there would need to be some kind of facility for this in the cart ... something like "sale contingent upon acceptance of a shipping quote" ... not sure the best way here.

    g) It's also come up that some customers may like to leave special instructions with their order and we were wondering if FC had any widget that added a text box to the checkout for any special delivery or order requirements. (e.g., "Deliver to unit behind main house", etc.)

    h) One of the things we thought might help to alleviate the complexities of pre-planning for multiple, unknown-in-advance, odd-combinations-of-purchases - many of which will likely never happen - would be to have a policy in place of "Free shipping on orders of $150 or more" (plus exceptions - e.g., boxes of paintballs, peavey amplifiers and speakers & one-off custom-shipped items).

    I read your post to my client and am aware there are a number of various code snippets that add certain functionality. I was hoping, with your experience and the above discussion, get me jump-started on what's possible (and not possible) and perhaps point me in the right direction to specific tools and/or snippets that are available to make these viable.

    Which leads to my next question:

    =============

    (2) Shipping in V2.0 - In your reply to @Nicolpawn, you said, "Shipping is restrictive in some aspects - and is something we're actually in the process of completely rebuilding from scratch. So a big update is coming in that regard in the future."

    Is this the V2.0 future or a post-V2.0 future?

    What kind of changes to shipping can we expect from v2.0 (and would we be best waiting to move forward until the beta is out ... i.e., will v2.0 handle v1.1 snippet customization or will all that work need be revisited and changed?).

    And of course, any question about v2.0 must be accompanied with the requisite, "When will 2.0 be released into the wild as a beta beast?" LOL

    Thanks in advance for your help in valuable input on this sticky shipping situation!

    Cheers,
    -Scott
  • fc_adamfc_adam FoxyCart Team
    @stk,

    1) You won't be able to conditionally hide the coupon field - but you can certainly hide it using CSS. Does the coupon only apply to certain products, or is it store wide? You could actually achieve custom free shipping without having to include a coupon - and instead just base whether the customer qualifies for free shipping based on what is in their cart.


    2) That's quite an assortment of products! So most of what you've detailed there can be achieved with some custom javascript on your checkout. If you're working with flat rates, then either the tiered flat rate or multiple flat rates snippets will be what you're after - dictated by if you want a single rate or multiple rate choices returned to the customer.

    How detailed that logic is really comes down to how much logic you want to write in. You can loop through the JSON cart object on the checkout and then perform really complex logic depending on what is in there.

    To answer some of your specific queries:
    f) We also sell some one-off items that would require special packaging and handling (think Harley Davidson motorcycle), which would likely require a shipping quote to be provided to the customer (so there would need to be some kind of facility for this in the cart ... something like "sale contingent upon acceptance of a shipping quote" ... not sure the best way here.

    For that kind of thing I'd recommend enabling 'purchase orders' as a payment method for your store, and hide it by default. Then if the customer is shipping something that requires a quote, you could display the purchase order option so their order would effectively become a quote. You could relabel the purchase order option in the language section of your store to be something that makes more sense, and then give it a default value that relates to that as well.

    g) It's also come up that some customers may like to leave special instructions with their order and we were wondering if FC had any widget that added a text box to the checkout for any special delivery or order requirements. (e.g., "Deliver to unit behind main house", etc.)

    You can add in any custom inputs/fields you want to on the checkout - and as long as they have a name attribute they'll be included in the order details.


    3) That's post 2.0. The upcoming new version 2.0 will be a completely rebuilt checkout system though - so there will be some changes to how the snippets work/interface with the checkout, but the actual custom logic should remain the same for the most part. The snippets is something I'll be working through in the coming days to update them to work with the new templates.
Sign In or Register to comment.