我正在开发一个购物车应用程序,它将输出购物车的价格。我有三个类别的这辆车,采购,产品
public class Product {
private int id;
private String name;
private double price;
Offer offer;
// getter setter
public double getPrice(int quantity) {
return offer.getPrice....
}
}
public class Purchase {
Product pro
我试图计算购物车中产品的鬼魂总量,下面是我的代码:
//If we have no weight, try to calculate this
$weight = 0;
if ($quote->getShippingAddress()->getWeight() == null ||
$quote->getShippingAddress()->getWeight() == 0 ||
$quote->getShippingAddress()->getW