Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hey There,
I've tried to find someting about how to change a Liquid code operator like " {% if product.id == 8841903374659 %} " with a JS script to something like
function changeProductId() {
var ProductId = 32845384252
/* --> overwriting the current Liquid code or changing the ID */
}
Thanks for your help !
Hi @yungmuehle ,
I think you can't change liquid by JS code. because it is 2 different variables
Hope my solution works perfectly for you!
Best regards,
Oliver | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
hello
as i have checked your code.Can you tell me why you want to change the code?
I mean can't set liquid variables by JS
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.