WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] eShop option/option sets ordering (7 posts)

  1. Green2500S
    Member
    Posted 3 years ago #

    How can I change the order that my options and option sets are displayed on the product page?

    I have many options on the product I am selling (classic car club membership), and it needs to be in a logical order to make sense.

    I tried adding a prefix to each option set i.d., but the page groups them and displays them like this: dropdowns first, text fields second, text areas third and product options fourth.

    The page can be seen here:

    http://triumph2000register.co.uk/?page_id=1133

    All help appreciated, it looks a great plugin otherwise.

  2. elfin
    Moderator
    Posted 3 years ago #

    you have to add a filter changing this:
    apply_filters('eshop_option_set_ordering','ORDER BY type, id ASC');
    you need to change the 'type' but keep the rest. you can change it to name, or admin_name.

    the filter can go in your themes function file or create a small plugin.

  3. Green2500S
    Member
    Posted 3 years ago #

    Hi, Thanks,

    That works (though after I changed "apply_filters" to "add_filter"??), however I get the following message at the top of the content box of the page:

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'ORDER BY admin_name, id ASC' was given in /home/triumph2/public_html/wp-includes/plugin.php on line 166

    Thanks,

    Allen

  4. elfin
    Moderator
    Posted 3 years ago #

    add_filter('eshop_option_set_ordering', 'myeshop_optionsetorrder',10,1);
    function myeshop_optionsetorrder($qu){
    return 'ORDER BY admin_name, id ASC';
    }
  5. Green2500S
    Member
    Posted 3 years ago #

    Awesome, you fixed it. Many thanks.

    Works great now. Just need someone to buy!

  6. hilmon
    Member
    Posted 3 years ago #

    @ Rich

    Hi, I've noticed you've passed on some great advise to people using eShop so I'm hoping you might be able to help....

    I'm having a similar issue with 5 long order forms for 5 different products (services)... and a very fussy client :-/. Its my first time using eShop, I'm kinda wishing the front end option sets just worked like Verse Meta boxes :-)

    Anyway, Can you suggest a way that I might be able to add a filter for each product so I can dictate the exactly order of the many options in each form... or maybe point me in the right direction?

    Many thanks.

  7. hilmon
    Member
    Posted 3 years ago #

    Ooops!!! ....

    Sorry a perfect example of RTFM!!!! ....

    :-/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags