Buy Me – Buy Button Custom Functions

FUNCTIONS TO REFRESH THE WIDGET

To Refresh The Sticky Buy Me Widget

BUY_ME.BMRefreshBuyMeWidget();

By using this function, you can refresh the Sticky Buy Me Widget on the product page.

To Refresh The Sticky Buy Me Cart

BUY_ME.BMRefreshCartWidget();

By using this function, you can refresh the Sticky Buy Me Cart on any of the pages.

To Refresh The Sticky Cart Preview

BUY_ME.BMRefreshAddedItemPreviewWidget();

By using this function, you can refresh the Sticky Cart Preview on any of the pages.

To Refresh The Quick Buy Me Widget

BUY_ME.BMRefreshQuickBuyWidget();

By using this function, you can refresh the Quick Buy Me Widget on the product listing.

To Refresh The Sticky URL-Based ATC

BUY_ME.BMRefreshURLBasedListingWidget();

By using this function, you can refresh the Sticky URL-Based ATC on the product page as well as on the other pages.

To Refresh The Widgets Of The Festival Attractions

BUY_ME.BMRefreshFestivalAttractions();

By using this function, you can refresh the widgets of the Festival Attractions.

To Refresh The Review Stars In The Sticky Buy Me Widget

BUY_ME.BMRefreshReviewStars();

By using this function, you can refresh the review stars in the Sticky Buy Me Widget on the product page.

To Refresh The Product Title Size In The Sticky Buy Me Widget / Stick URL Based ATC

BUY_ME.BMRefreshTitleSize();

By using this function, you can refresh the product title size in the Sticky Buy Me Widget / Sticky URL Based ATC.

OTHER FUNCTIONS FOR THE STICKY BUY ME WIDGET

Stop Redirecting And Stay On The Page After The Item Is Added To The Cart

window.BUY_ME.BMWidgetCustomClickEvent = function() {};

By using this function, you can stop redirecting to the cart/checkout page and stay on the same page (product page) after an item is added to the cart through the “Add-To-Cart” button of the Sticky Buy Me Widget.

Stop Redirecting And Reload The Theme Cart After The Item Is Added To The Cart

window.BUY_ME.BMWidgetCustomClickEvent = function() {
    window.location.reload();
};

By using this function, you can stop redirecting to the cart/checkout page and stay on the same page (product page) after an item is added to the cart through the “Add-To-Cart” button of the Sticky Buy Me Widget and reload the theme’s cart.

Add Item To The Cart And Redirecting To A Specific Page

window.BUY_ME.BMWidgetCustomClickEvent = function() {
    window.location.href = “##SPECIFIC_PAGE_URL##“;
};

By using this function, you can redirect the customers to a specific page after an item is added to the cart through the “Add-To-Cart” button of the Sticky Buy Me Widget.

Here, you need to add a page URL where you want to redirect. Please add the URL between the quotes.

OTHER FUNCTIONS FOR THE STICKY BUY ME CART

Click And Redirect To The Cart Page

window.BUY_ME.BMCartCustomClickEvent = function() {
    window.location.href = ‘/cart’;
};

By using this function, you can start redirecting to the cart page while clicking on the Sticky Buy Me Cart.

Click And Redirect To The Checkout Page

window.BUY_ME.BMCartCustomClickEvent = function() {
    window.location.href = ‘/checkout’;
};

By using this function, you can start redirecting to the checkout page directly while clicking on the Sticky Buy Me Cart.

Click And Open The Cart Drawer

window.BUY_ME.BMCartCustomClickEvent = function() {
    $(“##ID_OR_CLASS_NAME##“).click();
};

By using this function, you can open the cart drawer while clicking on the Sticky Buy Me Cart.

Note: If you put ID then add #(hash) before ID and if you put class then add .(dot) before class.

Click And Redirect To A Specific Page

window.BUY_ME.BMCartCustomClickEvent = function() {
    window.location.href = “##SPECIFIC_PAGE_URL##“;
};

By using this function, you can redirect to a specific page while clicking on the Sticky Buy Me Cart.

Here you need to add a page URL where you want to redirect. Please add the URL between the quotes.

OTHER FUNCTIONS FOR THE QUICK BUY ME WIDGET

Stop Redirecting And Stay On The Page After The Item Is Added To The Cart

window.BUY_ME.BMQuickBuyMeCustomFunction = function() {};

By using this function, you can stop redirecting to the cart/checkout page and stay on the same page after an item is added to the cart through the Quick Buy Me Widget.

Stop Redirecting And Reload The Theme Cart After The Item Is Added To The Cart

window.BUY_ME.BMQuickBuyMeCustomFunction = function() {
    window.location.reload();
};

By using this function, you can stop redirecting to the cart/checkout page and stay on the same page after an item is added to the cart through the Quick Buy Me Widget and reload the theme’s cart.

Add Item To The Cart And Redirecting To A Specific Page

window.BUY_ME.BMQuickBuyMeCustomFunction = function() {
    window.location.href = “##SPECIFIC_PAGE_URL##“;
};

By using this function, you can redirect to a specific page after an item is added to the cart through the Quick Buy Me Widget.

Here you need to add a page URL where you want to redirect. Please add the URL between the quotes.

OTHER FUNCTIONS FOR THE STICKY URL BASED ATC

(Sticky URL Based ATC Is Used To Display The Sticky Buy Me Widget On The Product Pages As Well As On Pages Other Than The Product Page.)

Stop Redirecting And Stay On The Page After The Item Is Added To The Cart

window.BUY_ME.BMWidgetURLCustomAfterClickEvent = function() {};

By using this function, you can stop redirecting to the cart/checkout page and stay on the same page after an item is added to the cart through the “Add-To-Cart” button of the Sticky URL Based ATC.

Stop Redirecting And Reload The Theme Cart After The Item Is Added To The Cart

window.BUY_ME.BMWidgetCustomClickEvent = function() {
    window.location.reload();
};

By using this function, you can stop redirecting to the cart/checkout page and stay on the same page after an item is added to the cart through the “Add-To-Cart” button of the Sticky URL Based ATC and reload the theme’s cart.

Add Item To The Cart And Redirecting To A Specific Page

window.BUY_ME.BMWidgetURLCustomAfterClickEvent = function() {
    window.location.href = “##SPECIFIC_PAGE_URL##“;
};

By using this function, you can redirect to a specific page after an item is added to the cart through the “Add-To-Cart” button of the Sticky URL Based ATC.

Here you need to add a page URL where you want to redirect. Please add the URL between the quotes.