</div> <div style="display: inline-block; width: 25%; border-right: 1px solid silver; text-align: left;">Rs. <?php if ($type == "P") { echo $itemPrice . " per Packet"; } else { echo $itemPrice . " per Kg"; } ?> </div> <div style="display: inline-block; width: 15%; border-right: 1px solid silver;"> <?php if ($type == "P") { echo $userQuantity . " Packet(s)"; } else { echo getQuantityWithUnits($userQuantity); } ?> </div> <div style="display: inline-block; width: 20%; text-align: right;">Rs. <?php echo $subTotal; ?> </div> </div> <?php } ?> <div style="width: 100%; color: black; padding: 5px; background: silver; box-shadow: 0px 0px 5px 1px gray inset; font-size: 12px;"> <div style="display: inline-block; width: 77%; text-align: left; font-weight: bold;">Grand Total</div> <div style="display: inline-block; width: 20%; text-align: right; font-weight: bold;">Rs. <?php echo $grandTotal;
function showItemBlock($itemname, $itemid, $imagepath) { if (isset($_SESSION['gs_cart'])) { $cart = $_SESSION['gs_cart']; } else { $cart = ""; } $city = "Jodhpur"; //$con = connectDB(); //$query = "select * from subitems where ItemID='$itemid' order by Popularity desc"; $query = "select * from subitems where SubItemID in ( select SubItemID from shopitems where ShopID in ( select ShopID from shopdetails where City like '%" . $city . "%' ) ) and ItemID='{$itemid}' order by Popularity desc"; $looseAvail = 0; echo "<div class='itemBlock'>"; echo "<div class='itemName'>{$itemname}</div>"; echo "<div class='itemImage'><img src='{$imagepath}' alt='image not found' class='imageDim'/></div>"; $res1 = @mysql_query($query); $no_of_subitems = mysql_num_rows($res1); $count = 0; while ($sub_ele = mysql_fetch_array($res1)) { if ($sub_ele['Type'] == 'L') { $ip = $sub_ele['Price']; $subitemid = $sub_ele['SubItemID']; $pop = $sub_ele['Popularity']; $pos = strpos($cart, "i->" . $subitemid); if ($pos === false) { $enVal = ""; $textdec = ""; } else { $enVal = "checked disabled"; $textdec = "text-decoration: line-through;"; $count++; } echo "<div style=''>"; echo "<div class='itemLoosePrice'>"; echo "<label class='itemPriceTags'><div style='display: inline-block; width: 10%;'> <input type='checkbox' id='subcheck{$subitemid}' name='det{$itemid}' value='{$subitemid}' onclick='detailChecked({$itemid},{$subitemid});' {$enVal}/> </div>"; $pop = round($pop, 2); echo "<div style='display: inline-block; width: 90%; text-align: center; {$textdec}' id='subcheckname{$subitemid}'>Rs. {$ip}</div></label>"; echo "</div>"; echo "</div>"; $looseAvail = 1; } } if ($looseAvail == 1) { echo "<div style=''>"; echo "<div class='itemDetails'>"; } else { echo "<div style=''>"; echo "<div class='itemDetails' style='height: 120px;'>"; } $res1 = @mysql_query($query); while ($sub_ele = mysql_fetch_array($res1)) { if ($sub_ele['Type'] == 'P') { $quan = $sub_ele['Quantity']; $price = $sub_ele['Price']; $moredet = $sub_ele['SubItemName']; echo "<label class='itemPriceTags'><div style='white-space: nowrap; border-bottom: 1px solid silver;'>"; $subitemid = $sub_ele['SubItemID']; $pop = $sub_ele['Popularity']; $pos = strpos($cart, "i->" . $subitemid); if ($pos === false) { $enVal = ""; $textdec = ""; } else { $enVal = "checked disabled"; $textdec = "text-decoration: line-through;"; $count++; } echo "<input type='checkbox' name='det{$itemid}' value='{$subitemid}' id='subcheck{$subitemid}' onclick='detailChecked({$itemid},{$subitemid});' {$enVal}/>"; $qRes = getQuantityWithUnits($quan); $pop = round($pop, 2); //echo "<label style='$textdec' id='subcheckname$subitemid'>"."Price: "." Rs. ".$price."</label><br/>"; echo "<label style='{$textdec}' id='subcheckname{$subitemid}'>" . "Price: " . " Rs. " . $price . "</label><br/>"; echo "</div></label>"; echo "Rating : " . $pop . "<br/>"; echo "  "; echo '<span class="rating"> <input type="radio" class="rating-input" id="rating-input-1-5" name="rating-input-1"/> <label for="rating-input-1-5" class="rating-star"></label> <input type="radio" class="rating-input" id="rating-input-1-4" name="rating-input-1"/> <label for="rating-input-1-4" class="rating-star"></label> <input type="radio" class="rating-input" id="rating-input-1-3" name="rating-input-1"/> <label for="rating-input-1-3" class="rating-star"></label> <input type="radio" class="rating-input" id="rating-input-1-2" name="rating-input-1"/> <label for="rating-input-1-2" class="rating-star"></label> <input type="radio" class="rating-input" id="rating-input-1-1" name="rating-input-1"/> <label for="rating-input-1-1" class="rating-star"></label> </span>'; } } echo "</div>"; echo "</div>"; echo "</div>"; if ($count < $no_of_subitems) { return false; } else { return true; } //closeDB($con); }
"> <td style="width: 3%;"> <div class="dialogCartItemRemove" onclick="removeCartItem(<?php echo $subitemid; ?> )"></div> </td> <td style="width: 37%;"> <?php echo "<div>" . $itemName; if ($type == "P") { echo "</div><div style='font-size: 12px; margin-left: 10px;'>"; if ($subItemName != "") { echo $subItemName . ", "; } echo getQuantityWithUnits($quantity) . "</div>"; } else { //echo $type; } ?> </td> <td style="width: 20%; padding-left: 10px;"> <div> Rs. <label id="itemPrice<?php echo $subitemid; ?> "> <?php echo $price; echo " ";