build REST API for WooCommerce for mobile apps - wordpress

we are building the REST API for WooCommerce and we want to add a product to user's cart. For that we have used Cart API for WooCommerce but it doesn't seems to working for us as it doesn't giving any option to set user_id along with the data so we are facing issues with mobile app and website syncing. We want to make it generalize like if user is using mobile and adds product to cart, it should be remain in the cart if login from web too and it's seems not working for us
Any help will be appreciated for it
Thanks in advance

Woo-commerce cart items is temporary store in session so you can not get items using REST API, for that you have to make a custom table of cart then store details in your custom cart table using REST API.

Related

How to generate one cart with multiple items using BigCommerce cart API in nextjs

I am using BigCommerce API with Nextjs and I am trying to understand how cart API works from BC ( https://developer.bigcommerce.com/api-reference/20c2c55c1763f-create-a-cart ).
When I implement it as it is there, whenever I click on Add to cart button (same/different item ) it generates a new cart with that item.
I don't know how to keep adding items to the same cart (with the same cart-id, etc). There is no API for updating the current cart (i.e. send PUT req with new items on api/cart/cart-id).
Is there any other solution?
Have you checked out the Add Cart Line Items Storefront API? I think this might be what you are looking for to add products to an existing cart.
A

WooCommerce Hide Products

Out of the box, WooCommerce will create a shop page featuring a catalog of products and the products are accessible through the REST API at /wc/store/products. For my use case this is precisely what I want to avoid: users should not be able to browse the products by any means. Instead I'll use application logic to programmatically add products to the user's cart when appropriate.
My solution would be to
Disable the /wc/store/products REST API
Make sure there's no shop page set under settings
My questions are (1) is this solution is adequate (2) will disabling /wc/store/products have unforeseen consequences?
I found that it's possible to set the catalog visibility of a product as 'hidden' which is an adequate solution for my use case.

How to set woocommerce product wise Mailchimp list

How to set woocommerce product wise Mailchimp list? anyone know solutions for this them please update me.
Thanks,
Ketan.
First off, make sure your WooCommerce is integrated with your Mailchimp using WooChimp plugin. Now, as per my understanding you want to set WooCommerce product wise Mailchimp list.
Under Settings, you can create any number of sets and add the products in the condition for which you want it to be activated.
You can create any number of combinations and sets for your WP site.
Install "WooCommerce MailChimp" Plugin.
Integrate it using Mail chimp API key. I hope u know how to do.
Create lists in mail chimp account.
Subscribe mails into lists according to the products with plugin settings or programmatically using mailchimp subscription API. For more info check: https://developer.mailchimp.com/documentation/mailchimp/guides/manage-subscribers-with-the-mailchimp-api/

Subscribe to watch the video wordpress

I have added a video on my WordPress website and I want user first subscribe only then they should be able to play the video. I tried some Subscription plugin but not able to do it. Is there any way to do it in WordPress.
You need to use the following plugin in order to achieve the same functionality.
WooCommerce Subscriptions
Groups
Groups for WooCommerce
After the installation , you need to create a group and assign a page marked to that group so that only authorized customers from that group only can see the video page.
Assign the group to the subscription so that User will automatically added to the group after purchase of subscription.
You can also achieve the same functionality with gravity form subscriptions plugin.

Wordpress Woocommerce option plugin

I make a e-commerce website with wordpress woocommerce. my client want subscription option like this page option a link.
is it already exist simlilar with this plugin?
There are plugins out there that can provide that functionality, Woocommerce Subscriptions is one of them
WC Subscriptions makes it easy to create and manage products with recurring payments. Create a subscription product just like any other WooCommerce product, and you’re ready to start selling subscriptions.
WooCommerce doesn't have this feature in its original WooCommerce plugin, however you do have two options. You can add a custom function in your child's theme to implement and organize subscriptions, or you can add WooCommerce Subscriptions (among many other plugins, but I would recommend using WooCommerce's own plugins as they work well together).
If you need any help with either of these feel free to ask and I can help.
I would also recommend using MailChimp along with MailChimp for WooCommerce
(By MailChimp). This allows you to add all your subscribed email addresses to a campaign and send a mass email to all your customers with a newsletter, advert, updates etc. With MailChimp you also get some Analytics showing you the amount of emails that were successfully sent, how many bounced, how many were opened, how many clicked a button in the emails to take a look at your site, and how many purchased directly from your email. Which allows you to keep track of your email success!
Hope this helps!
You can use this link to create woocommerce campaign without plugin
Woocommerce Campaign List

Resources