Shopify / mobile-buy-sdk-ios

Shopify’s Mobile Buy SDK makes it simple to sell physical products inside your mobile app. With a few lines of code, you can connect your app with the Shopify platform and let your users buy your products using Apple Pay or their credit card.
MIT License
453 stars 198 forks source link

Retrieve Product Id from Cart Line Object. #1227

Open harishvitta opened 7 months ago

harishvitta commented 7 months ago

I am having an issue determining product ID from the Base Cart Line object. It contains Merchandise objects but none of the properties are exposed to determine product variant ID from it.

This will help me to know which products are in the cart and will enable me to perform edit qty and delete items from the cart.\

Is anyone else having the same issue while issuing a Cart object? It would be nice to have an updated sample application using a Cart instead of a Checkout object.

harishvitta commented 7 months ago
Screenshot 2024-02-01 at 8 57 28 AM
harishvitta commented 6 months ago

Hi Team,

Any one else have this issue? Some one can you please help me with this issue.

EDMODJ commented 2 months ago

Hi @harishvitta

I'm facing same issue. By now I can't figure out how to get the products in the cart. Did you solve it?

harishvitta commented 2 months ago

@EDMODJ Merchandise holds the product information https://shopify.dev/docs/api/storefront/2024-04/unions/Merchandise. this is sample how I retrieved product information from Merchandise instance of BaseCartLine Object

Screenshot 2024-06-14 at 2 37 36 PM
EDMODJ commented 2 months ago

@EDMODJ Merchandise holds the product information https://shopify.dev/docs/api/storefront/2024-04/unions/Merchandise. this is sample how I retrieved product information from Merchandise instance of BaseCartLine Object Screenshot 2024-06-14 at 2 37 36 PM

This do all the work !!! thank you @harishvitta