====== Products and FoxyCart: What They Are and What They Aren't ====== ===== Where Are Your Products? ===== If you haven't already read "FoxyCart is different" a dozen times by now, we'll state it again: FoxyCart is different, and we recommend reading more about [[.:introduction:foxycarts_reason_for_being#what_foxycart_is|what FoxyCart is and isn't]]. Most e-commerce systems have a built in CMS, which controls not only your website, but also the way your products are displayed, and thus, your products themselves. FoxyCart is //not// a CMS, and as such doesn't control your site, nor does it manage your products. The implications of this paradigm shift are far reaching, and depending on your needs it may make FoxyCart the perfect solution. So where //do// your products live? And what //is// a product? That's a good question. Simply put, a "product" in FoxyCart is simply anything that exists in the cart (put there via a GET or POST request, if you want specifics). There are no limitations on what types of products you can create, how you create them, how many options they have, or etc. If you can build an add-to-cart link or form, FoxyCart can almost always handle the product. Products "live" on your site, and because you have ultimate control, you can approach products from a variety of ways. * Hard-coded links or forms with specific product information. * Links or forms populated from a database or CMS. * Forms with open fields for donation amounts or custom attribute fields. * Any combination of the above. ===== Types of Products ===== There are three "types" of products in FoxyCart: - "Normal" products - [[.:products:downloadables|Downloadable products]] - [[.:products:subscriptions|Subscription products]] ===== Creating a Product ===== To add a product to your cart, there are two methods you can use: a link or a form. If you go to the "sample code" section of your store's admin you'll find a link and a form for you to copy/paste into your own site to see how it works. (We recommend starting from that sample code if you're unfamiliar with FoxyCart.) ==== Using Links ==== Links are usually the easiest option, and there are less chances for things to go wrong, but they are limited in that they cannot be changed (unless you're generating links dynamically). So whatever your add-to-cart link is for, that's it. No options, no quantity selection, no radio buttons or select boxes for product options. A simple link will look like this: Buy this Great Product! If you //can// use a link, you probably //should// use a link, but if you need customers to configure their own products, read on for an example of a form. ==== Using Forms ==== Forms have many potential advantages, including the ability to use dropdowns or other input fields to set options (like size, color, etc.). To add a product using a form, you'd do something like this.
==== Advanced Products ==== You are limited only by your imagination when it comes to how you'd like your add-to-cart links or forms to function, and thus, how complex you want your products to be. There are a variety of options and parameters [[#a_complete_list_of_product_parameters|listed below]] as well as in [[.:cheatsheet|the cheatsheet]]. If you need help just [[http://forum.foxycart.com/|ask on our forum]]. ===== What About Security? ===== If you're following along, you may be asking yourself, "That's all well and good, but there's no security in that approach." That's an excellent observation, and we have created a solution to this problem that we believe to be the most advanced and flexible approach to this problem in the world. We call it our [[.:advanced:hmac_validation|HMAC Product Verification]], and we encourage you to [[.:advanced:hmac_validation|read more about it]]. If you're using PHP, there's a helper class that will automatically sign your HTML, so implementing this security enhancement may be much easier than you think. ===== Frequently Asked Questions about Products ===== === Can I Import My Products? === Because FoxyCart doesn’t actually have any knowledge of your store's products, there is nothing to import into FoxyCart. If you do need to migrate from one system to another you would need to explore your options to import into whatever new CMS you’re using. For example, if you’re moving from Yahoo Stores to [[:integration:start?datasrt=&dataflt%5B%5D=system%3DWordPress|Wordpress]], importing products is much less a question of getting the products into FoxyCart as it is getting the products into Wordpress. So long as your new system can generate links or forms, FoxyCart will function as expected. ===== A Complete List of Product Parameters ===== {{section>.:cheat_sheet#product_parameters&noheader&noeditbutton&permalink&footer&nodate}}