1
0

Changes to bring in line with latest gallery3.

This commit is contained in:
Ben Smith 2009-09-01 08:22:21 +12:00
parent e9a46ca3cb
commit 1375b93c5b
6 changed files with 18 additions and 56 deletions

View File

@ -55,7 +55,7 @@ class Admin_Product_Lines_Controller extends Controller
$product->save();
message::success(t("Created product %product_name", array(
"product_name" => p::clean($product->name))));
"product_name" => html::clean($product->name))));
print json_encode(array("result" => "success"));
} else {
print json_encode(array("result" => "error",
@ -92,7 +92,7 @@ class Admin_Product_Lines_Controller extends Controller
"form" => $form->__toString()));
}
$message = t("Deleted user %product_name", array("product_name" => p::clean($name)));
$message = t("Deleted user %product_name", array("product_name" => html::clean($name)));
log::success("user", $message);
message::success($message);
print json_encode(array("result" => "success"));
@ -129,7 +129,7 @@ class Admin_Product_Lines_Controller extends Controller
$product->save();
message::success(t("Changed product %product_name",
array("product_name" => p::clean($product->name))));
array("product_name" => html::clean($product->name))));
print json_encode(array("result" => "success"));
} else {
print json_encode(array("result" => "error",

View File

@ -37,46 +37,6 @@ class basket_installer
/*
$db->query("CREATE TABLE IF NOT EXISTS {orders} (
`id` int(9) NOT NULL auto_increment,
`name` varchar(1024),
`house` varchar(255),
`street` varchar(255),
`suburb` varchar(255),
`town` varchar(255),
`postcode` varchar(255),
`email` varchar(255),
`phone` varchar(255),
`status` char(1),
`activity_time` int(9),
`created` int(9),
`total` int(9),
PRIMARY KEY (`id`))
ENGINE=InnoDB DEFAULT CHARSET=utf8;");
$db->query("CREATE TABLE IF NOT EXISTS {order_details} (
`id` int(9) NOT NULL auto_increment,
`order_id` int(9) NOT NULL,
`item_id` int(9) NOT NULL,
`product_name` TEXT NOT NULL,
`product_cost` INTEGER(9) default 0,
`product_description` varchar(1024),
`quantity` INTEGER(9) default 1,
PRIMARY KEY (`id`))
ENGINE=InnoDB DEFAULT CHARSET=utf8;");
$db->query("CREATE TABLE IF NOT EXISTS {order_histories} (
`id` int(9) NOT NULL auto_increment,
`order_id` int(9) NOT NULL,
`status_from` char(1),
`status_to` char(1),
`public` boolean,
`date` int(9),
`notes` TEXT default null,
PRIMARY KEY (`id`))
ENGINE=InnoDB DEFAULT CHARSET=utf8;");
*/
product::create("4x6",5,"4\"x6\" print");
product::create("8x10",25,"8\"x10\" print");
product::create("8x12",30,"8\"x12\" print");
@ -86,8 +46,5 @@ class basket_installer
static function deactivate(){
$db = Database::instance();
$db->query("DROP TABLE IF EXISTS {products}");
//$db->query("DROP TABLE IF EXISTS {orders}");
//$db->query("DROP TABLE IF EXISTS {order_details}");
//$db->query("DROP TABLE IF EXISTS {order_histories}");
}
}

View File

@ -32,7 +32,7 @@ class basket_theme_Core {
static function admin_head($theme) {
if (strpos(Router::$current_uri, "admin/product_lines") !== false) {
$theme->script("lib/gallery.panel.js");
$theme->script("gallery.panel.js");
}
}
static function photo_top($theme)
@ -43,4 +43,4 @@ class basket_theme_Core {
return $view->render();
}
}
}

View File

@ -43,13 +43,13 @@
<? foreach ($products as $i => $product): ?>
<tr id="gProduct-<?= $product->id ?>" class="<?= text::alternate("gOddRow", "gEvenRow") ?>">
<td id="product-<?= $product->id ?>" class="core-info ">
<?= p::clean($product->name) ?>
<?= html::clean($product->name) ?>
</td>
<td>
<?= basket::formatMoney($product->cost) ?>
</td>
<td>
<?= p::clean($product->description) ?>
<?= html::clean($product->description) ?>
</td>
<td class="gActions">
<a href="<?= url::site("admin/product_lines/edit_product_form/$product->id") ?>"

View File

@ -38,14 +38,14 @@ function so(){document.confirm.submit();}
<td id="item-<?= $prod_details->item ?>" class="core-info ">
<? $item = $prod_details->getItem(); ?>
<div>
<?= p::clean($item->title) ?>
<?= html::clean($item->title) ?>
</div>
</td>
<td>
<?= p::clean($prod_details->product_description()) ?>
<?= html::clean($prod_details->product_description()) ?>
</td>
<td>
<?= p::clean($prod_details->quantity) ?>
<?= html::clean($prod_details->quantity) ?>
</td>
<td>
<?= basket::formatMoney($prod_details->cost) ?>

View File

@ -19,6 +19,8 @@
*/
?>
<div class="gBlock">
<? if (isset($basket->contents ) && count($basket->contents) > 0): ?>
<? if (basket::isPaypal()): ?>
<?= basket::generatePaypalForm($basket) ?>
<script language="JavaScript">
@ -36,7 +38,7 @@
class="right gButtonLink ui-state-default ui-corner-all ui-icon-right">
<span class="ui-icon ui-icon-arrow-1-e"></span><?= t("Proceed to Checkout") ?></a>
<? endif; ?>
<? endif; ?>
<h2>
<?= t("Shopping Basket") ?>
</h2>
@ -65,10 +67,10 @@
</div>
</td>
<td>
<?= p::clean($prod_details->product_description()) ?>
<?= html::clean($prod_details->product_description()) ?>
</td>
<td>
<?= p::clean($prod_details->quantity) ?>
<?= html::clean($prod_details->quantity) ?>
</td>
<td>
<? $total += $prod_details->cost?>
@ -97,6 +99,8 @@
</div>
<? if (isset($basket->contents ) && count($basket->contents) > 0): ?>
<? if (basket::isPaypal()): ?>
<a href="javascript:co();"
class="right gButtonLink ui-state-default ui-corner-all ui-icon-right">
@ -109,4 +113,5 @@
class="right gButtonLink ui-state-default ui-corner-all ui-icon-right">
<span class="ui-icon ui-icon-arrow-1-e"></span><?= t("Proceed to Checkout") ?></a>
<? endif; ?>
<? endif; ?>
</div>