Jump to content
Latest News: (loading..)

Search the Community

Showing results for tags 'sort'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News and Announcements
    • News and Announcements
    • Partner Announcements
    • Ambassadors
  • Commercial Support
    • Developer Feedback
  • osCommerce Online Merchant v2.x
    • General Support
    • Installation and Configuration
    • Upgrading from Earlier Versions (v2.x to v2.x)
    • Add-Ons
    • Tips and Tricks
    • Security
  • Development
    • osCommerce Online Merchant v2.4
    • osCommerce Online Merchant Community Bootstrap Edition
    • osCommerce Online Merchant v3.x
    • Development Proposals
  • General
    • OSCOMMERCE.TV
    • Next Steps / Optimizations / Marketing
    • Live Shop Reviews
    • E-Commerce Laws
    • General Discussions
    • PHP / SQL / Web Design
  • oscBooks and oscTemplates's Announcements
  • PayPal's Announcements
  • Sage Pay's Announcements
  • Solomono - new level osCommerce templates's Announcements
  • German Community's OSCOM v2.x
  • German Community's Allgemein
  • German Community's OSCOM v3.x

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Real Name


Location


Interests


Website


Skype

Found 8 results

  1. Hi all, I'm in the process of finishing a new bootstrap osc website, with the fantastic help from one of the members here and I have a question that I'm trying to sort myself around the display of manufacturers. Basically I want to sort the manufacturers so they display alphabetically. I've tried a few things but none have worked so wonder if someone could point me in the right direction please? My page so far is as follows: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require('includes/languages/' . $language . '/manufacturers.php'); $breadcrumb->add(NAVBAR_TITLE, tep_href_link('manufacturers.php')); require('includes/template_top.php'); ?> <style> .cat-set2 { display: flex; flex-wrap:wrap; justify-content: space-between; } .cat-set2 > div { min-width:30%; margin: 10px; text-align: center; font-size: 30px; } .cat-image { background-color: white; min-width:30%; margin: 10px; padding:10px 0; text-align: center; font-size: 30px; border:1px solid #9a9a9a; border-radius:10px; } .cat-image:hover { border:1px solid #dd0000; } div.caption {background:white} </style> <div class="page-header"> <h1 class="h3"><?php echo HEADING_TITLE; ?></h1> </div> <?php //$manufacturers_query = tep_db_query("SELECT DISTINCT count(p2c.products_id) as prodcount, cd.categories_id, cd.categories_name, m.manufacturers_id, manufacturers_name, manufacturers_image FROM " . TABLE_PRODUCTS . " p, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_MANUFACTURERS ." m, " . TABLE_PRODUCTS_TO_CATEGORIES ." p2c WHERE p.manufacturers_id = m.manufacturers_id AND p.products_id = p2c.products_id AND p.products_status = 1 AND p2c.categories_id = c.categories_id and c.categories_id = cd.categories_id and cd.language_id = " . (int)$languages_id . " GROUP BY m.manufacturers_name, cd.categories_name"); $db_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image from manufacturers m left join manufacturers_info mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = '" . (int)$languages_id . "'"); ?> <div class="contentContainer"> <div class="contentText"> <div><?php echo TEXT_INFORMATION; ?></div> <div class=" cat-set2"> <?php while ($db = tep_db_fetch_array($db_query)) { echo '<div>'; echo '<div class="cat-image equal-height" style="margin-bottom:0;">'; echo '<div class="text-center">'; echo '<a href="' . tep_href_link('index.php', 'manufacturers_id=' . $db['manufacturers_id']) . '">' . tep_image('images/' . $db['manufacturers_image'], htmlspecialchars($db['manufacturers_name']), '100', '100') . '</a>'; echo '</div>'; echo '</div>'; echo '<div class="caption text-center">'; echo '<h5><a href="' . tep_href_link('index.php', 'manufacturers_id=' . $db['manufacturers_id']) . '"><span itemprop="itemListElement">' . $db['manufacturers_name'] . '</span></a></h5>'; echo '</div>'; echo '</div>'; } ?> </div> </div> <div style="clear:both;"></div> <div class="buttonSet"> <div class="text-right"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'fa fa-angle-right', tep_href_link('index.php')); ?></div> </div> </div> <?php require('includes/template_bottom.php'); require('includes/application_bottom.php'); ?>
  2. About This add-on is based on SimpleSuggest, adding a search suggestion to your OsCommerce search box, but it also records each customers' searched keywords and sort the result products order by popular search, or even simply show the result in term of popular keywords. It also gives the ability to search in multiple keywords using AND/OR. Options can be set in Admin and automatically install and deal with database. By setting search type 'products' and sort by 'products', it works just like SimpleSuggest, but you can also sort the resulting products by 'keywords' - it's searched count. Or simply put search type to 'keywords' so it works as a self-learn search engine which gives the pass searched keywords (make sure you have enough saved search keywords before turn this on) ScreenShot http://richardfu.net/wp-content/uploads/2013/10/screenshot_1_search_suggest.jpg Search suggestion using or and multiple words http://richardfu.net/wp-content/uploads/2013/10/screenshot_2_admin_configuration.jpg Admin configuration http://richardfu.net/wp-content/uploads/2013/10/screenshot_3_stats_report.jpg Stats keyword searched 2.2.x Add-on page 2.3.x Add-on page
  3. This addon has three simple unavoidable changes to core code and an optional simple change to admin categories. Amended code and instructions are provided for 2.3.4BS Edge but with comparable edits it would work on any 2.3+ store. It provides the means to change the default order of products with a category on index.php and supports the same product having different values in different categories. A separate admin page allows you to set all the sort orders within a category at once, and also lets you change the sort order of categories. Upload link coming when available.
  4. This thread is about having a products sorting possibility like Sort by: Products A-Z Products Z-A Price High > Low Price Low < High Bestseller Latest added and maybe few other... I think this topic deserve it's own thread and I see that @@vampirehunter is very interested in getting this to work and so am I. If anyone has something like this working properly with osC please share your work here. Or if you have any ideas as to how approach this please share. Here is what I found a while back somewhere here in the forum. And I use this in my current non-BS shop but it is not coded properly and it requires at least 2 different manufacturers to be assigned to 2 products from the same category to make this filter work...stupid right? And you have to hard code the numbers and assign the text to each one of them. So here is my code if (isset($HTTP_GET_VARS['manufacturers_id']) && !empty($HTTP_GET_VARS['manufacturers_id'])) { $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name"; } else { $filterlist_sql = "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name"; } $filterlist_query = tep_db_query($filterlist_sql); if (tep_db_num_rows($filterlist_query) > 1) { echo '<div class="filter2">' . tep_draw_form('sort', FILENAME_DEFAULT, 'get') . TEXT_SORT; if (isset($HTTP_GET_VARS['manufacturers_id']) && !empty($HTTP_GET_VARS['manufacturers_id'])) { echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']); } else { echo tep_draw_hidden_field('cPath', $cPath); } $sort_list = array('2a' => SORT_NAME_A_Z, '2d' => SORT_NAME_Z_A, '3a' => SORT_PRICE_L_H, '3d' => SORT_PRICE_H_L); //'1a' => SORT_MODEL_A_Z, //'1d' => SORT_MODEL_Z_A); foreach($sort_list as $id=>$text) { $sort_range[] = array('id' => $id, 'text' => $text); } echo tep_draw_pull_down_menu('sort', $sort_range, (isset($HTTP_GET_VARS['sort']) ? $HTTP_GET_VARS['sort'] : ''), 'onchange="this.form.submit()"'); echo tep_draw_hidden_field('filter_id', (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : '')); echo '</form></div>' . "\n"; }
  5. It would be good to allow lists (of products, categories and so on) to be sorted by alphabetical order according to the language's specific rules.
  6. Hi, I installed the French language pack and the Boxes configuration reverts to default when I switch to the second language (French). I am installing v2.3.3 and migrating changes from a 2.2a site. Most of the French content works (most is still from the module installation). The box content displays correctly, but the left/right configuration and the boxes displayed and sort order appear to be the system defaults. When installing the French module as an unzip from catalog, I chose not to overwrite as I did not want to have administrative functions in French. I even tried switching the language to French, going to the admin page and re-writing the boxes configuration, but no change. Searched all over the forums, but have not found the solution. Your help is greatly appreciated!
  7. Hello, I've trying to sort on product name with this script. But everything i try the output always is sort on order number and i want to sort on product name. Please can anyone rewrite this script so the output is sort on product name? Thanks in advanced. <?php $orders_query = tep_db_query("SELECT * from " . TABLE_ORDERS . " WHERE (orders_status = '1' OR orders_status = '2')"); while($orders_rows = tep_db_fetch_array($orders_query)) { $products_query = tep_db_query("SELECT * FROM " . TABLE_ORDERS_PRODUCTS . " WHERE orders_id = '" . $orders_rows['orders_id'] . "' ORDER BY products_name"); while($products_rows = tep_db_fetch_array($products_query)) { $ordStatus_query = tep_db_query("SELECT * from " . TABLE_ORDERS_STATUS . " WHERE orders_status_id = '" . $orders_rows['orders_status'] . "' "); $ordStatus_rows = tep_db_fetch_array($ordStatus_query); echo "<tr>"; echo "<td class=dataTableContent>" . $ordStatus_rows["orders_status_name"] . "</td>"; echo "<td class=dataTableContent>" . $orders_rows["orders_id"] . "</td>"; echo "<td class=dataTableContent>" . $products_rows["products_quantity"] . "</td>"; echo "<td class=dataTableContent>" . $products_rows["products_name"] . "</td>"; echo "<td class=dataTableContent>" . $products_rows["products_price"] . "</td>"; echo "</tr>"; } } ?> Best regards, Martin
  8. Hello, I am sure this has been done, but I cannot find it anywhere. Is there a way to sort your product lists by the product attributes? This obviously works for sorting by price and by manufacturer, since those two options are included. But is it much more difficult to retrieve the product attributes and sort your lists by them? So for example, let's say I sell shoes and want to sort the list of all shoes to only filter out the ones that are black, and each of my products has an attribute defined as "color" with the value of "black", or "blue", etc... Any help would be greatly appreciated....
×