Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

eStore – order products in category

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › eStore – order products in category

Tagged: product categories

  • This topic has 12 replies, 7 voices, and was last updated 9 years, 1 month ago by admin.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • April 1, 2013 at 2:34 am #8847
    tahoemnts
    Member

    I read a post about how to order products within a category by price and/or alphabetical. There should be a field to itemize products at will.

    [http://highdesertwoodcollections.com/rear-view-mirror-cross]

    On this page all the products are the same price. I can’t order them by price nor alphabetical. How can I order them? As you can see, at the bottom of the page, products #4 and 7 are out of order…

    Thanks.

    April 1, 2013 at 10:10 pm #54728
    wpCommerce
    Moderator

    Hi, We do have an option to show products in an order.

    Please do the following:

    1) Install the eStore extra shortcode plugin (if you haven’t done so already).

    http://www.tipsandtricks-hq.com/ecommerce/wp-estore-shortcodes-and-functions-reference-460

    2) In the extra shortcode reference guide, look for a shortcode that allows you to display products from a particular category along with fancy display. Here is an example shortcode that you can use to order the products (take note of the “order” parameter):

    [wp_eStore_category_products_fancy id=1 style=2 order=3]

    order=3 should sort and display the products by name.

    August 25, 2014 at 5:08 am #54729
    dlburkhart
    Spectator

    The “order” attribute of the “show all products” shortcode does not seem to work for value 1, ascending product ID. For example, it shows my products in the following ID order: 1, 3, 2.

    August 25, 2014 at 2:24 pm #54730
    wzp
    Moderator

    The addon made an incorrect “presumption” about the way MySQL table entries are retrieved.

    Until the addon can be corrected (1 line of code), please do the following:

    1. Edit the eStore-extra-shortcodes/shortcode_include.php file.
    2. Search for the show_wp_eStore_category_products_fancy() function definition.
    3. About 30 lines down from that point, is the statement: if($order==1)
    4. Just below that line is another line that reads:

      $wp_eStore_db = $wpdb->get_results(“SELECT * FROM $cat_prod_rel_table_name where cat_id=$id LIMIT $start, $limit”, OBJECT);

    5. Change it, to read:

      $wp_eStore_db = $wpdb->get_results(“SELECT * FROM $cat_prod_rel_table_name where cat_id=$id ORDER BY prod_id ASC LIMIT $start, $limit”, OBJECT);

    6. Save the file.

    August 26, 2014 at 12:53 am #54731
    admin
    Keymaster

    I have corrected this in the extra shortcodes addon (Thank you for pointing it out). Please download a new copy of that addon and you should be fine.

    March 6, 2015 at 6:00 pm #54732
    Rick Barron
    Member

    I’m having the same issue with the sort order 1 using the addon version v4.9.4. How do I get the update I just downloaded the addon?

    ….. Rick

    March 7, 2015 at 1:13 am #54733
    admin
    Keymaster

    You already have the updated copy. Lets look at the shortcode you are using. What shortcode are you using and which sort order is not working? Please post a link to the page where you have the shortcode.

    March 7, 2015 at 3:09 am #54734
    Rick Barron
    Member

    Thank you for the prompt reply. I’m using the shortcode

    [wp_eStore_show_all_products style=1 order=1]

    on

    [http://quantumcredibility.com/store/]

    but I added the ORDER BY on line 2438 of shortcode_include.php and it’s working.

    /* $wp_eStore_db = $wpdb->get_results(“SELECT * FROM $products_table_name LIMIT $start, $limit”, OBJECT); */

    $wp_eStore_db = $wpdb->get_results(“SELECT * FROM $products_table_name ORDER BY id ASC LIMIT $start, $limit”, OBJECT); /* RMB – 2015-Mar-06 */

    P.S. There are additional shortcodes on the page. I’m still deciding what to use.

    March 8, 2015 at 12:17 am #54735
    admin
    Keymaster

    The default sort order should be using ASC. So when you use “1” as the order parameter, it should sort it by ASC. Is that not happening?

    March 10, 2015 at 2:06 am #54736
    Rick Barron
    Member

    It’s not happening …. Rick

    March 10, 2015 at 4:16 am #54737
    admin
    Keymaster

    I will make that change in the addon also.

    March 21, 2016 at 8:12 pm #54738
    Frank
    Member

    One thing that I’ve come to recognize, to make certain products leap to the top of the list with the default ordering is to just place a space in front of the product name and it leaps right to the top – so it becomes like a featured item without using any trickery.

    Frank

    March 22, 2016 at 4:04 am #54739
    admin
    Keymaster

    Good trick. The empty/space character comes before any alphabet.

  • Author
    Posts
Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ