Home Forums WoodMart support forum Custom Add to Cart Button That Opens Hidden Sidebar

Custom Add to Cart Button That Opens Hidden Sidebar

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #67258

    robertarrow
    Participant

    Is there a way to create a button or custom Visual Composer HTML Module that uses the default WooCommerce ‘Add to Cart’ URL query, such as ?add-to-cart=25 and have a product be added to the cart and show the hidden sidebar at the same time?

    I know that by adding the class ‘cart-widget-opener’ to the button module will open the sidebar, but my product does not get added.

    Please let me know if this is possible.

    #67280

    Artem Temos
    Keymaster

    Hello,

    Try to use the following HTML code to display such button

    <a class="button btn-color-default add_to_cart_button ajax_add_to_cart" href="/you-page/?add-to-cart=48" data-quantity="1" data-product_id="48">Add to cart</a>

    Regards

Viewing 2 posts - 1 through 2 (of 2 total)