Streaming live at 10am (PST)

Help with hotmart widget and onclick function

Hello guys,

I want to open the Hotmart widget when I click on my webflow button. Here’s the hotmart code:

<script type="text/javascript">
	function importHotmart(){ 
 		var imported = document.createElement('script'); 
 		imported.src = 'https://static.hotmart.com/checkout/widget.min.js'; 
 		document.head.appendChild(imported); 
	} 
 	importHotmart(); 
 </script> 
 <a onclick="return false;" href="https://pay.hotmart.com/G20820008X?checkoutMode=2&off=jdjalttn" class="hotmart-fb"><img src='https://static.hotmart.com/img/btn-buy-green.png'></a> 

I don’t want to use the button provided with the widget so I need to call:

<a onclick="return false;" href="https://pay.hotmart.com/G20820008X?checkoutMode=2&off=jdjalttn" class="hotmart-fb"><img src='https://static.hotmart.com/img/btn-buy-green.png'></a> 

When I click on my webflow button. But I’m not getting it right.

Thanks!


Here is my public share link: LINK
(how to access public share link)

Ok, i was able to find a solution.

I just replaced the webflow buttons with a custom code that is:

<a onclick="return false;" href="https://pay.hotmart.com/G20820008X?checkoutMode=2&off=oizuita2" class="button-basico red-button full-width w-button hotmart-fb">inscreva-se</a>