Add to cart

Add to cart URL
<add_to_cart_url id="99">
Echo the URL on the add to cart button of a single product by ID.
Add to cart button using add to cart URL
Add to cart
{lt}a class="ui large primary button" href="[add_to_cart_url id=99]"{gt}[icon cart plus] Add to cart{lt}/a{gt}
Add to cart

$3.00 $2.00Add to cart

<add_to_cart id="99">
Show the price and add to cart button of a single product by ID.
Chap theme’s add to cart shortcode

The [wcaddtocart] shortcode is Chap theme’s AMP-compatible alternative for the WooCommerce [add_to_cart] shortcode.

Wcaddtocart shortcode arguments
idProduct ID.
skuProduct SKU.
quantityQuantity (default: 1).
show_priceShow price (default: true).
wrapper_classesWrapper classes (default: "ui paddingless compact segment product woocommerce add_to_cart_inline").
price_classesPrice wrapper classes (default: "ui big top attached center aligned bold text basic primary segment").
button_classesAdditional classes for the button.
Add to cart button by ID
$3.00 $2.00
Add to cart
<wcaddtocart id="99">
Add to cart button by SKU
<wcaddtocart sku="patient-ninja">
Add to cart button without price
<wcaddtocart id="1045" show_price="false">
Add to cart button with custom classes
<wcaddtocart id="67" show_price="false" button_classes="big positive circular">

Leave a comment

Your email address will not be published. Required fields are marked *