Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript SimpleCart JS shelfItem在表中?_Javascript_Html_Css_Simplecart - Fatal编程技术网

Javascript SimpleCart JS shelfItem在表中?

Javascript SimpleCart JS shelfItem在表中?,javascript,html,css,simplecart,Javascript,Html,Css,Simplecart,如果我将简单的购物车ShelfItem放在表中,我如何才能使“添加到购物车”工作? 我还是找不到一个办法来做这件事。 我使用的是eshopper模板,它的部分id包含购物车项目等等。但是,如果我将simplecart javascript放入,等等,当我按下add to cart时,它将无法工作。谁来教我怎么用这个,谢谢 对不起,我找不到答案,或者我不知道怎么做 编辑:添加购物车正在工作,我想?至少能够使“数量”增加,或者能够清空购物车,但是现在价格没有更新,我做错了什么 购物车 项目 描

如果我将简单的购物车ShelfItem放在表中,我如何才能使“添加到购物车”工作? 我还是找不到一个办法来做这件事。 我使用的是eshopper模板,它的部分id包含购物车项目等等。但是,如果我将simplecart javascript放入,等等,当我按下add to cart时,它将无法工作。谁来教我怎么用这个,谢谢

对不起,我找不到答案,或者我不知道怎么做

编辑:添加购物车正在工作,我想?至少能够使“数量”增加,或者能够清空购物车,但是现在价格没有更新,我做错了什么


  • 购物车
  • 项目 描述 价格 量 小计 星球大战人物百科全书 35.99美元


    珀西·杰克逊与奥林匹克5本书 $80.99

    星球大战:绝地之路 $30.99

    Nagash的回归(结束时间) $50.99

    星球大战:达斯·维德和幽灵监狱 $65.99

    在这里为我工作:

    我会发表评论,但显然我需要50分的声誉。。。(不确定是否了解这种行为)

    有人吗?我需要尽快完成我在学校的小项目。感谢如果有任何帮助:DHi,谢谢你发布一个网站来参考。一旦我能做到,我会回复的。有多个javascript会导致问题吗?我的意思是,我在使用一个模板,也在使用购物车JS。我看不到你的评论。你是说你对上面的帖子发表了评论吗?但是如果我不能,我希望你能让我知道我面临的问题是什么。提前感谢:)我想知道是否有我可以参考的源代码,比如为什么我的不工作,而你的工作正常等等。谢谢
     <section id="cart_items">
            <div class="container">
                <div class="breadcrumbs">
                    <ol class="breadcrumb">
                      <li><a href="User/HomePage.aspx">Home</a></li>
                      <li class="active">Shopping Cart</li>
                    </ol>
                </div>
                <div class="table-responsive cart_info">
                    <table class="table table-condensed">
                        <thead>
                            <tr class="cart_menu">
                                <td class="image">Item</td>
                                <td class="description">Description</td>
                                <td class="price">Price</td>
                                <td class="quantity">Quantity</td>
                                <td class="total">SubTotal</td>
                            </tr>
                        </thead>
                        <tbody>
    
    
    <div class="simpleCart_shelfItem">
    
    <tr>
        <td class="cart_product">      
            <img src="Images (Books)/Images/511SkrkMNCL.jpg" alt="Star Wars Character Encyclopedia" class="item_thumb" thumb="Images (Books)/Images/thumb/511SkrkMNCL.jpg" style="width: 133px; height: 168px;"/>  
         </td>
    
        <td class="cart_description">
            <h4 class="item_name">Star Wars Character Encyclopedia</h4>
        </td>
    
        <td class="cart_price">
        <span class="item_price">$35.99</span><br /> 
        </td>
    
        <td class="cart_quantity"> 
              <a href="javascript:;" class="simpleCart_increment">+</a>
        <p> <input type="text" value="1" class="item_Quantity"/> <br>
              <a href="javascript:;" class="simpleCart_decrement">-</a>
            <br />
            <a href="#" onclick="simpleCart.add('name=Star Wars Character Encyclopedia','price=$35.99','image=Images (Books)/Images/thumb/511SkrkMNCL.jpg');return false;"> Add to Cart</a> 
        </td>
    
       <td class="cart_total"> 
        <span class="simpleCart_total"></span>
    
       </td>
    
    </tr>
    
    <tr>
        <td class="cart_product">      
            <img src="Images (Books)/Images/81rH-DQqQOL.jpg" alt="Percy Jackson and the Olympians 5 Book " class="item_thumb" thumb="Images (Books)/Images/thumb/81rH-DQqQOL.jpg" style="width: 133px; height: 168px;"/>  
         </td>
    
        <td class="cart_description">
            <h4 class="item_name">Percy Jackson and the Olympians 5 Book </h4>
        </td>
    
        <td class="cart_price">
        <span class="item_price">$80.99</span> 
        </td>
    
        <td class="cart_quantity">  
        <p> <input type="text" value="1" class="item_Quantity"/> <br>
            <br />
            <a href="#" onclick="simpleCart.add('name=Percy Jackson and the Olympians 5 Book','price=80.99','image=Images (Books)/Images/thumb/81rH-DQqQOL.jpg');return false;"> Add to Cart</a>
    
        </td>
    
       <td class="cart_total"> 
        <span class="simpleCart_total"></span>
       </td>
    
    </tr>
    
    
    
    <tr>
        <td class="cart_product">      
            <img src="Images (Books)/Images/51mGJ4PmMzL.jpg" alt="Star Wars: The Jedi Path" class="item_thumb" thumb="Images (Books)/Images/thumb/51mGJ4PmMzL.jpg" style="width: 133px; height: 168px;"/>  
         </td>
    
        <td class="cart_description">
            <h4 class="item_name">Star Wars: The Jedi Path</h4>
        </td>
    
        <td class="cart_price">
        <span class="item_price">$30.99</span> 
        </td>
    
        <td class="cart_quantity">  
        <p> <input type="text" value="1" class="item_Quantity"/> <br>
            <br />
            <a href="#" onclick="simpleCart.add('name=Star Wars: The Jedi Path','price=30.99','image=Images (Books)/Images/thumb/51mGJ4PmMzL.jpg');return false;"> Add to Cart</a>
    
        </td>
    
       <td class="cart_total"> 
        <span class="simpleCart_total"></span>
       </td>
    
    </tr>
    
    
    <tr>
        <td class="cart_product">      
         <img src="Images (Books)/Images/81cm6ZST7tL.jpg" alt="The Return of Nagash (The End Times)" class="item_thumb" thumb="Images (Books)/Images/thumb/81cm6ZST7tL.jpg" style="width: 133px; height: 168px;"/>  
         </td>
    
        <td class="cart_description">
            <h4 class="item_name">The Return of Nagash (The End Times)</h4>
        </td>
    
        <td class="cart_price">
        <span class="item_price">$50.99</span> 
        </td>
    
        <td class="cart_quantity">  
        <p> <input type="text" value="1" class="item_Quantity"/> <br>
            <br />
            <a href="#" onclick="simpleCart.add('name=The Return of Nagash (The End Times)','price=50.99','image=Images (Books)/Images/thumb/81cm6ZST7tL.jpg');return false;"> Add to Cart</a>
    
        </td>
    
       <td class="cart_total"> 
        <span class="simpleCart_total"></span>
       </td>
    
    </tr>
    
    
    <tr>
        <td class="cart_product">      
            <img src="Images (Books)/Images/51m3gTdOteL.jpg" alt="Star Wars: Darth Vader and the Ghost Prison" class="item_thumb" thumb="Images (Books)/Images/thumb/51m3gTdOteL.jpg" style="width: 133px; height: 168px;"/>  
         </td>
    
        <td class="cart_description">
            <h4 class="item_name">Star Wars: Darth Vader and the Ghost Prison</h4>
        </td>
    
        <td class="cart_price">
        <span class="item_price">$65.99</span> 
        </td>
    
        <td class="cart_quantity">  
       <p> <input type="text" value="1" class="item_Quantity"/> <br>
            <br />
            <a href="#" onclick="simpleCart.add('name=Star Wars: Darth Vader and the Ghost Prison<','price=65.99','image=Images (Books)/Images/thumb/51m3gTdOteL.jpg');return false;"> Add to Cart</a>
    
        </td>
    
       <td class="cart_total"> 
        <span class="simpleCart_total"></span>
    
    
       </td>
    
    </tr>
    
    
                        </tbody>
                    </table>
                </div>
            </div>
        </section> <!--/#cart_items-->