Wordpress Woocommerce Sorting - wordpress

I'm looking for a way to sort the products in our website via most sales (popularity) but I also want to push a few specific and newer products to the top because otherwise it takes ages for users to find them.
There are the two following options
custom/default order
popularity
The issue is that with the custom/default option, it sorts all products that don't have a set priority by the alphabet and not by sales.
Is there a way to use the default sorting but use the popularity sorting unless a priority is set?

Related

Woocommerce USP ( Unique Selling Propositions ) alternative

there's this great plugin that you can put selling points to all products on the store but the problem is that you can't specify categories or products to show it it just shows the same ones everywhere. I tried finding an alternative - even a paid version and i can't. Does anyone know of alternatives or can you tell me how to modify it to specify categories at least?
https://wordpress.org/plugins/woo-usp/
It's not working as I would like to, and as i have seen online many people have the same issue, you can't specify products or categories that you can post the information on

Woocommerce: how to update an order programmatically

Currently, my customers fill out a form which takes their measurements and then recommends a product variation specifically for their measurements. This is great, but takes time and is not always convenient for the customer.
I want to allow my customers to purchase a generic version of the product (so they pay immediately), submit their measurements at a later, more convenient date for them (e.g. through a form they fill out) and then update the purchased product to a specific variation with their measurements.
Is it possible to do this in Woocommerce? If so, how could I do this programmatically?

Woocommerce composite products

I am struggling to get composite products to display the way I want in this situation. I am also using product bundles.
Basically I want to display dumbbells for sale on a page, I need an option to either buy them individually (1kg, 2kg, 3kg... 10kg, not a problem) or two options to buy sets containing 6 (1kg-6kg) or all 10 of the individual dumbbells for a fixed price.
I have got very close using product bundles but even with the fixed price for the set it still creates a dropdown box to pick a specific dumbbell and whatever is picked has no outcome because the price is fixed. This is confusing for the customer so I just need that drop down box not to appear, any ideas on how to structure it?
I need the stock of individual dumbbells (for example the 1kg-6kg set) to each decrease by one if the set is purchased.

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.

Make Ubercart Attributes set price, not change the price

I have been searching for this all over the internet, but haven't came up with the solution just yet.
On my Drupal 7 installation I've happily used Ubercart for a while now, but I'm going to sell software from now on.
I'd like to use attributes to change the price based on the amount of computers and licence experiation date (years from now).
The prices don't always rise the same way, so I can't set an increase of 10% with every year.
I'd like to fill out a price table and when the user makes his choice, he gets the price right.
This is the website I'm talking about (example product): https://www.xsbyte.com/catalog/73
It seems not possible to do this, you could fill out a new price for a new object, or could just make a new product, but that was not what I was looking for.
I ended up using WooCommerce (Wordpress) and integrated both systems, so customers get features like single-logon and shared customer address and payment details (if applicatable).

Resources