Closed mark-chief closed 7 months ago
Also just to note, the product sync doesn't update with my subscription plan (tier), just remains empty.
I have also tried this, but it returns a 404, i;m not 100 sure how to fomrat that jason and price/product.
$(document).on('change', '#quantityInput', function() {
var updatedNumber = $(this).val();
var csrfToken = '{{ craft.app.request.getCsrfToken() }}';
var formData = {
"updates": {
"prod_PeNmrSJtZFGKf4": {
"quantity": updatedNumber
}
}
};
$.ajax({
type:"POST",
url:"enupal-stripe/cart/update",
data: formData,
dataType : 'json',
success: function(response) {
console.log(response);
}.bind(this),
error: function(xhr, status, err) {
console.error(xhr, status, err.toString());
}.bind(this)
});
});
Thanks for your help.
@andrelopez hey, I dont suppose you have had time to help with this? Thank you in advance.
Hi @mark-chief
Sorry, there is no way to update the quantity of subscriptions on the Stripe Checkout page (as one-time payments).
So, you might have a couple of options:
Please let me know if you have any questions
Description
Hello, is it possible to update the subscription plan quantity dynamically from a number field? Without reloading the page
{{ craft.enupalstripe.paymentForm('leadersSeat', {quantity: number}) }}
I am loading the above line through ajax and updating the number there, but i keep getting :
Full code below:
_stripeCart.twig:
Or is there a much easier way to do this?
thanks
Craft 4 Plugin version 5.5.1