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

📄 ro_basket.ihtml

📁 phpShop是一个基于php的分布式电子商务模块
💻 IHTML
字号:
<?php  // This is the read-only version of the shoppnig basket  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;?> <table width="100%" cellspacing="0" cellpadding="4" border="1">   <tr align="left">     <th>       <?php       echo $cart_name;     ?>     </th>      <th align="center">       <?php       echo $cart_sku;     ?>     </th>      <th align="center">       <?php       echo $cart_price;     ?>     </th>      <th align="center">       <?php       echo $cart_quantity;     ?>     </th>      <th>       <?php       echo $cart_subtotal;     ?>     </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 ?>">   <?php $sess->hidden_session() ?>      <input type="hidden" name="ship_to_info_id" value="<?php echo $ship_to_info_id?>" />      <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_value");         }      }     ?>     </td>      <td align="center">       <?php      echo $ps_product->get_field($cart[$i]["product_id"], "product_sku");     ?>     </td>      <td align="center">       <?php      $price = $ps_product->get_price($cart[$i]["product_id"]);      printf("%.2f", $price["product_price"]);     ?>     </td>      <td align="center"> <?php echo $cart[$i]["quantity"];?> </td>      <td>       <?php      $subtotal = $price["product_price"] * $cart[$i]["quantity"];      $total += $subtotal;      printf("%.2f", $subtotal);     ?>     </td>    </tr>   <?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>       <?php               printf("%.2f", $total);               ?>     </td>    </tr>   <?php if ($auth["user_id"] && $ship_to_info_id) { ?>   <tr>     <td colspan="4" align="right">Tax: </td>      <td>       <?php	if ($weight_total !=0 or IS_TAX_VIRTUAL) {	$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>       <?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>       <?php               $order_total = $order_tax + $order_shipping + $total;               printf("<B>%.2f</B>", $order_total);               ?>     </td>    </tr>   <?php     } ?> </table> <?php }?> 

⌨️ 快捷键说明

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