📄 ro_basket.ihtml
字号:
<?php
// This is the read-only version of the shoppnig basket
eval(load_class("product", "ps_product"));
$ps_product = new ps_product;
eval(load_class("product", "ps_product_category"));
$ps_product_category = new ps_product_category;
eval(load_class("ISshipping", "ps_intershipper"));
$ps_intershipper = new ps_intershipper;
if ($cart["idx"] == 0) {
echo $empty_cart;
$checkout = False;
}
else {
$checkout = True;
?>
<TABLE BORDER=1 CELLPADDING=4 CELLSPACING=0 WIDTH="95%" ALIGN="CENTER" BORDERCOLORLIGHT="#D0B890" BORDERCOLORDARK="#D0B890">
<TR ALIGN=left BGCOLOR=#D1B78F CLASS="unnamed11">
<TH HEIGHT="14" width="200"><?php
echo $cart_name;
?></TH>
<TH HEIGHT="14" WIDTH="60"><?php
echo $cart_sku;
?></TH>
<TH HEIGHT="14" WIDTH="30"><?php
echo $cart_price;
?></TH>
<TH HEIGHT="14" WIDTH="30"><?php
echo $cart_quantity;
?></TH>
<TH HEIGHT="14" WIDTH="40"><?php
echo $cart_subtotal;
?></TH>
</TR>
<?php
$total = 0;
for ($i=0;$i<$cart["idx"];$i++) {
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><?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>
<?php echo $cart[$i]["quantity"];?> </TD>
<TD><FONT COLOR="#FF0000"><?php
$subtotal = $price["product_price"] * $cart[$i]["quantity"];
$total += $subtotal;
printf("%.2f", $subtotal);
?></TD>
</TR>
<?php
} // End for loop
?>
<TR>
<TD COLSPAN=4 ALIGN=RIGHT>小计: </TD>
<TD><FONT COLOR="#FF0000"><?php
printf("%.2f", $total);
?> 元</FONT>
</TD>
</TR>
<?php if ($auth["user_id"] && $ship_to_info_id) { ?>
<TR>
<TD COLSPAN=4 ALIGN=RIGHT>税务: </TD>
<TD><FONT COLOR="#FF0000"><?php
$order_tax = $ps_checkout->calc_order_tax($total, $vars);
printf("%.2f", $order_tax);
?> 元</FONT>
</TD>
</TR>
<TR>
<TD COLSPAN=4 ALIGN=RIGHT>运费: </TD>
<TD><FONT COLOR="#FF0000"><?php
if (IS_ENABLE) {
$order_shipping = $ps_intershipper->get_rate($vars);
}
else {
$order_shipping = 0;
}
printf("%.2f", $order_shipping);
?> 元</FONT>
</TD>
</TR>
<TR>
<TD COLSPAN=4 ALIGN=RIGHT>总计: </TD>
<TD><FONT COLOR="#FF0000"><?php
$order_total = $order_tax + $order_shipping + $total;
printf("<B>%.2f</B>", $order_total);
?> 元</FONT>
</TD>
</TR>
<?php
}
?>
</TABLE>
<?php
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -