Hi @fergie77, do you have a bit of a time? We will soon launch a new update on the product form which will submit all the form submits. When the problem is not that urgent i would suggest to wait for this update ๐
How long roughly do you think? Iโd like to get the site live sooner than later
we are in the final testing. I cant make a promise but i would say next week
Okay I can wait for that! Thanks for letting me know
@jonas.halbstark Is it still looking like it might be this week?
Hi @fergie77, the update is live and you can already test it. Are you using the normal subscription app?
Brilliant Iโll give it a go! Itโs Seal Subscription that weโre using
Okay all working perfectly now, thank you for the update!! The only thing I've noticed is different is that my prices aren't coming through formatted. I'm using x-text as the attribute so that the variants change the price. Do I have to add something?
Can you send us a new preview link? I think the previous one expired :) @fergie77
Hmm, we changed something with the object properties to get closer to the liquid syntax. Can you try product.price instead of price?
Or maybe use the moneyFormat function: x-text="LiquifyHelper.moneyFormat(price)"
Will product.price still update dynamically?
Jup, we restructured the Alpine objects. Normally everything should still work with the old properties, but something might have been overlooked
Great Iโll give that a go, thank you!
Is this correct? It's not updating anymore when I pick variants
It stillt needs to be x-text or li-js-object. So in your case: x-text="product.price" or x-text="LiquifyHelper.moneyFormat(price)"
I haven't tested it. so I'm not really sure which one would fix the issue for now
This worked perfectly - x-text="LiquifyHelper.moneyFormat(price)" but the others didn't display a price at all
The only problem I'm having now is how to get my subscription amount to update when the variant changes. It should be 31.50 rather than 8.10
@jonas.halbstark Could you take a look at this please?
Hi @fergie77 does seal subscription offer a funtionality like this to update the prdouct price based on the selected selling plan? If not that should be doable by alpine. can you send me another preview link?
So i tested a bit and i would say the best solution would be the section rendering api to fetch the new content whenever something is changed in the product form. Just let me build an example so you can copy it.
That's brilliant, thank you! Really appreciate the help, it's the last thing we have to do before we go live
So this just uses the selling plan which seals subscription creates. You can copy the subscription elemnt over. Just keep in mind to also set an x-data="{selling_plan: '{{ product.selected_or_first_available_variant. selected_selling_plan_allocation.selling_plan.id }}', sellingplan_active: false }"
attribute around the subscription module and price.
to keep the sellingplan price reflected in the product price you can replace the li-js-price="price"
with li-js-price="product.selected_or_first_available_variant.selling_plan_allocations.find(allocation => allocation.selling_plan_id == selling_plan)?.price ?? price"
Just style it however you like and you are good to go.
My man you are fantastic thank you! I'll get that implemented asap and let you know how I get on
nice ๐ looking forward
is this x-data selling_plan etc to go on the seal subscriptions element?
you dont need the seal subscription element any more
its just raw html with a bit of alpine js. We just use the same information from the selling plan which seal subscription creates
Ahh okay, it seems like it's being automatically added so I'll take a look and see how to disable that
So do you mean this price and the subscription element should be in the same div? With the x-data as an attribute on that parent div
so its not necessary the same div but the the x-data attributes needs to be on a parent of both elements.
and then you can sytle it the way you want
So this is almost working my side, but it seems to be stripping out the checkboxes for the selling plans.
Here's the share link again if it's easier to see here
i think that app is removing it. At first i can see them and when the app loads they disapear
Two secs I'll see if I can disable that
You are correct! Working now, thank you
you can also display this information in the cart then. by using li-js-object="product.selling_plan_allocation.selling_plan.name"
Will selling_plan.price return the price after discount of each plan? So they can go next to the checkboxes
I think this should be showing up but it's not?
Sorry this one is a bit off topic but I have the recommended section from the template. Is there a way to hide it if there's nothing recommended?
Yes sure ๐ you can use li-if="recommendations.products != blank"
just out it on an element inside the element where the data-url is applied