WooCommerce SQL query to get product by tag, category, price and size/color variation attributes - sql

I'm setting up a chat-bot on my Wordpress / Woocommerce website. I want the chat-bot to recommend the user products by asking the user some basic questions like "What clothing color are you looking for?" ,"What price range","What size", "What type of clothing (Jeans, Shirts, etc), and also by Category (Men or Women).
I already made a webhook for my dialog flow chat-bot to connect to my Wordpress database and it works fine.
But then I took a look into the database, and I don't know if it's just me or I have some kind of dyslexia, but I can't figure out how the database is structured...
What I'm trying to get is a table with the product details (inclusive product link) and image etc by asking the user questions about the Size, Color,price range , category and tags. But it looks like everything is in another table.
Some help will be really appreciated.

Related

is there any way to query Admitad API Products Feed?

We are developing a client project where we need to advertise products through affiliate marketing on client's website. Admitad is a popular affiliate network so we chose to go with that. We have joined with Myntra in an affiliate program.
There is an API to receive products feed of the advertiser company. We are getting about 1.5 million products in return from Myntra. But problem is we cannot query the data based on any category on the API. We simply cannot pass any parameter to query the product feed.
There is category id and category name provided to each of the product. We only want to receive products in the category of footwear, say 'shoes', 'sandals', 'flip-flop'.
But it seems we cannot query API.
I have even tried to contact support also, but it has been of no use.
So if anyone has worked with Admitad APIs or know this situation, please help!
Thanks in advance!

Shopify changing product price for variation by app

I am a shopify partner, I am trying to get around the the variant limits of shopify by coding an app and also because my client has a complicated formula for calculating the price. I don't have a problem with the part that adds the information for my variants to the order, however when I want to modify the price based on the user selection, it doesn't seem an easy task to do.
I came across couple of apps which does the same thing by adding a new product or variation which is not optimal for my use case, is there any app that does the job without adding extra information to the database, if so, how?
Qualified Yes
Unfortunately, Shopify doesn't give us a lot of options to edit prices of items dynamically. Here are the two options that I know of that will allow you to adjust the price of a product directly - however, both have limitations.
Using Shopify Script Editor
If you're working with a Shopify Plus merchant, you can use the Shopify Script Editor to dynamically adjust the prices of products, provided that the direction you adjust is down. You cannot increase the price of a product using the script editor - so for your use case, the list price would have to be the most expensive possible price that the item sells for, which you would then discount appropriately using the app.
Using draft orders
Using an app, you can use Shopify's Draft Order API to create an order with custom discounts and/or create completely custom items that are independent of the products set up in the product database.
The basic flow for this is that when the customer clicks 'checkout' you halt the normal navigation, send the cart contents to your app, create a draft order with the appropriate pricing, then supply the front-end code with the draft-order checkout/invoice URL so that you can send the customer there instead of the normal checkout. This has several limitations, however, including that prices of existing products can only be discounted, not increased, and the fact that Shopify will not allow a customer to use discount codes on a draft order invoice - once an order is set up this way, Shopify's assumption is that all prices are final.
Disclaimer: Sorry if someone sensible doesn't like a response with a link :) I'm not related to this app I'm just a user.
On a project with complex pricing, we use the app Wholesale Pricing Discount by Wholesale Helper we liked because is easy to import multiple pricing by-product and relate it by customer.
this app does not multiply the products, they use customer tags. maybe that can give you some guidance.
An important rule on Shopify is you can't increase the price by API on an order, you can just reduce i

Relation between Variant Id and other info in Shopify

I wanna ask if I could get the other information from variant id in shopify.
Is there any relationship between the variant id and shop id?
How the shopify create the variant id when users create the product or its variant?
Is there any rule?
Or is the variant id related with time?
I think it is related with shopify backend system, but is there anyone know about this?
Shopify is a hosted platform. They have an engineering blog if you are interested in learning about the details of their platform. The bird's eye view to answer your question is that they use a custom MySQL database for entities like shop, products and variants. The ID numbers you see are bigint numbers generated by MySQL. There is zero correlation between these numbers from entities like shop, product and variant. They have nothing to do with time either.

Store on Google Shopping, Adwords and Merchant

I'm working on a store (shopify). I want to show my products on google shopping.
I have a feed on Merchant, connected with adwords. I setup a campaign with everything is needed.
The problem is, my store and my products, in categories like I have on store and adwords campaign, not showing the products or the store.
I don't have any ideas, I read all documention of google about it, and the problem continuous.
PS: If is possible, I wanna try add my articles on the showcase on google search (ex.: search by "Smartwatchs")
This may we way too late, but maybe it helps someone.
You said that your categories, as you have them in your store, weren't showing in Google Shopping.
I'd recommend:
A - making sure that you have assigned product types to your products in accordance with your store categories/sections (i.e. Clothing > Men's Clothing > Shirts)
B - clicking the "plus" icon to "subdivide" your product groups based on the product types you assigned.
Screenshot

Big Commerce Integration for custom Email Invoice

I've looked into different ways to put or get order info from BC to different systems including the BC API, BC Webhooks, Zapier, and other systems like Shipworks.... in the end what I need to do is this:
We need orders placed on BigCommerce to send out a special invoice to the customer. The items that the customer purchased will have custom attributes, a "Tier" and a separate "Unit QTY" which is not the same as the item quantity.
We need to group the items by Tier, and show subtotals of the Unit Qty and Cost. Send this in an invoice as soon as the order is placed on the website.
We are already syncing to Quickbooks online, which does not have the functionality.
Looking for suggestions on different platforms/languages/email services like mailgun/and even shipping integration tools like shipworks, ordoro etc. that might have the ability to code a custom email template like this.
My customer is keeping bigcommerce, no option to switch this out.
I am mainly a Salesforce developer so my strong suit would be to sync the orders to SFDC and code in apex, send the invoice. But before investing in the time, wanted to see if I'm missing some quick potential solutions.
Anyone use Zapier Javascript/Python code platform?
Apologies if this is too open-ended. I feel that this could be a good reference for others in the community about options and best practices.
Hmm your question is pretty broad. Maybe a few links to API documentation could help?
Bigcommerce API - https://developer.bigcommerce.com/api
Ordoro API - https://www.ordoro.com/developer
Send this in an invoice as soon as the order is placed on the website.
I think what you need is a Bigcommerce webhook for store/order/created. See https://developer.bigcommerce.com/api/webhooks-getting-started.
Alternatively, you could set up a cron job that polls BigCommerce for new orders and then sends the email notification.