---- dataentry ----
type : integration # do not change this line
system : MODx
name : Ecommerce for MODx, a Tutorial
description : A tutorial for how to set up ecommerce for MODx using FoxyCart
tags_tags : complete integration, cms, tutorial
date_dt :
version :
developer_url :
----
====== MODx + FoxyCart == Love ======
This tutorial is not complete. Please feel free to edit this page with improvements, suggestions, or questions.
[[Customize the Look of FoxyCart]]
===== Tutorial =====
This tutorial will (eventually) walk you through a simple ecommerce/foxycart setup within modx. Thanks for your patience while we put it together.
==== Configuration ====
Go to Tools | Configuration
Click **Interface & Features **
Change **Editor to use** to "None"
==== Add Categories ====
This will setup your categories for your products.
Click [New Document] {icon}
Enter the **Title** as “Products”
Select a Document Template (i.e. Minimal Template)
Click [Page Settings]
Check off **Container?**
Click [Save] {icon}
Right click on **Products** and click [Create document here] and repeat the process for three more documents: **Cards**, **Posters**, and **Stamps**
Right click on **Cards**
Click [Move Document]
Select the page: **Products**.
Click [Save]
Repeat for **Posters** and **Stamps**.
Right click on Cards, Posters and Stamps and click [Publish document] and [Ok] for each.
Right click **Products** and click [Edit document]
In the content area, be sure **Editor to use** is set to "None" then copy and paste the following into:
[[Wayfinder? &level=1 &startID=`PRODUCTS PAGE#` ]]
For Example: [[Wayfinder? &level=1 &startID=`2` ]]
You can find the number for the **Products** page next to it in parenthesis.
**Visit The Product Page** to test it. You should see "Cards", "Posters" and "Stamps" listed.
==== Template Variables ====
Now you will create the variables needed to create product pages.
Go to **Resources** | **Manage Resources** and click [Templates]
Click [Minimal Template] or your default template.
Click [Duplicate], click [Ok]
Change the Title to: "Product Template"
Click [Save]
Repeat and create a "Category Template." Then right click on Cards, Posters and Stamps and click [Edit this Document]. Change the template to "Category Template."
Click the tab [Template Variables]
----
Click [New Template Variable]
* **Variable Name:** productname
* **Caption:** Name of Product
* Check off **Product Template**
Click [Save]
----
----
Click [New Template Variable]
* **Variable Name:** product_price
* **Caption:** Price of Product
* **Input Type:** Number
* Check off **Product Template**
Click [Save]
----
----
Click [New Template Variable]
* **Variable Name:** product_price
* **Caption:** Price of Product
* **Description:** don't enter dollar sign
* **Input Type:** Number
* Check off **Product Template**
Click [Save]
----
----
Click [New Template Variable]
* **Variable Name:** product_thumnail
* **Caption:** Product Image Thumbnail
* **Description:** width 80px height 60px
* **Input Type:** Image
* Check off **Product Template**
Click [Save]
----
----
Click [New Template Variable]
* **Variable Name:** product_image
* **Caption:** Product Full Image
* **Description:** width 180px height 150px
* **Input Type:** Image
* Check off **Product Template**
Click [Save]
----
==== Add Products ====
With the new Product Template we can now add products.
Right click on any of the categories: **Cards**, **Posters** or **Stamps** and click [Create Document Here].
Give the product a Title, select the Product Template.
Uncheck **Show in Menu**
Fill out the Product information such as Name, Price, and upload images.
Create about 10 products, with a few in each category.
==== FoxyCart Setup ====
Payment Gateway: Choose authorize.net, as it is the fastest test server.