Beka Rice
Forum Replies Created
-
Forum: Reviews
In reply to: [Product SKU Generator for WooCommerce] Perfect for my StoreThanks so much for the review @ejbayron!
Hi @silvermm I haven’t seen this myself. I’m afraid I’m not able to replicate this with WooCommerce 2.5 and WordPress 4.5.
Could you please try this again with all plugins disabled and a default theme (like Twenty Sixteen)? What WooCommerce version are you running?
Hi @isasimo, I’m afraid sorting like this isn’t possible in the plugin. If you want out of stock items at the end, you’d need to sort by stock. However, this would show the items in order of stock, and only use your custom fallback when items have the same stock.
What you’re looking for basically is to join two *different* sets of products: in stock products, sorted a certain way, then out of stock products, sorted a certain way. This would require the help of a developer to build a custom shop page or sorting query for you.
Sorry I don’t have better news here!
Cheers, Beka
Hey @tuleburg, I don’t see anything in particular wrong with what you’ve posted, this would need some further debugging to see why the fallback order isn’t being used. I’m afraid we can’t debug custom code here.
Hey @uzzy Raja, I’m afraid this isn’t easily possible with the way WooCommerce sorting arguments work.
By default, this plugin sorts by featured status, then by title.
In order to sort by 2 meta keys (featured and price) vs how we do it with a meta key + a part of the post (title), you’d need to modify the query WooCommerce uses by adding your sorting arguments and (more importantly) changing the pre-built meta-query for product sorting — not quite straight-forward. This isn’t something we’ll implement as part of this plugin, so I’d recommend working with a developer if you need this sorting in your shop.
Sorry I don’t have better news for you here!
Cheers, Beka
Forum: Plugins
In reply to: [Product SKU Generator for WooCommerce] UPPERcase SKU using SLUGsHey @tomcoady, thanks for the feedback here!
I’m afraid that the format is the best overall option we have to support several kinds of stores, so changing the slug SKU’s format won’t be something we would add to the core plugin itself without a lot more feedback from other merchants. I’m sorry I don’t have better news for you!
You could change the SKU to fit your needs with the
wc_sku_generator_sku
andwc_sku_generator_variation_sku
filters to adjust the SKU’s case — runningucwords()
orstrtoupper()
could probably solve this for you by directly modifying the SKU before it’s saved rather than trying to change the slug.If this isn’t something you’re familiar with, a developer could get you squared away pretty easily — we typically recommend Codeable for small projects if you don’t already work with someone.
Thanks!
Hey @tuleburg, I’m afraid this isn’t possible without custom code. By default, the plugin sorts by stock, then by title.
Sorry I don’t have better news for you here!
If you absolutely needed to make this change, there are filters in place that could be used by a developer to change this, but you’d need custom code to do so. The
wc_extra_sorting_options_fallback
andwc_extra_sorting_options_fallback_order
filters can do what you’re asking to change the fallback and its order to use date / DESC instead. I typically recommend Codeable for these sort of small projects if you don’t already work with a developer.Cheers!
Hey @designbygalvan, could you please try editing a product’s stock from within WooCommerce, then saving it, to see if that product will now show up in sorting?
This thread is a good example of the fact that sometimes data isn’t set properly with imports, and if that data is not set properly, sorting will not work.
Editing the product in WooCommerce (not via import) will help us determine the source of this issue.
Thanks!
thanks for the extra info Hugh! Did not see that update myself, definitely helpful ??
Hey @killerdog, you could definitely work pagination if you used a seed for each user. However, as this plugin using the built in WooCommerce filters for sorting options, it’s pretty limited in what we can do aside from passing in a custom sorting argument, and thus randomized sorting pagination can’t be implemented here. This was intended originally for small product catalogs.
For the regular WordPress sorting filters, the entire WP Query object is passed into filters, so you can modify it to seed & randomize items. With WooCommerce, we’re using a pre-built query and filtering only its arguments, so we can’t really do this in a simple way.
If you wanted to do this with a customized bit of code, you could replace the WooCommerce sorting dropdown completely yourself and use your own query for randomized sorting, I’ve found this tutorial helpful in the past.
Sorry I don’t have better news for you here. Cheers!
Forum: Plugins
In reply to: [Extra Product Sorting Options for WooCommerce] Alphabetical On-Sale first@prompos123 thanks for that! I misread your initial thread when I replied originally, sorry for the confusion here.
The items after the sale items will be alphabetical (as your example shows), but the sale items themselves will not be sorted alphabetically. This is a limitation with adding the sorting into the existing WooCommerce sort dropdown / arguments.
Due to the way the sorting is handled by WooCommerce, you can sort on one key, or “quality” at a time. In this case, we sort by “sale” items first (which is why they all show up first), then the fallback is used to sort the rest of the items (in this case, the non-sale items will be A – Z). Using two keys simultaneously (ie show sale first AND make sure they’re alphabetical) isn’t possible within this structure (as we use the filters WooCommerce provides to add simple sorting queries).
To do this, you’d have to have your own custom sorting queries written and override the sorting dropdown WooCommerce uses, which isn’t something this plugin is capable of doing.
Sorry I don’t have better news for you here!
Hi @merchantweb, the import is indeed the issue. That stock meta for the parent product needs to be set, and the import most likely is not setting this meta. Since it’s not added, these products are not found when we sort by stock.
You’ll either need to set the stock properly when imported, or bulk edit / quick edit your products to set it.
The reason your snippet works is because it’s only looking for stock status — in stock / out of stock is always set. This plugin sorts by the stock value, which is not being set in your import. We don’t have plans to change this to stock status, as all this does is put all in-stock items first (not necessarily sorted by inventory), then all out of stock items.
If that’s all you need, you can continue using your snippet and remove the plugin ??
Cheers!
Forum: Plugins
In reply to: [Extra Product Sorting Options for WooCommerce] Alphabetical On-Sale firstHey @prompos123, that’s definitely not expected, as sale sorting should use A to Z as a fallback. Can you include a link here please so I can have a look at your shop? thanks!
Glad to hear you got it tracked down @ksteele36! thanks for the update ??
Hi @intertip, can you please include some products along with their inventory so I can see the issue? Alternatively, changing your WooCommerce settings to show stock always would help here so I can get an idea of what this should look like.