Top Banner
JakeShop A complete application for online commerce by Jake Feasel
10

JakeShop A complete application for online commerce by Jake Feasel.

Jan 20, 2016

Download

Documents

Edgar Ford
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: JakeShop A complete application for online commerce by Jake Feasel.

JakeShopA complete application for online commerce

by Jake Feasel

Page 2: JakeShop A complete application for online commerce by Jake Feasel.

Uses• Products

• Mini-content management functionality

• Emphasis on photos

• Supports multiple product categories

• Orders

• End-to-end processing, aided by email notices

• Record keeping functions

• Smart Shipping and Handling management

Page 3: JakeShop A complete application for online commerce by Jake Feasel.

Features• Simple, Easy to use interface

• Designed for use by non-technical people

• Easily customizable by web designers

• Smarty template language for all browser output

• Modular MVC code architecture

• Cross-Browser compatible formatting

• Froogle Integration

• Best of all, it’s Free!

Page 4: JakeShop A complete application for online commerce by Jake Feasel.

Security• SSL supported architecture design

• Easy to use HTTP-based authentication

• Careful use of sensitive data

• Nothing sensitive gets sent in Email

• Credit Card info wiped from database after order is processed. This minimizes liability of break-ins.

• Thorough input validation of user-provided data

• Prevents SQL injection attacks, others

Page 5: JakeShop A complete application for online commerce by Jake Feasel.

Components• All components free, fast, feature-rich and

portable

• PHP - Web development language

• MySQL or PostgreSQL - Database servers

• PearDB used for abstraction layer

• Smarty Templates

• Fusebox 4.1 framework

Page 6: JakeShop A complete application for online commerce by Jake Feasel.

Fusebox and Smarty...•Fusebox - relatively new framework for PHP

•XML based

•Routes through single file, typically index.php

•Smarty - established PHP template system

•Separate, bare-bones language

•Enforces strong separation between display logic and business logic

Page 7: JakeShop A complete application for online commerce by Jake Feasel.

...Fusebox and Smarty• Online research yielded no results regarding

these two being used together

• A major part of the work in this project was establishing the appropriate method for their use

• Required defining new XML verbs for Fusebox

• It may turn out the project is more useful as a Smary + Fusebox complete sample app than as a new shopping system

Page 8: JakeShop A complete application for online commerce by Jake Feasel.

Fusebox Sample<do action="mStore.GetCartInfo" /><loop from="0" to="(count($CartInfo)-1)" index="i">

<set name="product_id" value="{$CartInfo[$i]['product_id']}" /><set name="productPrice[$product_id]" value="{$CartInfo[$i]['price']}" />

</loop><smt.assign name="CartInfo" value="$CartInfo" /><smt.assign name="subTotalCost" value="$subTotalCost" /><smt.assign name="totalWeight" value="$totalWeight" /><smt.assign name="additional_handling" value="$additional_handling" />

<circuit alias="Store" path="Store/"/><circuit alias="mStore" path="Store/Model/" parent="Store" /><circuit alias="vStore" path="Store/View/" parent="Store" />

<circuit alias="Checkout" path="Checkout/" /><circuit alias="vCheckout" path="Checkout/View/" parent="Checkout" /><circuit alias="mCheckout" path="Checkout/Model/" parent="Checkout" />

Page 9: JakeShop A complete application for online commerce by Jake Feasel.

Smarty Sample

{section name="i" loop=$CartInfo}<tr><td><input type="checkbox" name="removeList[]"

value="{$CartInfo[i].product_id}"></td><td>{$CartInfo[i].name}</td><td>{$CartInfo[i].quantity}</td><td>${$CartInfo[i].price|string_format:"%.2f"} each</td><td align=right>${$CartInfo[i].cost|string_format:"%.2f"}</td></tr>

{/section}

$smarty->assign("CartInfo", $CartInfo);$smarty->assign("subTotalCost", $subTotalCost);

$smarty->display("dsp_viewCart.php");

Page 10: JakeShop A complete application for online commerce by Jake Feasel.

Demo