Is there any function in Quicksight where I can count different customers who have purchased in various categories? - amazon-quicksight

I have customers who paid in different categories, for example, SHOPPING, BEAUTY, FOOD etc.
And I'd like to count the number of customers who bought in two different categories, for example, SHOPPING and FOOD in a KPI visual
Quicksight does not allow the use of calculated fields with other calculated fields.If it could be possible I could calculate with a distinct_countIf.
The only way that I got is showing in a pivot table, and summarizing.
Can you think of any other more elegant way?

Related

elasticsearch custom score formula

I have a site that has a search using elasticsearch.
There is a rule that I need to implement:
the site is a search engine for women's products
but we have some stores that will pay to have their products appear on the site
we need to give priority to products from paying stores
We think the formula would be this:
store that is a customer (higher weight)
number of product views
Is there a way to use function_score to solve this?
and display the products randomly? (without blocking the list with only products from paying stores)

Laravel keep track of quantity for different models

I'm building a farm management application with Laravel with the following tables
products
id
trade_name
state
category_id
equipment
id
name
type
Product is a chemical product and Equipment can either be a tractor or an implement
I want to keep track of quantity in both products and tractors
For products, quantity can be in litres or kilograms (depends on the state of the product)
For tractors I want to keep track of quantity of fuel
For that I'm thinking of creating a new stocks table with the following columns
stocks
id
stockable_id
stockable_type
quantity
The thing is I only have one warehouse which means creating a stocks tables doesn't really make sense but if I choose not to do it I'll have to add a quantity columns for both products and equipment
I'm lost with which approach I'd go with and I'd be happy to hear more from you guys

Search strategy for online application

I have an application with around 700 000 active products with actual stock quantity.
Each product can have multiple attributes and categories.
Product name, description and attributes can be delivered to the user in a few languages.
What I need to achive is fast search. By fast I mean that for example for product group which contains 250k of products I would like to return a first page of sorted results in 100ms.
My first thought was to deformalize data and push it into document db like elastic search. But there is one issue - product price: it depends on the user that is actually logged in.
Currently there will be 30k users. Each user can have different discount for each product category or even for each particular product. When discount or price is changed there is a business requirement to synchronize prices in a few minutes. Potentially system could compute prices for search results on fly, but there is an issue with sorting and pagination. When group consist of 250k products it will be hard to get results, compute price, sort and return given page.
Is there any way to return user dependent field in elastic search? Or I should rather start looking into some other solutions like graph databases?

Mixed currency products in Magento

I'm evaluating if Magento will be suited to a particular client. They have an unusual requirement where their products may have two price components, one in AUD and one in reward points. There are three combinations of prices: all AUD, all reward points and a fixed mix of both.
I was wondering if Magento supports such a scenario? That is, can it have products flowing through to the shopping cart which have multiple currencies?
My research indicates you can have different currency prices per store for a product in Magento, but you can only have a single price per product within the same store. Also, that the shopping cart only supports a single currency (though you can switch between currencies), so I'm guessing I couldn't add two products, one from each store to the same cart. Are these true?
If my research is correct, I may need to resort to some sort of custom field against the products. If I do that, am I going to have to toss the standard Magento shopping cart out and roll my own?
Actually this might simpler than you think. If you want reward points as currency you can use:
SweetTooth Reward points http://www.sweettoothrewards.com/learn/
It already does what you need, and I have used it in the past several times. The company is very professional and the extension is A++

CodeIgniter Cart ID + Options

I have a situation:
I have products that are in a CodeIgniter Cart custom store.
Each product has an ID associated with it, but also has options for it (sizes).
These sizes all have different prices. (We're talking about photos being sold at different print sizes).
Because CI Cart updates, adds and deletes based on the product ID inserted, I am not able to insert one product with 2 different sizes.
As of now, the only solution I can think of is to pass the ID to the cart as IMAGEID_OPTIONID so that it contains both IDs.
However, I thought there might be an easier, more uniform way of doing this?
Or a better solution than an ID that isn't (on it's own) associated with anything specific unless i explode it..?
I recently built a site that had these constraints. In short, you'll want to create a distinction between "products" and "product groups". Think of it as managing the most discrete data units. In reality, shirt X sized medium is actually a different thing than shirt X sized large...doubly so if you have prices that are built on these qualities (this becomes more realistic when you consider cloth patterns or colors).
So anyway, if you have a "groups" table, a "product_groups" table, and a "products" table, you can keep all of these ideas distinct. On your products table, you can have columns for "size" and "color" (and any other distinguishing property you can think of) and a column for "price". Alternatively, you can go even more hardcore and make separate pricing tables that match up prices to unique products (this would be especially useful if you want to keep track of historical prices and discounts).
Then in your cart you can simply attach product_ids to cart_ids and perform a couple of joins to determine what "group" this product is a part of, what pictures are in that group (or exist for that product), and so on. It's not a simple problem, but following this line of thought should help get you on the right path.
One last point: keeping track of unique products like this also makes inventory accounting much, much more straightforward.

Resources