Getting button to launch java code for popup checkout

I’d like to use the button element (or button shortcode) to lunch a checkout popup. The drop-in script given to my by the service that manages our checkout is as follows. The service provider is “chargebee”.

<a href="javascript:void(0)" data-cb-type="checkout" data-cb-plan-id="copy_of_residential-weekly"> subscribe </a>

I have added the following code to my site header as instructed by chargebee.

<script src="https://js.chargebee.com/v2/chargebee.js" data-cb-site="keycompost" ></script>

When the a href is placed in a text area or “raw content” box, it performs perfectly. My desire is to get this popup to launch from a button created via [button] shortcode.

The site it is installed on is http://keycompost.com/signup

Hi There,

Unfortunately, you can’t use the button shortcode to launch your popup.

But You can change the style of subscribe button, by adding the x-btn x-btn-green x-btn-real x-btn-square x-btn-large. So your subscribe button should be like this:

<a href="javascript:void(0)" class="x-btn x-btn-green x-btn-real x-btn-square x-btn-large" data-cb-type="checkout" data-cb-plan-id="copy_of_residential-weekly"> subscribe </a>

You can find all the button classes on this link:

http://demo.theme.co/integrity-1/shortcodes/buttons/

Hope it helps :slight_smile:

Worked! Thanks so much

You are most welcome. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.