double check closed

This commit is contained in:
arzynik 2012-07-19 08:53:45 -07:00
parent 961ad45808
commit f7e0ab4217

View File

@ -11,13 +11,17 @@ class Crunchbutton_Order extends Cana_Table {
case 'dishes':
foreach ($typeItem as $item) {
$total += Dish::o($item['id'])->price;
if ($item['toppings']) {
foreach ($item['toppings'] as $topping => $bleh) {
$total += Topping::o($topping)->price;
}
foreach ($item['toppings'] as $topping => $bleh) {
}
if ($item['substitutions']) {
foreach ($item['substitutions'] as $topping => $bleh) {
$total += Substitution::o($topping)->price;
}
}
}
break;
case 'sides':
foreach ($typeItem as $item) {
@ -76,6 +80,10 @@ class Crunchbutton_Order extends Cana_Table {
}
}
if (!$this->restaurant()->open()) {
$errors[] = 'This restaurant is closed.';
}
if ($errors) {
return $errors;
}