Added some files for the store.
git-svn-id: http://svn.cleancode.org/svn/pickles@87 4d10bc64-7434-11dc-a737-d2d0f8310089
This commit is contained in:
parent
3da623cb42
commit
7c199b56dd
2 changed files with 47 additions and 0 deletions
17
common/modules/store/product.php
Normal file
17
common/modules/store/product.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
class store_product extends store {
|
||||
|
||||
protected $display = DISPLAY_SMARTY;
|
||||
|
||||
public function __default() {
|
||||
|
||||
$this->product = $this->db->getArray("
|
||||
SELECT *
|
||||
FROM products
|
||||
WHERE product_id = '{$_REQUEST['id']}';
|
||||
");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
30
common/templates/store/product.tpl
Normal file
30
common/templates/store/product.tpl
Normal file
|
@ -0,0 +1,30 @@
|
|||
<div class="content-left">
|
||||
{include file="../../pickles/common/templates/store/navigation.tpl"}<br /><br />
|
||||
{include file="../../pickles/common/templates/store/categories.tpl"}
|
||||
</div>
|
||||
<div class="content-right store-category">
|
||||
<div class="{$category.permalink}">
|
||||
<h1>{$category.name}</h1>
|
||||
</div>
|
||||
<div class="center">
|
||||
{$category.description}
|
||||
</div>
|
||||
<div class="breadcrumbs">
|
||||
<a href="/store">Shopping Home</a> > <a href="/store/category/{$category.permalink}">{$category.name}</a>
|
||||
</div>
|
||||
<div>
|
||||
{foreach from=$products item=product name=products}
|
||||
<div class="float-left" style="width: 200px; margin: 3px">
|
||||
<img src="/images/products/{$product.id}/small.jpg" class="float-left" style="padding-right: 5px" />
|
||||
<div class="float-left" style="width: 120px">
|
||||
<a href="/store/product/{$product.id}">{$product.name}</a><br /><br />
|
||||
{$product.teaser}<br /><br />
|
||||
<b>${$product.price}</b><br /><br />
|
||||
<ul><li><a href="/store/cart/add/{$product.id}" class="add-to-cart"><span>Add to Cart</span></a></li></ul>
|
||||
<br /><br />
|
||||
</div>
|
||||
</div>
|
||||
{if $smarty.foreach.products.iteration % 3 == 0}<br class="clear" />{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue