• Hi,

    Is there any way to sort the on sale products first and then show the rest of the products ? For example: 20 products in category, 10 on sale and 10 regular. I want to show the 10 on sale first and after them to show the 10 regular one. Tried using the “On Sale” sorting, but it shows only the 10 on sale products without the 10 regular one.
    Currently using the Divi theme, tried it with the Twenty Nineteen theme too, but the problem exists.

    Best regards,
    Bozhidar

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author SkyVerge

    (@skyverge)

    Hi @bojidarsokolov,

    Thanks for reaching out about Extra Product Sorting Options! I’m happy to help out.

    I’ve done some testing on my own local development site and I can replicate the issue you’re having. Thank you so much for reporting this to us!

    I’ve added this to our issue tracker for the developers to get this patched up. While I don’t have an estimated time for resolution right now, please know that our team is now aware of the issue and will work to incorporate a fix into the plugin as soon as they can.

    Again, thanks so much for the report! Is there anything else I can help out with?

    Thanks!
    Liz

    Thread Starter bojidarsokolov

    (@bojidarsokolov)

    Hi,

    Thanks for the fast reply !
    Is there any temporary work around for this problem ?

    Best regards,
    Bozhidar

    Plugin Author SkyVerge

    (@skyverge)

    Hi @bojidarsokolov,

    We have a custom code snippet that should be able to help in the meantime. I’m happy to share it, however, please be aware of the following:

    • I’m afraid that customizations are not covered under our support policy, so implementing this directly or modifying it further isn’t something we can assist with.
    • Please be sure you know how to add custom code to your site. Personally, I like the free Code Snippets plugin method.

    You can view the snippet here:

    function sv_posts_clauses( $args, $wp_query ) { $args = str_replace(“wp_postmeta.meta_key = ‘_sale_price'”,”wp_postmeta.meta_key IN (‘_sale_price’, ‘_virtual’)”, $args); return $args; } add_filter( ‘posts_clauses’, ‘sv_posts_clauses’, 15, 2 );

    Is there anything else I can help out with?

    Cheers,
    Liz

    Hi, @skyverge

    I tried directly the code in functions.php and it doesn`t work. No error or warning messages, just nothing happens.

    Plugin Author SkyVerge

    (@skyverge)

    Hi @avasilev,

    Could you try copying the code from here instead and let know how it goes?

    https://gist.github.com/simonporter007/952b570b61582abc8b8be97d04b155cc

    Cheers,
    Liz

    Hi, @skyverge,

    I copied the code directly from GitHub link, which is the same, but again nothing…

    Plugin Author SkyVerge

    (@skyverge)

    Hy @avasilev,

    So sorry for the trouble so far. The workaround code is working on both our environments locally, so it’s a bit strange it isn’t working on your site.

    In order to look into this further, it would be great if we could take a look at your site directly, and where you’ve added this code. Did you end up using Code Snippets in the end? We quite like this method as it usually catches errors, as well as allowing the code to be activated/deactivated across themes without touching the back end files.

    If you would like us to take a closer look, could you please fill out a request on our support form so that we might gather some additional details, such as admin login and site URLs?

    I look forward to hearing from you so we can resolve this! Could you let me know when you’ve done that?

    Cheers,

    Simon.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Problem with on sale sorting’ is closed to new replies.