Multiple ratings in the same post - wordpress

I have a wordpress site where I in one single post have a list of restaurants. There is over 50 rows, and it's growing.
I would really love to be able to add a star rating to each row, but I haven't found any rating plugins that are able to have multiple ratings in the same post, because they all are based on post id.
Is there anyone out there that know of any way to add a rating to each of the rows in this post: http://www.lchfarkivet.se/lchf-restauranger-sverige/
Or if it's not possible to add a rating system, then maybe a heart or thumbs up or down... Something that my readers are able to use to add a rating in some way.
I hope you understand what I mean.

Related

Multi Store with Subdomains

I want to create multiple online shops for selling merchandise products for companies. The products are basically identical but should be personalized in dependence of the company I am building the shop for. Because I do not want to build a new shop every time a new company joins the program I am looking for something like that:
www.myshop.com : One shop with the underlying product database and checkout system - not showing any products, just as a parent structure
www.company1.myshop.com : A slightly personalized shop where only a selection of the product catalogue is available
www.company2.myshop.com : A slightly personalized shop where a different selection of the product catalogue is available
Do you get it?
Does anybody know a tool for that?
Thanks in advance!
I already looked into WooCommerce, Shopify and even WiX. As far as I understood what I am looking for is not supported.
Since your example is based off of subdomains, you can choose to assign a Shopify store to each subdomain. Each store feeds from your inventory and accounting, giving your customers the illusion of a custom experience. Or you can just simplify your life, have one store, and assign your customers to view collections specific to them. That is the smart move. You may not like that, but it would work a peach for you. You just tag customers to see their specific collections, of products specific to those collections. Simple.
I can also think of a dozen other ways to pull this off with Shopify, but that is me, not you. For an opinion question like this, SO is not the right place to ask these kinds of questions, but I answered anyway. Your mileage may vary of course.

Woocommerce reduce inventory programmatically when related variation is purchased

Ok, will do my best to explain the problem.
I am selling limited edition prints on my site. They come in multiple sizes, and they also come framed and unframed.
Right now, I set up each product to have 2 attributes: size & frame.
Within the variations, I have 4 options
11x17 unframed
11x17 framed
20x30 unframed
20x30 framed
The problem occurs with the inventory. There are 10 total 11x17 prints, but since I have to enter a stock quantity for each variation, I have to do something like this:
11x17 unframed 10qty
11x17 framed 10qty
Which makes it seems as though there are 20 total prints, instead of 10.
Ideally, I'd want to keep inventory based on attribute, not variation, but there doesn't seem to be a way to do that.
I am unable to set up the Frame as an add-on product because the cost of the frame goes up, as the size of the print goes up.
I am wondering, if there is a way to programmatically reduce the stock of other variations, when one variation is purchased. So, when someone purchases the "11x17 unframed", the "11x17 framed" stock is reduced -1 at the same time.
All of the products on the site are exactly the same, so I wouldn't mind hard-coding the specific variation names in the code.
Not sure if something like this is doable, but I would hugely appreciate any insights.
This is the closest example I could find to customizing how stock is handled:
Reduce WooCommerce Item Inventory By Attribute Value
Thanks in advance,
Jenny

How can I display the same reviews under all products?

I have a shop where every single jacket has a unique pattern, so every product is different and for every product I just have one piece.
Still, I would like to have reviews under my products.
Is it possible to somehow show the same reviews under all products?
After all, they are the same, they just have different patterns.
So for example if I put in a new product it will still have all the reviews like all the other products? Any hint is greatly appreciated! Thank you.
EDIT: Someone in another forum said:
Reviews are comments. After saving a comment action_hook wp_insert_comment starts.
You could use this to post the same comment under all products. To select all products you would need something that all products have in common.
How would I do this practically, any tips or steps? What would would I need to learn/read?
Thanks for any hints.

WordPress query multiple post_types/categories with weighted results

For a WordPress project I'm looking for a better solution to this problem:
The query should get a set of different post_types and taxonomies (like categories), based on the site visitors choice. For example, the user want to get results from normal posts, but also products (from WooCommerce) and other post_types like events and news (both separate post_types. The tricky part is, that the user wants to assign a weight factor to each. So if they select like posts = 1, products = 3, news = 4, they should get a number of posts, three times more products and 4 times more news.
Next step will be to include categories, also with the weight factor, which will make it even more complex, because for posts, I need to query another taxonomy than for products.
The only way I found to solve this, is to run a separate query for each post_type, like fetching 10 items from posts, 30 items from products and 40 from news, to match the weight factors, then combine the results. But this will not scale very well when I need pagination (for example, I want to show 50 entries on the first page, next 50 on second page).
I thought about collecting these single queries into a temporary table, but such a table will be available for the current session only, so it won't help with the pagination (as the temporary table would no longer exist, when the second page is shown).
Does anybody have an idea, how I could approach this task? I would like it according to the WordPress coding standards, so I would like to use WP_Query and the provided filters, because the site is also using geolocating and WPML for translation, so I really would like to avoid writing a low-level query where I have to include all these manually.
I'm not looking for a final solution, just want to collect some ideas.

Find out how many different 'brands' (custom dim) a user looks at on average?

Our website has many related products from a large number of different brands
I'd like to try and use Google Analytics data to find out, on average, how many different brands - which I have set as a hit level custom dimension - a user will look at over a given time period
I'm not sure if this is possible, but it would be really cool to know!
Helps with understanding brand loyalty/defection
I started by creating a simple custom report to see how many manufacturers get seen by how many users, but I don't know where to go next with this question in order to answer it!

Resources