mongomike Posted November 13, 2008 Share Posted November 13, 2008 Hi, I was wondering if anyone knew how to carry over the order of which products and attributes are displayed in shopping_cart.php to (admin) orders.php. The problem I have is that I need the products and attributes to be displayed in the same order as they are in the shopping cart, when I go to the admin orders.php page all of the products and attributes are in a random order. I have been trying to code it so that they are displayed in the same order as they are when they are on the shopping_cart.php page. Is this possible? has anyone any idea? Many thanks for any help in advance Link to comment Share on other sites More sharing options...
mongomike Posted November 14, 2008 Author Share Posted November 14, 2008 I have managed to sort the attributes alphabetically by changing the following in order.php ========================================================== THIS: $attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'"); if (tep_db_num_rows($attributes_query)) { ========================================================== TO THIS: $attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "' ORDER BY products_options ASC"); if (tep_db_num_rows($attributes_query)) { ========================================================== However I wanted to display the attributes by their ID instead of alphabetically... I think I need to sort them by products_options_ID but it is throwing up an error when I attempt this. Any Ideas? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.