jakeshop_presentation

townripeΔιαχείριση Δεδομένων

31 Ιαν 2013 (πριν από 4 χρόνια και 6 μήνες)

189 εμφανίσεις

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

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!

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

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

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

...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

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" />





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");


Demo