我使用此工具add to cart interaction完全像我在下面的演示中使用的那样进行交互,但我的问题是:当我按下“结帐按钮”如何将数据发送到php?< / strong>或如何通过php将此信息调用到结帐页面?
这是一个如何运作的演示:
a {
cursor:pointer;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="http://yuridesign.com.mx/otro/reset.css" rel="stylesheet"/>
<link href="http://yuridesign.com.mx/otro/style.css" rel="stylesheet"/>
<script src="http://yuridesign.com.mx/js/cartmain.js"></script>
<a class="cd-add-to-cart" data-price="25.99" data-name="Anillo">Add to cart</a>
<div class="cd-cart-container empty">
<a href="#0" class="cd-cart-trigger">
Cart
<ul class="count"> <!-- cart items count -->
<li>0</li>
<li>0</li>
</ul> <!-- .count -->
</a>
<div class="cd-cart">
<div class="wrapper">
<header>
<h2>Cart</h2>
<span class="undo">Product removed. <a href="#0">undo</a></span>
</header>
<div class="body">
<ul>
<!-- products added to the cart will be inserted here using JavaScript -->
</ul>
</div>
<footer>
<a href="#0" class="checkout btn"><em>Checkout - $<span>0</span></em></a>
</footer>
</div>
</div> <!-- .cd-cart -->
</div> <!-- cd-cart-container -->