“Add to cart” function with global variables on multiple pages

Hi there!

Unfortunately, after a lot of searching, I haven’t found a fitting solution to my problem and have been stuck for a few days now. I would be more than grateful if someone could give me a tip, no matter how small.

I’m currently in the process of creating an online grocery store in Axure for a project at university. Among other things, this should have an “add-to-cart” function. Roughly speaking, my prototype is structured as follows: on a product overview page, there is a repeater that dynamically uses products from a data set, but the products that are added to the cart should appear on a separate page.
I had tried to reference them in a corresponding repeater on the shopping cart page, but they are simply listed one after the other and I can’t manage to put “add row” in the right place. My last attempt to separate the product names with a “split” function also failed. The problem is that it should be on a separate page because I want to later add a code for each product that will allow me to track the products purchased by users via a text box that they will see at the end.

I’ve attached my current file, but I hope it’s not too confusing. :slight_smile:
Thank you very much!
add-to-card-variables.rp (746.7 KB)

Passing repeater values from one page to another is always a pain to set up and get working just the way you want. Check out the example on this thread on a possible way to do that.

But for an easier way to accomplish the same thing… you don’t have to put your shopping cart on a separate page. You could structure your site as a one-page web app and have the cart in its own hidden panel, and show it when the time is right, thereby avoiding the use of variables and complicated repeater shenanigans entirely.

2 Likes

Thank you so much, this really helped me and I’ve been able to solve my problem. Sometimes it’s better to not make things more complicated than they are.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.