Hi,
I am quite surprised at this error:
Notice: Undefined index: delivery in /abc/abc/public_html/cow/application/controller/checkoutController.php on line 72
This is the code:
public function shippingAction(){
$cart = new Cart();
$country = $delivery->selectAllByCountry();
if(isset($_POST['delivery']) || count($_POST['delivery']) > 0){
$cart->addDeliveryAndPromotionAndTotal();
header('location: '.__SITE_PATH.'checkout/summary');
}
include('../application/view/html/checkout/shipping.php');
}
And then in the front end i have the following:
<ul>
<?$j=0;?>
<?while($row = mysql_fetch_array($country)):?>
<li>
<input type="radio" style="float:left;" name="delivery" id="<?=$row['ID']?>" value="<?=$row['ID']?>" <?= $j == 0 ? 'checked="checked"' : '' ?>/>
<label style="width:auto; float:left;" for="<?=$row['ID']?>">
<?=$row['name']?>
£<?=number_format($row['price'],2)?>
</label>
<div class="clear"></div>
</li>
<?$j++;
endwhile;?>
</ul>
Any ideas why i get the error?
Thanks