Jump to content

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


Forums

  • News and Announcements
    • News and Announcements
  • 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
  • PayPal's Announcements
  • Sage Pay's Announcements
  • Solomono - new level osCommerce templates's Announcements
  • German Community's OSCOM v2.x
  • German Community's Allgemein

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

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
×