Signup

VITALS | 40+ apps in one by VITALS

Learn how to integrate VITALS | 40+ apps in one with Store Pickup + Delivery

Fix checkout button

If you’re using Product Bundles or Volume Discounts, VITALS will take over the Checkout button. This will allow your customers to go to checkout without selecting pickup or delivery details.

To make sure your customers need to select pickup or delivery details:

1. Go to Vitals > Global App Settings

2. Go to Global Customizations > Custom JS Last

3. Copy and paste this code into the Custom JS Last field:

VITALS_HOOK__CAN_EXECUTE_CHECKOUT = function() {
    if (typeof window.Zapiet !== 'undefined' && typeof window.Zapiet.Widget !== 'undefined') {
        if (Zapiet.Widget.checkoutEnabled()) {
       return true;
    } else {
      var method = 'shipping';
      if ($('.checkoutMethodContainer.pickup').length) {
          method = 'pickup';
      }
      if ($('.checkoutMethodContainer.delivery').length) {
          method = 'delivery';
      }
      var errorMessage = ZapietCachedSettings.cached_config.translations[method].checkout_error;
      ZapietEvent.fire("checkout_error", errorMessage);
      return false;
    }
 }
 return true;
}

Fill in pickup address

If you’re using Product Bundles or Volume Discounts, we will not be able to fill in the pick up address on the checkout page.

To make sure we fill in the pickup address:

1. Go to Vitals > Global App Settings

2. Go to Global Customizations > Custom JS Last

3. Copy and paste this code into the Custom JS Last field: 

VITALS_HOOK__GET_CUSTOM_CHECKOUT_URL_PARAMETERS = function() {
    var params = {};
    Object.entries(Zapiet.Widget.getCheckoutParams()).forEach(([key, value]) => {
        params[key] = value;
    });
    return params;
}
I
Ismail is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.