How to implement cross selling on a website? - php

I have a website which is custom made. I haven't used any carts like Zencart etc. Again it is completely built custom.
I have to implemnt the following on the site.
People who viewed this also viewed
People who bought this also bought:
Popular Today: top 5 products
Recently viewed products by a customer:
Cross selling emails etc.
I have looked into Analytics softwares like Piwik, Google Analytics, clicky.
I know we can store this data as events in Piwik or GA.
The main question is how do I get this data and be able to formulate it and display products according to it on the site?

As for item 2) "People who bought this also bought", Google has released a related product feature that, in theory at least, should it make easy to implement this.
The feature needs to be enabled in the view settings and you need some days of e-commerce data. Then you execute e.g. the example query from the docs:
dimensions=ga:queryProductName,ga:relatedProductName,ga:queryProductId,ga:relatedProductId
metrics=ga:correlationScore,ga:queryProductQuantity,ga:relatedProductQuantity sort=-ga:queryProductQuantity
Presumably a higher correlation score metric indicates which products have a stronger relationship.
The problem I have so far is that this is a blackbox - I do not know how Google computes the correlation score and so far the results look somewhat arbitrary (it might be that my dataset is not yet large enough). You can query the correlation model, but that will return "default" (not really helpful).
However if you are prepared to take a leap of faith and trust Google that this all will make sense then you can use the related product feature to implement cross selling in your website.
Query the data via the API and don't forget to cache the results, else you will eventually exceed your GA quota. After that it's just a matter of matching product ids on your product pages to the related product id with the highest correlation scores in the cached results.

Related

Magento 2 - Get Inventory and Prices in Real Time from Third Party API

I will build a website based on Magento 2... This site in particular has a mid size product catalog (no more than 12000 SKU's but it has many concurrent users)... and one of the things I need to do is to entirely obtain the SKU QTY and PRICES from a third party api gateway in real time... I mean, to be more specific... The product category pages, product detail pages, orders, has to check the qty amount, prices and group prices on this api gateway in REAL TIME because at the same time another store is connected to the same warehouse and we are at risk a product won't be available or it has different price. As a foot note the price is changing also due the business logic.
Is worth to mention that the api gateway that I'will use to get the inventory and prices information is very, very fast... Actually I'm not sure if this changes improves a little bit the Magento 2 performance because we will only use the native modules once the order is entered but no more.
The path I'm planning to follow is for example, in case of inventory, disable MSI (As I mentioned I have only one warehouse for ecommerce on this project) but in general I don't have a clue where to stard...
I'm not sure what classes should I overwrite to achieve this the better way... because I think the best way to achieve this is that each time the prices renders or the availability of the product is checked the api should be called. I understand that this will generate tons of api requests due the site concurrency but It doesn't really matter because as I mentioned that api is very fast and it actually has all the product information.. Actually if we achieve this I think is a tiny step to move the site to a micro services architecture. Unfortunately I can't start the project by the moment with React to make it headless for example...
I was thinking also to catch in some way the request magento 2 performs on each category or filter and retrieve the entire information from the api gateway... Do I make myself understand?. I mean... once the user select a category or perform a search... If I'll be able to get the info and make the request to print the data coming from the api and not reading the magento 2 tables will be awesome.
Well.. that's my issue... I appreciate if anyone could point me in the right direction.

Is there a way to get inactive products with amazon MWS API?

I have quite a lot of products in the 'Inactive' section with the alert 'Potential high pricing'.
Is there a way to get these products via amazon MWS? I tried a couple of reports such as
GET_MERCHANT_LISTINGS_INACTIVE_DATA
GET_MERCHANT_CANCELLED_LISTINGS_DATA
GET_MERCHANT_LISTINGS_DEFECT_DATA
but these don't actually give me all the products and give alot of other information. Also, by navigating to Price Health I can see every products that i'm interested in, Is there a to export these or get them via MWS API?
Yes, I believe you can get all products including inactive products. Try these four. I'm almost positive I came across this a while ago but I'm not sure which it was:
GET_FBA_MYI_UNSUPPRESSED_INVENTORY_DATA
GET_MERCHANT_LISTINGS_DATA_LITE
GET_FBA_FULFILLMENT_MONTHLY_INVENTORY_DATA
GET_MERCHANT_LISTINGS_ALL_DATA

"Fulfill online orders from this location" option status through Location API

I have 3 locations in my shopify store, but in one of them the option "Fulfill online orders from this location" is disabled. When I retrieve locations list though Inventory API https://help.shopify.com/en/api/reference/inventory/location#index it doesn't return any information about the "Fulfill online orders from this location" option status.
Is there a different API where I can fetch this info? Or could you please add an appropriate field in locations for Inventory API responses?
The reason is that you probably have not assigned inventory to that location? Items in inventory dictate fulfillments, based on levels. If you read up on InventoryLevels, you can see how fulfillments from locations for items is setup.
Note: the explanation from Shopify may seem excellent to them, but to me it is a tough slog to understand how their system actually works. Experiment will tell you all the problems.
My two cents to you is that you should not focus at all on the Location endpoint of the API, and instead, spend your time figuring out your InventoryItem and InventoryLevel setup issues.
https://help.shopify.com/en/api/reference/inventory/inventorylevel
https://help.shopify.com/en/api/reference/inventory/inventoryitem

Getting compact information from Square Connect API

I want to load Transactions with their Items and Customer from Square Connect API (using PHP client library), but Transactions don't contain any link to their Items unless there is order_id which often tends to be null.
As mentioned in Getting item names from Square Connect API I could go back to version 1 of the API and get list of Payments which includes Items, but there is no connection to Customer.
I know I could join Transactions to Payments by using Tenders which are included in both and get all information I need that way, but it doesn't seem to be good approach (combining two versions of API just seems wrong considering old versions of other APIs tend to deprecate and shut down after some time) and it would be very inefficient for both sides (more requests + downloading duplicate data just to try to match them).
So I would like to know if there's any better way to do this or why isn't.
Ditto on this (I can't comment yet - not enough rep). FreshKDS pull these details from the API (somehow) to display items on their Kitchen Screen. However as I'm already using a cloud service like Zapier (for Woo Orders to Trello Cards) and don't want to have the additional KDS cost as it doesn't pull square orders from WooCommerce (obviously).
So I need to be able to get the Square POS new order details to also create a Trello card - which I am using as a Kitchen Screen.
In regards to the OP's question: Does anyone have any info about webhooks perhaps, or a way to pull an entire order (even if I have to clone it to a database or cloud based spreadsheet) to allow viewing or iteration of individual food/ drink items?
Cheers.

Filters iTunes App Customer Reviews - Web service

Objective:
To get customer reviews of app from iTunes and filters like Most Helpful, Most Recent on reviews.
Supported Method By Apple:
Apple provides an "App Reviews" web service to get customer reviews per app.
API: http://itunes.apple.com/rss/customerreviews/id=400274934/xml
Problem:
This web service provides all customer reviews on a particular AppID, but I want reviews which are Most Helpful or Most Recent, the way iTunes provides.
I web-searched to see if results for a particular app could be presented in a different order. I couldn't find that they could, so imagine you should download this programmatically:
http://itunes.apple.com/rss/customerreviews/id=400274934/sortby=mostrecent/page=1/xml
From there, download /feed/link[#rel="last"] using XPath in your XML reader. Parse out the page number, which appears to be one more than the last page. In this case, the last page is 13, so you should read pages 1 through to 12 and insert the data into a database. You can then apply your own sort as you see fit.
I noticed that 'xml' can be replaced with 'json' if that's easier for you to consume.
An easier solution may be available if you can find other valid values for 'sortby', but my guessing others (like 'rating') returned an empty document.
Hmm, a re-read of your question makes me think you just want votes for all applications. If so, you can generate a custom RSS feed here:
http://itunes.apple.com/rss/customerreviews/

Categories