• Resolved armedandgorgeous

    (@armedandgorgeous)


    Hi,

    So normally when an item is added to the website it recieves a unique menu number. What ive noticed recently is every item is being uploaded and assigned menu number 0. This essentially means that the ordering is now alphebetical on my website. I much prefered it when each new item was assigned a new number as before it meant that my new items were always shown first on the menu (each new item was 1, which bumped 1 to 2, 2 to 3 and so on) but now it shows just alphabetically ( i.e if every item is 0 then it orders by alphabet). I realise you can sort by time uploaded but i dont want to have to tell a customer to order it themselves. And more to the point it worked better for my system of organisation because if i wanted to move things around I could make certain items lower numbers than others etc… but if theyre all 0 then i cant order them this way?

    It was all so seamless before but what has happened? what have i done wrong and what can I do? I just want it to go back to when each new item was assigned 1 and it pushed the old 1 to 2, 2 to 3… dont want them all to be 0.

    Any help much appreciated!

    Thanks,

    Otis

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Hi @armedandgorgeous

    Thanks for reaching out!

    If I understand you correctly, new products on your site are having 0 as its menu number, correct?

    Can you please share how menu numbers are added to your site so that we could address you more effectively?

    To better picture what you are referring to here, can you please share with us a clear screenshot of what you see on your end so that we could address you more effectively?

    If you don’t already have a screenshot service installed, you can try https://snipboard.io. You can share the direct link to the image as a response to this topic.

    Additionally, I’d like to understand your site properly, please share your System Status Report that you can find via WooCommerce > Status. Select Get system report and then Copy for support. Once you’ve done that, you can paste it into your reply here.

    If you could also provide the fatal error logs (if any) under WooCommerce > Status > Logs.

    You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.

    Thanks!

    Thread Starter armedandgorgeous

    (@armedandgorgeous)

    Hi thanks for the response.

    So yes basically every single item uploaded has menu order of 0:

    https://snipboard.io/C26bUY.jpg

    https://snipboard.io/KhRbx8.jpg

    before as products were uploaded, the most recent item had a number assigned as 0, and as new items were added this number would change from 0, to 1 to 2 etc as more products are added.

    Here is an example from august of a product with a menu order that I did not alter, this is the number (198) that the system had given it – that is to say ive uploaded 198 items above this

    https://snipboard.io/9EKWfd.jpg

    However in november this mechanism seemed to stop working – this is an example of a product that ive uploaded in november that is still menu number 0 (despite multiple products being uploaded).

    https://snipboard.io/KNSQRj.jpg

    So I would assume that between august and november something has happened, perhaps its an update somewhere i dont know i will check.

    System report:

    https://github.com/otisgaz/menuorder/blob/main/systemstatus

    Something that I have thought about as I have been writing this response is I have a notification saying the following:

    Your theme (Goldish) contains outdated copies of some WooCommerce template files.?These files may need updating to ensure they are compatible with the current version of WooCommerce.

    Do you think a theme update is needed?

    Hi,

    Thanks for sending the system status report.

    Upon checking, the site will need to update the WordPress and the database versions (this last option is under WooCommerce > status > tools > update database). Be sure to back up the site before making any important change.

    You can create a staging site first, we recommend WP Staging this is in order to do not touch the live site. Once it is created and up to date with latest WordPress and database versions, you can switch the theme to Storefront and disable all plugins except WooCommerce.

    Check if the issue is still present, if not, it means a conflict was affecting the site, and you can switches back the theme, and then the other plugins one by one until you find the cause of the issue.

    Let us know if you need further help.

    Thread Starter armedandgorgeous

    (@armedandgorgeous)

    Thanks for this I will follow your steps and report back to you.

    Hi @armedandgorgeous

    You are most welcome!

    Sounds like a plan. Let us know how that goes after!

    Thread Starter armedandgorgeous

    (@armedandgorgeous)

    Hi, So I have updated wordpress, updated my current theme, updated all plugins. I have deactivated all plugins except woocommerce, I have switched to storefront theme. I have created 2 test products, but unfortunatly both have been assigned menu order 0. Usually the first product would have updated to menu order 1 as I created a new one.

    Unless it is the case that the new woocommerce doesnt update menu order? Although I dont see why you would want to lose that functionalilty.

    Hi,

    This is odd.

    Can you navigate to Wp-Admin > appearance > customize > WooCommerce > product catalog, let us know which option do you have at the field Default product sorting?

    I am asking because I was checking on my testing site that is using Storefront and WooCommerce 7.5.1 but could not see the issue on my end.

    Failed: 160
    Pending: 4

    If that does not make a difference, please navigate to WooCommerce > status > scheduled actions > pending. Try to manually run the pending actions (This is just in case something is stuck), allow some time to see if there is a difference.

    Let us know how that goes for you.

    Thread Starter armedandgorgeous

    (@armedandgorgeous)

    So default sorting is default sorting (custom ordering + numbercal).

    I have 35 pending actoions but all of these look like wp rocket preloading the cache. I have some failed woocommerce-webhooks I dont know if they are relecant but they occur in august of last year which is when I can last find evidence of the menu order updating.

    unexpected shutdown: PHP Fatal error Uncaught TypeError: array_merge(): Argument #2 must be of type array, null given in /var/www/html/wp-content/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php:53 Stack trace: #0 /var/www/html/wp-content/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php(53): array_merge() #1 /var/www/html/wp-content/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-products-v2-controller.php(825): WC_REST_Products_Controller->get_images() #2 /var/www/html/wp-content/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php(1464): WC_REST_Products_V2_Controller->get_product_data() #3 /var/www/html/wp-content/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-products-v2-controller.php(163): WC_REST_Products_Controller->get_product_data() #4 /var/www/html/wp-content/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-crud-controller.php(143): WC_REST_Products_V2_Controller->prepare_object_for_response() #5 /var/www/html/wp-includes/rest-api/class-wp-rest-server.php(1143): WC_REST_CRUD_Controller->get_item() #6 /var/www/html/wp-includes/rest-api/class-wp-rest-server.php(990): WP_REST_Server->respond_to_request() #7 /var/www/html/wp-includes/rest-api.php(519): WP_REST_Server->dispatch() #8 /var/www/html/wp-content/plugins/woocommerce/includes/class-wc-api.php(97): rest_do_request() #9 /var/www/html/wp-content/plugins/woocommerce/includes/class-wc-webhook.php(429): WC_API->get_endpoint_data() #10 /var/www/html/wp-content/plugins/woocommerce/includes/class-wc-webhook.php(472): WC_Webhook->get_wp_api_payload() #11 /var/www/html/wp-content/plugins/woocommerce/includes/class-wc-webhook.php(318): WC_Webhook->build_payload() #12 /var/www/html/wp-content/plugins/woocommerce/includes/wc-webhook-functions.php(78): WC_Webhook->deliver() #13 /var/www/html/wp-includes/class-wp-hook.php(307): wc_deliver_webhook_async() #14 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #15 /var/www/html/wp-includes/plugin.php(524): WP_Hook->do_action() #16 /var/www/html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/actions/ActionScheduler_Action.php(22): do_action_ref_array() #17 /var/www/html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php(65): ActionScheduler_Action->execute() #18 /var/www/html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(162): ActionScheduler_Abstract_QueueRunner->process_action() #19 /var/www/html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(132): ActionScheduler_QueueRunner->do_batch() #20 /var/www/html/wp-includes/class-wp-hook.php(307): ActionScheduler_QueueRunner->run() #21 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #22 /var/www/html/wp-includes/plugin.php(524): WP_Hook->do_action() #23 /var/www/html/wp-cron.php(138): do_action_ref_array() #24 {main} thrown in /var/www/html/wp-content/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php on line 53

    This being said I remember having to do something regarding the rest api so this might have been an issue that I solved let me go back and check my logs… again this might be totally irrelevant i dont know

    Thread Starter armedandgorgeous

    (@armedandgorgeous)

    So in august I was getting lots of emails from customers saying they were getting abandoned basket emails despite buying. Klayvio was giving me an internal 500 error saying it wasnt receiving data from woocommerce. The issue was I had some custom code that was adding an image that was throwing woocommerce.

    This being said Ive just tested it without any of my code and I still have the same problem. Every test product I make always has order 0

    Saif

    (@babylon1999)

    Hello @armedandgorgeous,

    What you’re describing is the normal behaviour of my test site, when a new product is created it gives 0 menu order. Also, as you can see in this guide the default value is always zero.

    That said, I went ahead and check for big changes in the period you mentioned this was working in and I can see a big update in August (version 6.8.0) so I downgraded my site one release before but still, the default value is zero which is expected.


    Link to image: https://d.pr/i/zdWLak



    Link to image: https://d.pr/i/vHSOg8

    This leads me to believe whatever was giving orders custom values was a third-party plugin or custom PHP function which may have been broken after the August update. You can check if there are any custom functions added in your functions.php file and code-adding plugins Code snippet.

    If you’d like to customise the order appearance of products, you can use the “Sorting” function.

    Here’s a screencast to demonstrate: https://d.pr/v/aaPLvr

    Hope this helps!

    Thread Starter armedandgorgeous

    (@armedandgorgeous)

    Hi so yes I agree when a new product is created it gets number 0. However before and as per the image sent by Igor H, the menu number changes as more items are being added – his example his item was 256 in the order, which he either manually inputted (as you are suggesting) or has added 256 items since (as I am suggesting) . This is how my website functioned for 3 years – that menu number was continually updated)

    By your logic, are you suggesting that every item in your catalogue should have menu number 0 ( and therefore, order in the catalogue will be alphabetical (if all menu number is 0 then it defaults to alphabetical sorting), and that this number 0 will never change unless it is manually changed? Because I can tell you for a fact this hasnt been the case for me.

    Also then are you also suggesting that the functionality of giving items an individual menu number isnt an innate function from woocommerce, but a synergistic outcome of another plugin just happening to create this outcome?

    Then does this also mean that essentually, unless one is to go through and change each menu order manually, the menu order numbering system itself is pretty useless seeing as every item (lets say I have 3000 items) is all given 0 anyway – and then if I have 3000 items all at menu number 0 its just means it becomes alphabetical sorting as there is now no menu hierarchy to go by, except the alphabet?

    I agree with you that when a product is added the default value is 0, but if you are suggeting that it always stayed as 0, and this has always been the case in the woocommerce plugin, then I am skeptical of this remark.

    Saif

    (@babylon1999)

    Hello @armedandgorgeous,

    By your logic, are you suggesting that every item in your catalogue should have menu number 0 ( and therefore, order in the catalogue will be alphabetical (if all menu number is 0 then it defaults to alphabetical sorting), and that this number 0 will never change unless it is manually changed? Because I can tell you for a fact this hasnt been the case for me.

    Sorry if I didn’t explain myself well, I am not asserting that this feature was never a part of WooCommerce.

    Rather, I am sharing my findings when downgrading to an old release. It is entirely possible that what you’re describing was indeed part of WooCommerce but it got removed. ??

    However, at the moment, this is the normal behaviour of WooCommerce so this is not considered a bug.

    Regarding sorting, it is not limited to alphabetical order. You can find other default sorting options by navigating to Appearance > Customize > WooCommerce > Product Catalog.

    Alternatively, you can utilize the custom sorting feature demonstrated in my screencast above.

    If your products lost their custom sorting somehow, another solution you can consider to bulk edit the menu order is exporting all products via CSV, editing the position column, then re-importing them while ensuring to tick this box.

    Hope this helps!






    Thread Starter armedandgorgeous

    (@armedandgorgeous)

    So I asked a friend to check his woocommerce store and when checking product orders for his most recent items they are 0,1,2,3,4,5 etc. when I check mine they are 0,0,0,0,0,0 etc.

    So is my friends website the one with abnormal behaviour in this case?

    Plugin Support wpnomad a11n

    (@wpnomad)

    Hi there,

    So I asked a friend to check his woocommerce store and when checking product orders for his most recent items they are 0,1,2,3,4,5 etc. when I check mine they are 0,0,0,0,0,0 etc.

    It’s possible that your friend’s site has a different setting than your site.

    Have you tried changing the sorting order from Appearance > Customize > WooCommerce > Product Catalog and see if that works for your store?

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Order number for products not working’ is closed to new replies.