SimpleCart JS购物车图像未定义

时间:2016-03-29 11:38:27

标签: javascript image undefined cart simplecart

我是新手,所以希望有人可以提供帮助。我正在使用simplecart并且似乎无法显示购物车图像,购物车图像显示为未定义。我已经尝试了所有建议的工作,我在这里找到了但没有快乐。

我的HTML标记:

<div class="simpleCart_shelfItem">
    <img src="images/clothingmens/1001.jpg" class="item-thumb">
    <p class="item_name"> Oneill Hoody</p><span class="item_price">&pound;59.00</span>
    <p><select class="item_size">
        <option value="0">Select Size</option>
        <option value="Small"> Small </option>
        <option value="Medium"> Medium </option>
        <option value="Large"> Large </option>
        </select></br>
    <a class="item_add" href="javascript:;"> Add to Cart </a></p>
                            </div>

我的Javascript:

            settings = {
                checkout                : { type: "PayPal", email: "removed" },
                currency                : "GBP",
                language                : "english",
                cartStyle               : "table",
                cartColumns         : [
                    {view:'image' , attr:'thumb', label: false},
                    { attr: "name", label: "Name" },
                    { attr: "price", label: "Price", view: 'currency' },
                    { attr: "size", label: "Size" },
                    { attr: "quantity", label: "Qty" },
                    { attr: "total", label: "SubTotal", view: 'currency' },
                    { view: "remove", text: "Remove", label: false }                
                ],



                shippingFlatRate        : 0,
                shippingQuantityRate    : 0,
                shippingTotalRate       : 0,
                shippingCustom      : null,

                taxRate             : 0,

                taxShipping         : false,

                data                : {}

            },

先谢谢

1 个答案:

答案 0 :(得分:0)

好。大声笑。所以在你的图片标签

<img src="images/clothingmens/1001.jpg" class="item-thumb">

将'item_image'添加到班级。

<img src="images/clothingmens/1001.jpg" class="item-thumb item_image">

那应该解决它。祝你好运!

另外,我不确定,但您可能需要添加'拇指标签'

<img src="images/clothingmens/1001.jpg" class="item-thumb item_image" thumb="images/clothingmens/1001.jpg">

希望这有帮助!