• Resolved lekins101

    (@lekins101)


    Hello,

    I have been trying to figure out how I can sort the products by price, but that doesn’t seem to be an option. Any help will be appreciated.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support A Zaman Sagor

    (@azamansagor)

    Hi,

    Greetings! Thanks for reaching out to us.

    We don’t have the option of sorting price wise. You need to customize the plugin’s code to add support. If you need help regarding the code customization, kindly let us know. We will provide you with hints for sorting by price.

    I hope you can understand.?

    Thanks for being with us. Good day!

    Best Regards

    Thread Starter lekins101

    (@lekins101)

    Hello,

    Thank you for responding. Yes I would like some hint to edit the code.

    Thank you.

    Plugin Support A Zaman Sagor

    (@azamansagor)

    Hi,
    If you want to sort the products by pricing then you have to add some custom code on this path: https://prnt.sc/kjmhyFkrMy3Y.
    Path URL: wp-content\plugins\wp-cafe\utils\wpc-utilities.php on line: 561

    Just remove the line: $args[‘orderby’] = ‘date’;

    And add these two lines:

    $args[‘orderby’] = ‘meta_value_num’;
    $args[‘meta_key’] = ‘_price’;


    I hope it will sort all the products on our menu widgets price-wise. You can change the order to ASC DESC from the widgets option: https://prnt.sc/zLEvEPQL5pSc

    N.B Remind yourself that after every update, you have to change the code as the update overrides the old code.

    I hope you can understand.
    Thanks for being with us. Good day!
    Best Regards

    Thread Starter lekins101

    (@lekins101)

    Thank you so much. It worked instantly.

    Will you be adding this to new updates?

    Is there anything I can do to make this permanent as I will be handing over the site to a client?

    Thank you again.

    Plugin Support A Zaman Sagor

    (@azamansagor)

    Hi,

    Sorry to say that, we don’t have an override option for that product query. And there is no other option to override it. You have to change the code after every update so please save that code. And if we change that then we have to do R & D first. It is better if you make a feature request on our roadmap from the plugin description and then if it gets more upvotes then we will make an option for it. 

    Hope you can understand. 

    Thanks for being with us. Good day!

    Best Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sort Items by Price’ is closed to new replies.