我这里有这个按钮。此按钮的用途是将产品 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>
Run Code Online (Sandbox Code Playgroud)