Chap WordPress theme

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
<a class="ui large primary button" href="[add_to_cart_url id=99]">[icon cart plus] Add to cart</a>
Add to cart

$3.00 $2.00View product

[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
View product
[wcaddtocart id="99"]
Add to cart button by SKU
[wcaddtocart sku="patient-ninja"]
Add to cart button without price
View product
[wcaddtocart id="1045" show_price="false"]
Add to cart button with custom classes
View product
[wcaddtocart id="67" show_price="false" button_classes="big positive circular"]