Php jCart购物车库

Php jCart购物车库,php,session,session-variables,shopping-cart,Php,Session,Session Variables,Shopping Cart,我使用的购物车来自: 但是在到达结账位置后,我想对流程进行更改 我想改变它是采取篮子的数据内容已经由用户完成。在这方面,我想采取以下行动: items, names, prices, qtys, itemCount and subtotal 我可以通过执行以下操作查看详细顺序: <?php echo '<pre>'; print_r($_SESSION['jcart']); echo '</pre>'; ?> 如何从jcart会话中提取数据 我想使用

我使用的购物车来自:

但是在到达结账位置后,我想对流程进行更改

我想改变它是采取篮子的数据内容已经由用户完成。在这方面,我想采取以下行动:

items, names, prices, qtys, itemCount and subtotal
我可以通过执行以下操作查看详细顺序:

<?php
echo '<pre>';
print_r($_SESSION['jcart']);
echo '</pre>';
?>

如何从jcart会话中提取数据

我想使用此数据将通过电子邮件返回的数据的详细信息发送给执行交易的购物车用户

您可以尝试:


这是一个简单的循环并计算商品总数和购物车总价值的例子。

您能提供print_r($_SESSION['jcart]])的输出吗??
foreach($jcart->get_contents() as $item) {
    $itemID = $item['id']; //gets the item's ID
    $itemName = $item['name']; //gets the item's name
    $itemPrice = $item['price']; // gets the item's price
    $itemQuantity = $item['qty']; // gets number of this product in cart
    $itemTotal = $item['price']*$item['qty']; // total order value of this line item
}