Skip to main content
Question

Variable modes not resetting

  • February 19, 2025
  • 0 replies
  • 19 views

Marcus_Sjoholm

Hi!

I’ve created a flavor selector as an overlay on my product detail page. I’m using variables to add, subtract and verify that the correct amount of products/flavors is selected.

When i click my “add to cart” button. I’m trying to reset the overlay so that the prototype can loop.

The thing is that I’ve set up the different flavors as modes (i’m limited to 4) but when setting my product counter to 0 when tapping the “add to cart” button only the first mode is effected.

ex.
On tap - Set variable “bottles_selected” to 0.

I’ve tried:
On tap - Set variable “bottles_selected” to “bottles_selected:Lemon” - “bottles_selected:Lemon”
&
On tap - Set variable “bottles_selected” to “bottles_selected:Lemon” * 0


The first example works only for the first flavor in the modes and the others doesn’t work at all.
I’m quite new to variables so hoping for a quick fix :)

This topic has been closed for replies.