我这里有个按钮。使用此按钮可将产品id为237、变体id为208673、蓝牙为attribute_pa_option的产品添加到购物车中。有没有办法用AJAX解决这个问题呢?
<div class="btnss">
<span class="price">
<span class="woocommerce-Price-amount amount">6,999
<span class="woocommerce-Price-currencySymbol">kr</span>
</span>
</span>
<div class="quantity buttons_added">
<input type="button" value="-" class="minus">
<label class="screen-reader-text" for="quantity_5b101f605f067">Quantity</label>
<input type="number" id="quantity_5b101f605f067" class="input-text qty text" step="1" min="1" max="" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" aria-labelledby="">
<input type="button" value="+" class="plus">
</div>
<a href="/?add-to-cart=237&variation_id=208673&attribute_pa_option=bluetooth" class="button product_type_simple add_to_cart_button ajax_add_to_cart">Add to cart</a>
</div>https://stackoverflow.com/questions/50631834
复制相似问题