下面的编码显示订购产品的个人重量:
$weightsql = select op.products_name,
op.products_quantity,
p.products_weight
from . TABLE_ORDERS_PRODUCTS . op
left join . TABLE_PRODUCTS . p on op.products_id = p.products_id
where op.products_id = . $pro[ products_id ];
$weightq = tep_db_query( $weightsql );
while ($weight = tep_db_fetch_array( $weightq )) {
if ($category_parent_id != 0)
$list_items[] = $weight[ products_weight ] . ;
}
这表明订购的每一产品都存在烟雾。 我所困的不是显示适当体重,而是需要显示总重量。 例如,如果产品被三次订购,每重7公斤,则该编码目前显示:
Product 7.00 7.00 7.00
How would I make it show the total weight, 21kg?