radykal | Support Center Chooser

For which product do you need support?

Fancy Product Designer Multistep Product Configurator

Start a new topic
Answered

Order Products in category so that we can customize swap product ordering

Can we add drag/drop functionality in product categories so that we can customize the order which products appear when swapping categories? It looks like we could add an order column to the fpd_category_products_rel table which would allow this functionality


Best Answer

Maybe this will help other people having issues with ordering category items. I created my designs in order initially, but WP / MYSQL was giving me results out of order. Certain ids with higher values were appearing before others. To fix this, I was able to simply reorder the database index on my wp_fpd_products table. This then ordered the results by ID and solved my issue. 

RUNNING DATABASE QUERIES CAN BE DANGEROUS BACK UP BEFORE YOU ATTEMPT THIS
Note: your database may be using a custom prefix, it can generally be found in /wp-config.php
Once you find your prefix, you can replace wp_ in the following command and run it
To reorder the index you can run the command 
ALTER TABLE `wp_fpd_products` ORDER BY `ID` ASC;


I'll mention I was very lucky in my case that BECAUSE I added them in the proper order, this worked for me.... additions out of order would not find this working


Answer

Maybe this will help other people having issues with ordering category items. I created my designs in order initially, but WP / MYSQL was giving me results out of order. Certain ids with higher values were appearing before others. To fix this, I was able to simply reorder the database index on my wp_fpd_products table. This then ordered the results by ID and solved my issue. 

RUNNING DATABASE QUERIES CAN BE DANGEROUS BACK UP BEFORE YOU ATTEMPT THIS
Note: your database may be using a custom prefix, it can generally be found in /wp-config.php
Once you find your prefix, you can replace wp_ in the following command and run it
To reorder the index you can run the command 
ALTER TABLE `wp_fpd_products` ORDER BY `ID` ASC;

Login or Signup to post a comment