How to pass variable to Cards button
I'm creating a bot for product suggestion in Shopify. I was able to get the product details as variables such as product name, price and product link
When i pass the variable to the cards, it is showing each product in separate cards automatically, but not able to pass the variables to the button, how to do that?
7 Replies
Can you provide a reproduction? Or at least record your screen? What are you trying to achieve exactly?
I think he wants each item in the list to appear on the button. So if it’s [“product A”, “product B” , “product C”], there will automatically be three buttons with each button displaying the specific product. Don’t think you can do that now.
like this
in the right side cards have a button (which I named it as View Product), but I am not sure how to pass value to that button. I can draw a line and connect it to next block, but the next block is not considering the variables

any help here is appreciated
but the next block is not considering the variablesYou need to save the selected card variable
Thanks, will try it
Is it possible to add text to variable and show it as dynamic?
For eg. I have {{products_amount}} in the card, which is a dynamic value, I want to show it as Rs.{{products_amount}}
any help here is appreciated
Solved this, by using Set Variable block and js - {{products_amount}}.map(p => "Rs. " + p)