Add to cart custom product

brstdev3
New Member
7 0 0

Hi

I have question

Is it possible to "add to cart" custom product by shopify api ?

Means product name , price all we will generate new at time of add to cart.

 

Thanks!

0 Likes
m_waqas
Trailblazer
165 36 49

Hi @brstdev3,

Yes, it is possible to create a new product via admin API. Where you can set title, description, price etc

https://shopify.dev/docs/admin-api/rest/reference/products/product#create-2020-07

- Was my reply helpful? Click Like and Accept as Solution
- Want to implement a custom solution? Feel free to contact me at waqas4346@gmail.com
0 Likes
Greg_Kujawa
Shopify Partner
1016 83 233

@brstdev3 if you are referring to adding a quick sale item (i.e. - an item not defined in inventory) while the user is working through the add to cart and checkout process, then you can use the add to cart functionality in the App Bridge SDK --> https://shopify.dev/tools/app-bridge/actions/cart

0 Likes
Shayne
Shopify Staff
Shopify Staff
202 9 46

Are you looking for information on how to add a custom line item to a cart in POS or to an order using the Admin API? Or are you looking to add custom "Line item properties" for engravings or something to an existing variant before adding it to the cart?

 

 

Shayne | Developer @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
brstdev3
New Member
7 0 0

@Greg_Kujawa Yes right i am looking for sale custom product item i.e item not exist in store.

I checked this link https://shopify.dev/tools/app-bridge/actions/cart but didn't find anything related. Can You please guide me how to add custom line item in shopify?

Thanks!

 

0 Likes
brstdev3
New Member
7 0 0

@Shayne I am looking for sale custom product item i.e item not exist in store.

Can I add item in cart which not exist in shopify inventory?

Thanks!

 

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 233

Yes right i am looking for sale custom product item i.e item not exist in store.

I checked this link https://shopify.dev/tools/app-bridge/actions/cart but didn't find anything related. Can You please guide me how to add custom line item in shopify?

Thanks!

It's further down the page. See screen shot below. Where you can add a "dummy" non-inventoried item by specifying a title, compared to adding an inventoried item where you provide its variantId.

atc.jpg

0 Likes
niko-paris
Tourist
8 0 1

Hello @Greg_Kujawa , I'm trying to do the same thing as @brstdev3 but it seems that the actions to add a custom item to a cart is only available for POS:

Requirements

These actions require the following app versions:

  • Point of Sale iOS v5.11.0 or above
  • Point of Sale Android v3.3.2 or above

I'm trying to do this directly in the online store, is there any way to do it from the theme code ?

Thanks for your help,

regards,

Nicolas

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 233

There are existing app plug-ins that can facilitate this already. So you might check those out. Otherwise here's an article with a few tips. Hope this helps!

https://outofthesandbox.com/blogs/shopify-theme-blog/customize-shopify-checkout-pages

 

0 Likes