【问题标题】:SimpleCart JS Cart Image UndefinedSimpleCart JS 购物车图像未定义
【发布时间】:2016-03-29 11:38:26
【问题描述】:

我是这里的新手,希望有人能提供帮助。我正在使用 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                : {}

            },

在此致谢

【问题讨论】:

    标签: javascript image undefined cart simplecart


    【解决方案1】:

    好的。哈哈。所以在你的图片标签中

    <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">
    

    希望这会有所帮助!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-11-30
      • 1970-01-01
      • 2013-09-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多