We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1202c63 commit ada4294Copy full SHA for ada4294
resources/js/paddle.js
@@ -0,0 +1,8 @@
1
+Paddle.Setup({ vendor: 4062 });
2
+function openCheckout(id, email = null) {
3
+ Paddle.Checkout.open({
4
+ product: id,
5
+ email: email
6
+ });
7
+}
8
+$('.buy').on('click', (e) => openCheckout($(e.target).data('id')));
resources/views/partials/assets.twig
@@ -6,6 +6,9 @@
{{ template.includes.render('cp_scripts')|raw }}
9
+<script src="https://cdn.paddle.com/paddle/paddle.js"></script>
10
+{{ asset_add("scripts.js", "theme::js/paddle.js") }}
11
+
12
<script type="text/javascript">
13
{% for script in asset_inlines("scripts.js") %}
14
{{ script|raw }}
0 commit comments