0
是否有一種簡單的方法/功能可以接收願望清單中產品的總計Total?Magento可能獲得Wishlish商品的總計總數
是否有一種簡單的方法/功能可以接收願望清單中產品的總計Total?Magento可能獲得Wishlish商品的總計總數
像這樣的東西可以工作
public function getWishListTotal($customer) {
$wishList = Mage::getSingleton('wishlist/wishlist')->loadByCustomer($customer);
$wishListItemCollection = $wishList->getItemCollection();
$wishListTotal=0;
foreach ($wishListItemCollection as $_item) {
$_product = $_item->getProduct();
$wishListTotal = $wishListTotal + $_product->getPrice()
}
return $wishListTotal;
}
這是價格總的心願項目,不含稅,運費等