shoptwm Posted January 20, 2009 Share Posted January 20, 2009 I WANT TO SORT PRODUCT AVAILABLE OPTION BY [TABLE PRODUCT_ATTRIBUTE] [FIELD OPTION_VALUE_ID] on the page PRODUCT_INFO...when we have any available option for any prodcut... i uploading my code and snap shot.. thanks in advance <IMG> http://www.shoptwm.com/img.jpg <p><?php echo stripslashes($product_info['products_description']); ?></p> <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { /// draw field 1/07/2009 tep_draw_hidden_field('quantity',$value = '1'); ?> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td> </tr> <?php /// GET PRODUCT AVAILABLE 1/7/2009 $product_quantity = tep_get_products_stock($HTTP_GET_VARS['products_id']); if ($product_quantity > MAX_QTY_IN_CART) { $product_quantity = MAX_QTY_IN_CART ; } ; /// product quantity $products_quantity_array = array(); for ($i=0, $n=$product_quantity; $i<$n; $i++) { $products_quantity_array[]=array('id' => $i+1, 'text' => $i+1); }; /// product quantity Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted January 20, 2009 Share Posted January 20, 2009 There are several contributions to sort the order in which attributes are displayed. Try searching for attribute sort order Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
shoptwm Posted January 20, 2009 Author Share Posted January 20, 2009 There are several contributions to sort the order in which attributes are displayed. Try searching for attribute sort order thanks for reply..i will look for it.. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.