我想在prestashop os-commerce上購買購物車內容。怎麼辦?如何獲取購物車內容? (prestashop)
2
A
回答
3
你應該看看位於classes/Cart.php中的Cart類。有一個名爲getProducts()的方法。
/**
* Return cart products
*
* @result array Products
*/
public function getProducts($refresh = false, $id_product = false)
{
// code...
}
希望這有助於
BR,
0
它的工作:享受
模塊掛鉤,你可以使用這個:
$products = $params['cart']->getProducts(true);
0
只需使用
Context::getContext()->cart
參考此鏈接 https://www.prestashop.com/forums/topic/440516-how-to-get-all-product-ids-in-current-cart/
相關問題
- 1. Prestashop api - 如何獲取當前購物車內容
- 2. Prestashop購物車
- 3. 如何在ajax-cart.js(prestashop模塊)中獲取購物車ID
- 4. Prestashop購物車不工作
- 5. Prestashop:如何清空購物車?
- 6. 如何限制購物車產品Prestashop
- 7. 如何獲取亞馬遜購物車的內容?
- 8. Mailchimp購物車內容塊
- 9. 如何將woocommerce購物車內容指向購物頁面?
- 10. 「購物車塊」和「添加到購物車」按鈕消失Prestashop
- 11. 的Prestashop塊購物車和購物車控制器
- 12. 查看購物車Not Displaying購物車的內容
- 13. 如何從購物車的Prestashop獲得總重量
- 14. 如何在PRESTASHOP中創建購物車內容作爲pdf輸出
- 15. Prestashop - 使用Ajax購物車獲取產品的id_manufacturer
- 16. 如何獲取購物車插入ID和更新的購物車ID magento
- 17. Prestashop「加入購物車」由crawler訪問?
- 18. Prestashop webservice API創建購物車規則
- 19. Prestashop加入購物車功能
- 20. 購物車重定向Prestashop非Ajax
- 21. 新內容區域Magento購物車
- 22. Bigcommerce模板建議購物車內容
- 23. Wordpress Jigoshop購物車內容已更改
- 24. 如何在沒有操作的情況下獲取woocommerce購物車內容?
- 25. Python購物車加入購物車,獲取總數獲得num項目
- 26. 如何獲取購物車中的捆綁物品
- 27. 如何在購物車中使用模型獲取物品? (Magento)
- 28. SimpleCartJS - 如何獲取購物車中的所有物品?
- 29. 如何更新DIV內容(如購物車DIV)
- 30. 如何單擊添加到購物車中的Prestashop
看看在blockcart模塊,它會給你如何做到這一點的想法 – romainberger 2012-07-30 21:23:50