• Resolved tdmoose

    (@tdmoose)


    Using the drag and drop list in the Catalogue maintenance page does not change the order of display of the catalogue page. This is the case with both the premium and free versions of this plugin.

    Here are the steps to replicate this.
    * Create a catalogue with more than one category in it.
    * Create a page with the shortcode for the newly created catalogue.
    * In the UPCP dashboard, set Options->Basic->Category Overview Mode to “Categories Only”
    * View the page just created. Note the order of the categories.
    * Go back into the dashboard, and in the Catalogues tab, use the drag and drop list to change the order of categories.
    * Go back to the catalogue page. The order does not change.

    In viewing the code for this plugin, I made two observations.

    1) The column wp_UPCP_Categories.Category_Sidebar_Order is used by the query for the category page, but it is not updated when the drag and drop order is changed.

    2) The column wp_UPCP_Catalogue_Items.Position is modified when the drag and drop order is changed, however, this column is NOT used in any query for the catalogue page.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter tdmoose

    (@tdmoose)

    If I make the following mods to the code for the UPCP_Get_Catalog_Overview() function in “Functions/Shortcodes.php”, I get the expected behavior.

    – global $wpdb, $fields_table_name, $link_base;

    + global $wpdb, $fields_table_name, $link_base, ;

    – if ($Overview_Type == “Categories”) {$Items = $wpdb->get_results(“SELECT * FROM $categories_table_name WHERE Category_ID IN (” . $ID_String . “) ORDER BY Category_Sidebar_Order”);}

    + if ($Overview_Type == “Categories”) {$Items = $wpdb->get_results(“SELECT * FROM $categories_table_name LEFT JOIN $catalogue_items_table_name ON $catalogue_items_table_name.Category_ID = $categories_table_name.Category_ID WHERE $categories_table_name.Category_ID IN (” . $ID_String . “) ORDER BY $catalogue_items_table_name.Position”);}

    Hello tdmoose,

    Did you try using the table under the Categories Tab to drag and drop the categories and arrange them in order for the Catalogue overview mode?(make sure to click apply once done).

    Best regards,

    Thread Starter tdmoose

    (@tdmoose)

    I did not use that as there is no indicator on mouse-over to make it apparent that this is a drag and drop list. Such an indicator does display on the list in Catalogue tab. Three people looked at this without discovering that the Category list is drag and drop as well.

    It still seems to me that the order on the Catalogue tab list should control the order of the categories on the Category Overview page. What does the Position column control if it doesn’t control this?

    The desired functionality is available, but, I think the user interface is confusing, and to some degree contradictory.

    I would still like to make a case for using the modification I proposed. It makes sense to me, that if I change the order of categories on the Catalogue tab, that it would control the Catalogue Overview page. It is confusing to reorder the entire list of categories if not all of them are to be used in a particular catalogue. Further, the video documentation (https://www.etoilewebdesign.com/plugins/ultimate-product-catalog/documentation-ultimate-product-catalog/) indicates that the Catalogue tab list controls the Catalogue Overview order.

    If it’s not going to be used, then remove the code to offer the drag and drop functionality. Also, could the Category tab list have an indicator on mouse over, or some other indicator to make it clear that this is where the order is maintained?

    • This reply was modified 8 years, 4 months ago by tdmoose.

    Thank you for the feedback.

    Just for future reference, the drag and drop in the Catalogues tab affects what you see in the main area (the right side, opposite the sidebar) on the catalogue page. Anything related specifically to categories (including the catalog overview mode) is done in the Categories tab.

    Thread Starter tdmoose

    (@tdmoose)

    In my first post, I indicated this option setting.

    * In the UPCP dashboard, set Options->Basic->Category Overview Mode to “Categories Only”

    When you do this, the category order is not followed. It behaves as I have described. Since you have confirmed in your past post that “the drag and drop in the Catalogues tab affects what you see in the main area (the right side, opposite the sidebar) on the catalogue page,” I would consider what I have brought up to be a bug. Please fix it.

    Hi tdmoose,

    We tested that feature on our development site and it works as expected. Though, the functionality might seem confusing to some users. We will discuss the viability of adding an indicator in the future updates of the plugin or in the documentation.

    Thread Starter tdmoose

    (@tdmoose)

    I really doubt that you carefully tested this using the condition I detailed in my first post.

    The reason I doubt it, is, that when I step through the code, I can see the query it uses to display the result. That query cannot produce a correct result. I can verify that the code is actually going through this query via error_log statements. The query is the one I posted earlier. This query uses “Category_Sidebar_Order”, but, it should use “Position” in the “…Catalogue_Items” table.

    I’ll mark this as resolved, but, I stand by my claim that the software does not function as expected.

    • This reply was modified 8 years, 4 months ago by tdmoose.
Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Drag and Drop Category Order Broken’ is closed to new replies.