我目前正在我的大卡特爾網站上創建一個自定義頁面。在這個頁面上,我想列出特定類別的產品(即襯衫,夾克和牛仔褲)。我現在的代碼是: {% for product in products %}
{% if forloop.first %}
<ul id="products" class="{% if forloop.length == 1 %}single_product{% end
處理自定義大卡特爾主題和我快完成了,唯一不起作用的部分是當用戶更新購物車中的產品數量時,他們可以將數字設置爲一個大於剩餘股票的價值。使用大卡特爾API已經變量稱爲產品與VAR product.options- Returns all of the options of a product whether they are
sold out or not.
我然後遍歷所有選項,一個產品像這樣