Same Website, Different Kind of Product

chriscoyierchriscoyier Member
in Help edited October 2008
On one of our client sites, Beacon Athletics, we are using FoxyCart to handle the registrations for seminars, which require payment at the time of registration. Works great. Example seminar registration page here:
http://beaconathletics.com/seminars/seminar-11-11-08.php

Much of FoxyCart is customized around the "seminars" aspect of this. The base store URL points to our generic seminars page. The cart is customized with a special seminars logo. The emails even say "Beacon Athletics Seminar Registration". But now Beacon wants to incorporate eCommerce into an entirely different aspect of the business. A downloadable software product.

So email template will need to be different, cart will need to be different, URL will be different, etc. But it's the same client, same website... Are we going to need to create an entirely new "store", with an additional paid account, to do this?

So far, I have it setup in our already-exisiting store. Here is the test page on the site you can buy it.
http://beaconathletics.com/timer/

Obviously when you add it to the cart you see the seminar registration logo (we could possibly just go generic there...), but the email is important that it stays the way it is.

The other problem is that it just doesn't seem to be offering up those download links at all:
http://skitch.com/chriscoyier/36qd/beacon-athletics-seminars-checkout

I have the product set up as a downloadable and added the product code and category to the action URL in the form, but still no links. Am I missing something in my templates? Neither the receipt page or the email included them.

Here is the "Add to Cart" code I used:
<form class="foxycart" id="sem-reg" action="https://beaconathletics.foxycart.com/cart?code=beacon_timer&category=software_download"; method="post" accept-charset="utf-8">
				<input type="hidden" name="name" value="Beacon Timer Software" />
				<input type="hidden" name="price" value="0.01" />
				<input type="hidden" name="quantity_max" value="1" />
				<input type="submit" name="Buy Software" value="Add to Cart" />
			</form>
Comments
  • brettbrett FoxyCart Team
    Hi Chris.

    There are 2 solutions to this. The first is to set up a different FoxyCart store, different subdomain, etc., and just don't mix the two. That's option #1. Option #2 involves using one store for both products.
    So email template will need to be different, cart will need to be different, URL will be different, etc. But it's the same client, same website... Are we going to need to create an entirely new "store", with an additional paid account, to do this?
    
    The answer to this comes in a few parts.

    - EMAILS: What you'll probably want to do is create a category for seminars, and create the seminar specific email on the category. Then make sure all your category products get added as the correct category. (Or just use the default category and remember that default == seminar.)

    - CART: Currently the best way to do this is to read the JSON object to determine what's in the cart, then run some jQuery to apply different classes (or add new HTML) to the cart. I've done this to tweak things for resellers and regular customers. So you'd have some jQuery set to document.ready, check the JSON for products in a particular category, then modify the CSS/HTML accordingly.

    - URL: If you want a different URL, you'll need a new FoxyCart store. You can, of course, create a new store under the same FoxyCart admin account, so administering them is a little easier. Just be careful that you only load one foxycart_includes.js per page or you'll run into session/cookie issues.

    - NEW FUNCTIONALITY: Go ahead and vote for the "template set" item on our feature request board: http://requests.foxycart.com/
    We think that'll be a quite elegant solution to this type of problem (as well as multi-lingual systems) in the future. It will likely cost an additional $10/mo per "template set", but we think it's a solid solution. Should be here by the year's end (but as always, no promises).
    <form class="foxycart" id="sem-reg" action="https://beaconathletics.foxycart.com/cart?code=beacon_timer&category=software_download"; method="post" accept-charset="utf-8">
    
    Man, I really need to clean up that page on the wiki. Somebody else got caught up on that just last week.

    You have a form doing a POST, but the action is doing a GET. That action would be fine as a href for a link, but for a form you need to just do /cart, then add hidden inputs for the code and the category. That should do it for you.

    Does all that help?
  • Hey Brett,

    Good progress. I actually am trying the method of doing it by setting up a new category.

    I moved the code and category to hidden inputs instead of the action URL, and that worked. Although I do see the "code" in the cart:
    http://skitch.com/chriscoyier/4baj/beacon-athletics-timer-software
    I'm thinking I can probably hide that with CSS though.

    Works great, and we are getting the download links on the receipt page and the email.

    Then I set up a new email template for the software download. So when a transaction goes through for the software, both the store and the customer are getting BOTH the generic email ("Seminar Registration Receipt") and the specific ("Software Download Receipt") email. Is there a way to only get the software email when ordering software?
  • brettbrett FoxyCart Team
    The way the category emails work is "additive", so if an transaction contains anything from the category in question, an additional email will be sent in addition to any other emails (main receipt, other categories, etc.).

    What I'd recommend would be to have the download category email be more of a "how to" type thing, since it does get sent in addition to the receipt, which already has the links. You could explain how to download the files, how to view/listen them, troubleshooting, etc.

    OR... if you just want the downloadable receipt to be sent for downloadables, and just the seminar receipt to be sent for seminars, then you'd just disable the main receipt (by clearing the subject line on that template page in the admin) and have each category send its own receipt. That'd accomplish what you need, I think.

    If you need more fine grained control you could generate your own receipt emails using the XML. There's a script on our wiki that could get your started:
    http://wiki.foxycart.com/integration
    That may be overkill though, and you might actually run into problems with the downloadable links... Those should be included in the XML, which doesn't currently happen. I've added it to http://requests.foxycart.com/ if you'd like to vote for it.
  • Cool, yeah, that should work. Disabling the main receipt and creating only category-specific receipts.
Sign In or Register to comment.