[eluser]Cgull[/eluser]
Hello,
I have a web site where a page I am calling displays ok on my local server but on the live server I get a blank page.
View page source shows me the digit 1 on top and that's it.
Please, can someone help?
The url:
Code:
www.highlandcoffeeroastery.co.za/order/orderonline/viewUserOrders
The routes file:
Code:
$route['orderonline/([a-z]+)'] = 'order/orderonline/$1';
$route['orderonline'] = 'order/orderonline';
The function I am calling on the controller:
Code:
function viewUserOrders()
{
if($this->tank_auth->is_logged_in()):
$userId = $this->session->userdata('user_id');
$this->load->model('order/orderonline_model');
$data['orders'] = $this->orderonline_model->getUserOrders($userId);
$data['title'] = 'My Orders';
$data['view'] = 'order/userorders';
$this->load->view('index_view', $data);
else:
$this->load->helper('form');
redirect('auth/login');
endif;
}
The view file:
Code:
<!--<h1 class="pageTitle">My Orders</h1>-->
<div>
<?php
if($orders):
?>
<table cellpadding="0" cellspacing="0" border="0" class="cart_table">
<thead>
<tr>
<th>Order No</th>
<th>Order Date</th>
<th>Invoice No</th>
<th>Paid</th>
<th>Tracking No</th>
<th></th>
</tr>
</thead>
<?php
foreach($orders as $key):
$orderId = $key['orderId'];
$date = $key['date'];
$invoiceNo = $key['invoice'];
$paid = $key['paid'];
if($paid == 1) $paid = 'Paid'; else $paid = 'Awaiting Payment';
$trackingNo = $key['tracking'];
echo "
<tbody>
<tr>
<td colspan=\"6\">
<table class=\"cart_table innerTable\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" 650px;\">
<thead>
<tr class=\"cart_item\" id=\"cartItem$orderId\" pointer;\">
<td 60px;\"><div class=\"dArrow\"></div>$orderId</td>\n
<td 90px;\">$date</td>\n
<td 90px;\">$invoiceNo</td>\n
<td 150px;\">$paid</td>\n
<td 100px;\"><a >$trackingNo</a></td>\n
<td>";
if($paid == 'Awaiting Payment'): ?>
<a href="<?php echo base_url(); ?>order/orderonline/cancelOrder" class="cancel" id="<?php echo $orderId; ?>">Cancel Order</a>
<?php else: ?>
<?php
endif;
echo "</td>\n
</tr>\n
<tr class=\"cart_spacer\"><td colspan=\"6\"></td></tr>
</thead>
<tbody none;\">
<tr class=\"subHeader\">\n
<td>Quantity</td>\n
<td colspan=\"2\">Product</td>\n
<td>Weight</td>\n
<td>Grind</td>\n
<td>Roast</td>\n
</tr>\n";
foreach($key['dets'] as $k):
$product = $k['product'];
$weight = $k['weight'];
$grind = $k['grind'];
$roast = $k['roast'];
$qty = $k['qty'];
echo
"
<tr class=\"tblContent\">\n
<td>$qty</td>\n
<td colspan=\"2\">$product</td>\n
<td>$weight</td>\n
<td>$grind</td>\n
<td>$roast</td>\n
</tr>\n
";
endforeach;
echo "
</tbody>
</table>
</td>
</tr>
</tbody>";
endforeach;
echo '</table>';
else:
echo "You have no orders.";
endif;
?>
</div>
<div id="dialog" title="Confirm Order Cancel">
Are you sure you want to cancel this order?
</div>
[removed]
$("#dialog").dialog({
modal: true,
width: 400,
height: 150,
autoOpen: false
});
$(".cancel").click(function(e) {
e.preventDefault();
var theHREF = $(this).attr("href");
var orderId = $(this).attr('id');
$("#dialog").dialog('option', 'buttons', {
"Confirm" : function() {
$.ajax({
type: 'POST',
url: '<?php echo base_url(); ?>order/orderonline/cancelOrder',
data: {orderId: orderId},
success: function(data) { console.log(data);
$('#'+orderId).hide();
$('#cartItem' + orderId).css({'text-decoration':'line-through',"color":"red"});
$('#cartItem' + orderId).children().css('color', 'grey');
}
});
$(this).dialog("close");
},
"Cancel" : function() { $(this).dialog("close"); }
});
$("#dialog").dialog("open");
});
var a = $("table.innerTable:first").find("tr:first");
a.parents('table.innerTable') .children('tbody') .toggle();
a.closest("td").find("div").toggleClass("uArrow");
$('table.innerTable tr') .click(
function() {
$(this) .parents('table.innerTable') .children('tbody') .toggle();
$(this).closest("td").find("div").toggleClass("uArrow");
}
);
[removed]