Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Search the Community

Showing results for tags 'qtpro stock table'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News and Announcements
    • News and Announcements
  • osCommerce v4.x
    • General Support
    • Migration from old osCommerce
    • Design and Templates
    • Apps / Add-ons
    • Translations
    • API and import/export
    • Marketplace integration
    • Manuals and How-to
  • osCommerce Online Merchant v2.x
    • General Support
    • osCommerce Online Merchant Community Bootstrap Edition
    • Add-Ons
  • Development
  • General
    • General Discussions
    • Live Shop Reviews
    • Security
    • Developer Feedback

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Real Name




Found 1 result

  1. I've been trying to find an answer to this for some time. The QTPro add on has a stock table. This is in the file modules/qtpro_stock_table.php It appears to be ordering it by the table PRODUCTS_STOCK and the field products_stock_attributes. Adding different Order by to the other queries doesn't seem to change anything. The problem with the products_stock_attributes field in the table PRODUCTS_STOCK is that it is a varchar field and so sorts lexically. So for example I am getting soirting results that show: 1000 before 53 In addition the field has 2 hyphens and a comma. So I tried on the query a very complicated Order by to first separate the 2 bits of info in the products_stock_attributes field and order them separately (1st in my shop is colour, 2nd is size), then the Cast as Signed integer to order: // Get the stocklevels $products_stock_query=tep_db_query("SELECT products_stock_attributes, products_stock_quantity FROM " . TABLE_PRODUCTS_STOCK . " WHERE products_id=" . (int)$HTTP_GET_VARS['products_id'] ." ORDER BY SUBSTR(products_stock_attributes,INSTR(products_stock_attributes,'-')+1) ASC, SUBSTR(products_stock_attributes,INSTR(products_stock_attributes,',')+3) ASC, CAST(products_stock_attributes as SIGNED INTEGER) ASC"); It doesn't work. Cast as signed integer still leaves i.e. 1000 before 200 Any ideas QTPro experts out there? Has anyone else tried to get the QTPro table sorting correctly? I have the picklist in the right oder in pad_base. many thanks