web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Add to cart button

(0) ShareShare
ReportReport
Posted on by 196

Hello,

Hoping you can help, new to powerapps and figuring stuff out along the way but stuck on a couple of areas.

 

Trying to create a whisky order form. We can use points or sale(cash) to purchase.

 

I was trying to get the user to select their order from the two drop downs available in a gallery(Data source coming from a Product Cart Items sharepoint list)  (1)

 

I have created a second gallery((Data source coming from a Product Cart Items sharepoint list) where I have added an add to cart button and put the onselect code - 

Collect(colShoppingCart,{ProductID:ThisItem.ProductID,Product:ThisItem.Product,PointsSaleBottles:PointsQty.Selected.Value,TotalPoints:PointsQty.Selected.Value * NumberofPoints, StaffSaleBottles:SalesQty.Selected.Value,TotalPrice:SalesQty.Selected.Value * ThisItem.Price})    (2)

 

I have added a third gallery(data source - colShoppingCart)  (3)

 

1.  From the attached I don't want anything in the third gallery(add to the cart) if the dropdown is still zero.

2. Also, it seems to bring through only the first item as she can see there should be a Sherry Cask added also

3. I would like to add an update cart button if the changed dropdown selections.

 

Any help would be appreciated.

 

Thanks

 

Ross

 

 

shoppingcart.png
Categories:
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @rosscortb ,

     

    Could you please share more details about your scenario? What's the purpose of using the second Gallery with same data source as Gallery1 and only put a Button in it? As I think put the collect formula on the plus icon seems to be a lite version for generating and updating the shopping cart.

     

    Best regards,

  • rosscortb Profile Picture
    196 on at

    @v-jefferni  thanks for responding. I have made some updates since last message. You are correct in that using the + icon would be the best way and I was going to change that to a button - add to cart. However, I was trying to prevent multiply add to cart buttons appearing for each item.

    I want the user to make options in the dropdown and then select one Add to Cart button. I have this now and but not in a second gallery. However, need help as it doesn't exactly work as the item needs to be fully selected for it to pick up the selections, this becomes clear if the user selects multiply items. 

     

    As you can see i should have 2 items in the cart - 

    rosscortb_0-1667558473913.png

     

     

    Button is - Collect(colShoppingCart,{ProductID:'Product List'.Selected.ProductID,Product:'Product List'.Selected.Product,PointsSaleBottlesQty:PointsQty.Selected.Value,TotalPoints:PointsQty.Selected.Value * NumberofPoints, StaffSaleTotalPrice:SalesQty.Selected.Value * Price,StaffSaleBottlesQty:SalesQty.Selected.Value})

     

    Any help would be appreciated.

     

    Thanks

    Ross

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard