Forum Academy Marketplace Showcase Pricing Features

Building Parallel Lists with Slider Input and ListShifter

So I’m trying to build a shopping cart, where the cart’s quantity is dependent upon a slider input value. So if the user wants 8oz of an item, they drag the slider input, and the cart updates to show the added item and corresponding weight. If they later set the slider input back to zero, the item is removed from the cart.

I am trying to build this using custom states. Because the user might change the slider input dozens of times before reaching their final order, I don’t want every change to be saved to the database. What I am struggling with now is building parallel lists for the added items, quantities, and prices using ListShifter. I’ve gone through the video @keith posted here: List Popper and Friends: New SSA Plugin for Your Backend Workflow (API Workflow) Needs, as well as the corresponding editor: List-shifter-demo | Bubble Editor.

So far I’m facing two problems:

  1. I have tried copying the workflow from the editor as best as I can, but I am having issues with the quantities in the parallel list. I believe it is indexing the wrong list. So if I have five items in my cart (Item 3, Item 4, Item 5, Item 6, and Item 7), and I go change Item 3’s slider input, the cart update’s Item 5’s quantity (which is the third item in the added item’s list).

  2. With a slider input instead of plus / minus buttons, I’m not going to be utilizing the increment / decrement features in ListShifter’s PROCESS workflows. I need to replace the entire number rather than performing calculations on it. I’ve set a custom state equal to the slider input’s current value, but I’m not sure how to get PROCESS to insert and replace this value.

Any ideas?