Добрый вечер! Нужна помощь! Раньше где наименование цена кол-во и тд писало какие товары в корзине, цену и тд сейчас все пропало, пропало после того как редактировал текст про доставку, ниже скину код, подскажите где что дописать, в общем отредактируйте пожалуйста код чтобы было все окей, спасибо!


| Код |
|---|
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
include("functions.php");
$_CART = array();
$_cids = array();
if(!empty($_SESSION['CART']['cart_cids'])){
$cart = $_SESSION['CART']['cart_cids'];
$cart_array = explode(",",$cart);
$sizeof_cart_array = sizeof($cart_array);
if($sizeof_cart_array > 0){
for($i_product=0;$i_product<$sizeof_cart_array;$i_product++){
$cid = $cart_array[$i_product];
$_cids[] = $cid;
$_CART[$i_product]['cid'] = $cid;
$_CART[$i_product]['price'] = $_SESSION['CART']['cart_'.$cid.'_price'];
$_CART[$i_product]['count'] = $_SESSION['CART']['cart_'.$cid.'_count'];
$_SESSION['CART']['cart_'.$cid.'_sum'] = $_SESSION['CART']['cart_'.$cid.'_price']*$_SESSION['CART']['cart_'.$cid.'_count'];
$_CART[$i_product]['sum'] = $_SESSION['CART']['cart_'.$cid.'_sum'];
$row_product = getProduct($_CART[$i_product]['cid']);
$_CART[$i_product]['name'] = $row_product['name'];
}
}else{
$sizeof_cart_array = 1;
$cart_array[$i] = $cart;
}
}
if(empty($_CART)){
?>
<div class="text">
<p><b>Ваша корзина заказов пуста</b></p>
<p>Если Вы делаете покупку впервые: для оформления заказа, поместите товар в корзину и пройдите процедуру оформления заказа в "корзине заказов".</p>
</div>
<?
}else{
?>
<div id="cart_msg"></div>
<div style="padding-top: 50px;">
<h2 class="red">Оформить заказ</h2>
<form id="fm_cart" action="cart" method="post" onsubmit="return false;"><fieldset> <?
$_SUM['count'] = 0;
$_SUM['price'] = 0;
for($i_cart=0;$i_cart<sizeof($_CART);$i_cart++){
$_SUM['count']+=1;
$_SUM['price']+=$_CART[$i_cart]['sum'];
}
$n_cart = sizeof($_CART);
?><?
for($i_cart=0,$tab_index=100;$i_cart<$n_cart;$i_cart++,$tab_index++){
?> <?
}
/*$_CART[$i_cart]['name'] = 'Доставка';
$_CART[$i_cart]['cid'] = 'delivery';
$_CART[$i_cart]['price'] = $_CART[$i_cart]['sum'] = intval($_SESSION['CART']['delivery']);
?><tr <? if($i_cart % 2 == 0){echo('class="i"');}?>>
<td class="td_l pngfix"><br _moz_editor_bogus_node='on'></td>
<td class="name"><?=$_CART[$i_cart]['name'];?></td>
<td class="price_str"><span id="price_<?=$_CART[$i_cart]['cid'];?>"><?=price_to_str($_CART[$i_cart]['price']);?></span> руб.</td>
<td><br _moz_editor_bogus_node='on'></td>
<td class="price_str"><span id="tprice_<?=$_CART[$i_cart]['cid'];?>"><?=price_to_str($_CART[$i_cart]['sum']);?></span> руб.</td>
<td><br _moz_editor_bogus_node='on'></td>
<td class="td_r pngfix"><br _moz_editor_bogus_node='on'></td>
</tr><?//*/
?> <? if($i_cart % 2 == 0){echo('class="i"');}?>
<table class="cart" cellspacing="0" cellpadding="0"> <thead>
<tr><th class="th_l pngfix"></th><th>Наименование</th><th>Цена</th><th>Кол-во</th><th>Сумма</th><th>Удалить</th><th class="th_r pngfix"></th></tr>
</thead><tfoot>
<tr><th class="th_l pngfix"></th><th colspan="3">Итого: <span id="total_count"><?=$_SUM['count'];?></span> товаров на сумму <span id="total_sum"><?=price_to_str($_SUM['price'],'');?></span> руб.<span class="red">*</span></th><th>
<div class="right"><input class="refresh" type="submit" value="Пересчитать" title="Пересчитать" tabindex="199" /></div>
</th><th>
<div class="left"><input class="clear" type="button" value="Очистить" title="Очистить" tabindex="299" /> </div>
</th><th class="th_r pngfix">
<br />
</th></tr>
</tfoot>
<tbody></tbody>
</table>
</fieldset></form>
<div>Бесплатная доставка по Туле осуществляется при заказе от 500 рублей.
<br />
Платная доставка в отдаленные районы: Косая Гора, Мяново, Скуратово, Лихвинский проезд, Щегловская засека и т.д., т.п. – 100 рублей. Время работы доставки: 10:00 - 21:00</div>
<div class="frame2" style="margin-top: 30px;"> <form id="f_order" action="cart" method="post" onsubmit="return false;"> <fieldset>
<table id="t_order" cellpadding="0" cellspacing="0"> <thead>
<tr> <th class="th_l"></th><th colspan="2">Оформить заказ</th><th class="th_r"></th> </tr>
</thead> <tfoot>
<tr> <th class="th_l"></th><th colspan="2">
<div><input class="ordering" type="submit" value="" tabindex="5" /></div>
</th><th class="th_r"></th> </tr>
</tfoot>
<tbody>
<tr> <td class="td_l" colspan="1" rowspan="4"> </td><td colspan="2">
<div> </div>
</td><td class="td_r" colspan="1" rowspan="4"> </td> </tr>
<tr> <td class="r_1"><label for="ord_fio" class="required">Ф.И.О.:</label><input id="ord_fio" name="fio" type="text" value="" tabindex="1" /></td> <td class="r_1"><label for="ord_phone" class="required">Телефон:</label><input id="ord_phone" name="phone" type="text" value="" tabindex="2" /></td> </tr>
<tr> <td><label class="lab_com required" for="ord_address">Адрес:</label><textarea id="ord_address" name="address" rows="" cols="" tabindex="3"></textarea></td> <td><label class="lab_com" for="ord_comments">Комментарии к заказу:</label><textarea id="ord_comments" name="comments" rows="" cols="" tabindex="4"></textarea></td> </tr>
</tbody>
</table>
<p> </p>
</fieldset> </form> </div>
<?
}
?></div> |