Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/84.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
Jquery 如何获得完整的演示简单购物车?_Jquery_Shopping Cart - Fatal编程技术网

Jquery 如何获得完整的演示简单购物车?

Jquery 如何获得完整的演示简单购物车?,jquery,shopping-cart,Jquery,Shopping Cart,我在以下网站上看到了一个简单购物车的演示: 然而,在下载中,它只是一个基本的购物车。我希望它看起来像演示中显示的那样?但是似乎找不到正确的css和页面等?是的,您需要这个 加上这个HTML: <div id="demoContainer"> <!--Create a div with the class simpleCart_shelfItem--> <div class="simpleCart_shelfItem"&g

我在以下网站上看到了一个简单购物车的演示:

然而,在下载中,它只是一个基本的购物车。我希望它看起来像演示中显示的那样?但是似乎找不到正确的css和页面等?

是的,您需要这个

加上这个HTML:

    <div id="demoContainer">

        <!--Create a div with the class simpleCart_shelfItem-->

        <div class="simpleCart_shelfItem">

            <!--Notice the class names of each tag begin with item_ -->

            <img src="images/the-incredibles.png" alt="The Incredibles Purchase at Amazon http://amzn.com/B00005JN4W" title="Buy at www.amzn.com/B00005JN4W" class="item_image"/>

            <h5 class="item_name">Sample DVD</h5>

            <p class="item_Description">

                To create a shelf item, you create a div with a class of “simpleCart_shelfItem”.

            </p>

            <span class="item_price">$14.99</span>

            <a href="javascript:;" class="item_add">Add to Cart</a>

            <span class="item_thumb">images/the-incredibles_tn.png</span>

        </div>  



        <!--Create a div with the class simpleCart_shelfItem-->

        <div class="simpleCart_shelfItem">

            <!--Notice the class names of each tag begin with item_ -->

            <img src="images/wolverine-3.png" alt="Wolverine Purchase at Amazon http://amzn.com/B002CMLIJ6" title="Buy at http://amzn.com/B002CMLIJ6" class="item_image"/>

            <h5 class="item_name">Sample DVD 2</h5>

            <p class="item_Description">

                Any field you want for your item can be set by creating a tag with a class of “item_[field-name]”

            </p>

            <span class="item_price">$22.99</span>

            <a href="javascript:;" class="item_add">Add to Cart</a>



            <span class="item_thumb">images/wolverine-3_tn.png</span>

        </div>



        <!--Create a div with the class simpleCart_shelfItem-->

        <div class="simpleCart_shelfItem">

            <!--Notice the class names of each tag begin with item_ -->

            <img src="images/ghostbusters.png" alt="Ghostbusters Game Purchase at Amazon http://amzn.com/B001ELJDXE" title="Buy at http://amzn.com/B001ELJDXE" class="item_image"/>

            <h5 class="item_name">Sample Game</h5>

            <p class="item_Description">

                To create the add to cart button create a tag with the class “item_quantity”.

            </p>

            <span class="item_price">$59.99</span>

            <a href="javascript:;" class="item_add">Add to Cart</a>



            <span class="item_thumb">images/ghostbusters_tn.png</span>

        </div>

            <!--Create a div with the class simpleCart_shelfItem-->

            <div class="simpleCart_shelfItem">

                <!--Notice the class names of each tag begin with item_ -->

                <img src="images/soviet-kitsch.png" alt="Soviet Kitsch Purchase at Amazon http://amzn.com/B0002XEDXU" title="Buy at http://amzn.com/B0002XEDXU" class="item_image"/>

                <h5 class="item_name">Sample CD</h5>

                <p class="item_Description">

                    If can display info about the cart anywhere on your page.

                </p>

                <span class="item_price">$8.99</span>

                <a href="javascript:;" class="item_add">Add to Cart</a>

                <span class="item_thumb">images/soviet-kitsch_tn.png</span>

            </div>  



            <!--Create a div with the class simpleCart_shelfItem-->

            <div class="simpleCart_shelfItem">

                <!--Notice the class names of each tag begin with item_ -->

                <img src="images/evil-empire.png" alt="Evil Empire Purchase at Amazon http://amzn.com/B0000029D9" title="Buy at http://amzn.com/B0000029D9" class="item_image"/>

                <h5 class="item_name">Sample CD 2</h5>

                <p class="item_Description">

                    A class of simpleCart_total, will display the cart total value.

                </p>

                <span class="item_price">$8.97</span>

                <a href="javascript:;" class="item_add">Add to Cart</a>



                <span class="item_thumb">images/evil-empire_tn.png</span>

            </div>



            <!--Create a div with the class simpleCart_shelfItem-->

            <div class="simpleCart_shelfItem">

                <!--Notice the class names of each tag begin with item_ -->

                <img src="images/attack-release.png" alt="Attack and Release Purchase at Amazon http://amzn.com/B0013K6WLM" title="Buy at http://amzn.com/B0013K6WLM" class="item_image"/>

                <h5 class="item_name">Sample CD 3</h5>

                <p class="item_Description">

                    A class of simpleCart_checkout will send you off to Paypal or Google Checkout

                </p>

                <span class="item_price">$13.49</span>

                <a href="javascript:;" class="item_add">Add to Cart</a>



                <span class="item_thumb">images/attack-release_tn.png</span>

            </div>







            <div id="cartTotal">

                <strong>Total: </strong><span class="simpleCart_total"></span>

            </div>

            <!--Add a div with the class of simpleCart_items to display what is in the user's cart-->

            <div class="simpleCart_items"></div>

                <!--use a class of simpleCart_empty to empty the cart and simpleCart_checkout to checkout -->

                <a href="javascript:;" class="simpleCart_empty">Empty Cart</a>

                <a href="javascript:;" class="simpleCart_checkout">Checkout</a>

        <!--End #demoContainer-->

        </div>



        <script type="text/javascript">

        var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

        document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

        </script>

        <script type="text/javascript">

        try {

        var pageTracker = _gat._getTracker("UA-5082207-10");

        pageTracker._trackPageview();

        } catch(err) {}</script>

示例DVD

要创建工具架项目,请使用“simpleCart_shelfItem”类创建一个div。

$14.99 图片/the-incredibles_tn.png 示例DVD 2

可以通过创建一个类为“item_U8;[field name]”的标记来设置项目所需的任何字段

$22.99 图片/狼獾-3_tn.png 示例游戏

要创建“添加到购物车”按钮,请创建一个带有类“item\u quantity”的标记。

$59.99 图像/幻影终结者\u tn.png 样本光盘

如果您可以在页面的任何位置显示有关购物车的信息。

$8.99 图片/苏联媚俗 样本CD 2

simpleCart_total类将显示购物车总值。

$8.97 图片/邪恶帝国\u tn.png 样本CD 3

一个simpleCart_checkout类会将您发送到Paypal或Google checkout

$13.49 图像/攻击-发布\u tn.png 总计: var gaJsHost=((“https:==document.location.protocol)?”https://ssl." : "http://www."); write(unescape(“%3Cscript src=”+gaJsHost+“google analytics.com/ga.js”type='text/javascript'%3E%3C/script%3E”); 试一试{ var pageTracker=_gat._getTracker(“UA-5082207-10”); 页面跟踪器。_trackPageview(); }捕获(错误){}
该演示页面似乎仅使用背景图像作为其页面的整个设计(http://simplecartjs.com/images/BGDemoContent.jpg),这是很奇怪的,因为大部分设计可以通过CSS相对轻松地实现


由于您可能不是手动将图像转换为CSS的专家,因此您似乎可以自行创建CSS/图形。或者你可以在你的网站上使用他们的背景图像,在这种情况下,你必须编辑掉“演示”文本。

这里是一个不同的使用Google Checkout定制购物车的演示:

关于使用CSS和JavaScript自定义购物车UI和行为的文档如下: