⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basket.ihtml

📁 phpShop是一个基于php的分布式电子商务模块
💻 IHTML
字号:
<?php  require_once("product/lib/ps_product.inc");  $ps_product = new ps_product;  require_once("product/lib/ps_product_category.inc");  $ps_product_category = new ps_product_category;  require_once("zone/lib/ps_zone.inc");  $ps_zone = new ps_zone;  if ($cart["idx"] == 0) {     echo $empty_cart;     $checkout = False;  }  else {     $checkout = True;?><form action="<?php echo URL ?>" method=POST>  <?php $sess->hidden_session() ?>  <input type=HIDDEN name=page value=<?php echo $page ?>>  <input type=HIDDEN name=func value="cartUpdate">  <input type=HIDDEN name=ship_to_info_id value=<?php echo $ship_to_info_id?> ><table width=100% cellspacing=0 cellpadding=4 border=1><tr align=LEFT bgcolor=<?php echo $cart_header_color?>><th><?php      echo $cart_name;     ?></th><th><?php      echo $cart_sku;     ?></th><th><?php      echo $cart_price;     ?></th><th><?php      echo $cart_quantity;     ?></th><th><?php      echo $cart_subtotal;     ?></th><th colspan=2 align=CENTER>Action</th></tr><?php  $total = 0;  // Added for the zone shipping module  $zone_qty = 0;      for ($i=0;$i<$cart["idx"];$i++) {    // Added for the zone shipping module    $zone_qty += $cart[$i]["quantity"];    if ($i % 2) $row_color = SEARCH_COLOR_2;       else $row_color = SEARCH_COLOR_1;?><tr valign=TOP bgcolor=<?php echo $row_color ?>><td><?php      // Get product parent id if exists      $product_parent_id=$ps_product->get_field($cart[$i]["product_id"],"product_parent_id");      // Get flypage for this product      $flypage = $ps_product->get_flypage($cart[$i]["product_id"]);      // Build URL based on whether item or product      if ($product_parent_id)         $url = $sess->url(URL . "?page=$flypage&product_id=$product_parent_id");      else         $url = $sess->url(URL . "?page=$flypage&product_id=" . $cart[$i]["product_id"]);      echo "<A HREF=$url>";      // Display product name      echo "<B>" . $ps_product->get_field($cart[$i]["product_id"], "product_name") . "</B>";      echo "</A>";      // Display attribute values if this an item      if ($product_parent_id) {        $db_detail=$ps_product->attribute_sql($cart[$i]["product_id"],$product_parent_id);        while ($db_detail->next_record()) {           echo "<BR>" . $db_detail->f("attribute_name") . "&nbsp;";           echo "(" . $db_detail->f("attribute_value") . ")";        }      }     ?></td><td><?php      echo $ps_product->get_field($cart[$i]["product_id"], "product_sku");     ?></td><td><?php      $price = $ps_product->get_price($cart[$i]["product_id"]);      printf("%.2f", $price["product_price"]);     ?></td><td>  <input type=TEXT size=4 maxlength=4 name=quantity[<?php echo $i; ?>] value=<?php echo $cart[$i]["quantity"];?>></td><td><?php      $subtotal = $price["product_price"] * $cart[$i]["quantity"];      $total += $subtotal;      printf("%.2f", $subtotal);     ?></td><td colspan=2>  <a href="<?php $sess->purl(URL."?page=$page&func=cartDelete&product_id=".$cart[$i]["product_id"]); ?>">Delete</a><?php      $weight_subtotal = $ps_zone->get_weight($cart[$i]["product_id"]);      $weight_total += $weight_subtotal;  } // End for loop?><tr><td colspan=4 align=RIGHT>SubTotal:</td><td colspan=3><?php               printf("%.2f", $total);               ?></td></tr><?php if ($auth["user_id"] && $ship_to_info_id) { ?><tr>    <td colspan=4 align=RIGHT>Tax: </td><td colspan=3><?php        if ($weight_total !=0 or IS_VIRTUAL_TAX) {                $order_taxable = $ps_checkout->calc_order_taxable($vars);               $order_tax = $ps_checkout->calc_order_tax($order_taxable, $vars);        } else {                $order_tax = 0;        }               printf("%.2f", $order_tax);               ?></td></tr><tr>    <td colspan=4 align=RIGHT>Shipping: </td><td colspan=3><?php	   if (ZONE_ENABLE) {		$order_shipping = $ps_zone->get_rate($vars);	   }	   else {		$order_shipping = 0;	   }	   printf("%.2f", $order_shipping);	   ?></td></tr><tr>    <td colspan=4 align=RIGHT>Total: </td><td colspan=3><?php               $order_total = $order_tax + $order_shipping + $total;               printf("<B>%.2f</B>", $order_total);               ?></td></tr><?php     }?></table><p><center><input type="submit" name="Update" value="Update"></center></form><?php }?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -