Menu

Order Products

Help 2.02
Vincent
2003-02-14
2003-02-21
  • Vincent

    Vincent - 2003-02-14

    Sorry for all my questions.
    Where can i change how the products are ordered on the site. i saw something like orderby in the tables .. but i want to order them by product name.

    and also in the admin part.. the item.php what do i have to change there ?

    Greetings and lots of thanks already
    Vincent

     
    • Vincent

      Vincent - 2003-02-14

      and also is it possible to show the BTW price in the shopping cart or something like that ..

       
      • Andreas Kansok

        Andreas Kansok - 2003-02-15

        Which is BTW price? With or without VAT?

         
    • Andreas Kansok

      Andreas Kansok - 2003-02-15

      Look into main.php line 20: "... order by item.orderby" change this to : "... orderby iteminfo.name"

       
      • Andreas Kansok

        Andreas Kansok - 2003-02-15

        ... and do the same in limit_navi.inc.php line 15 too ...

         
    • Vincent

      Vincent - 2003-02-15

      btw price is with the 19 percent.
      so i want to let them see how much btw(VAT) is on it. i've seen that the mail gives that numbers. but is it possible to change on the shopping cart ?

       
      • Andreas Kansok

        Andreas Kansok - 2003-02-15

        On each item or only at summary?

        You have calculate and output not only the complete price, but BTW too.
        Please visit function.inc.php show_price() and frmtprice() to change this.

         
    • Vincent

      Vincent - 2003-02-15

      when i change that to iteminfo.name it didn't work ..
      still not order right.

      http://www.nailstylinglaura.nl/phpayv22

       
    • Vincent

      Vincent - 2003-02-15

      oke i shall look for that .
      it's really weird it seems that the products are not arranged. and it doesn't matter what i change in the main .php file :S how can i arrange them good in my shop?????

       
      • Andreas Kansok

        Andreas Kansok - 2003-02-15

        limit_navi.inc.php changed in line 15 too? (see some messages earlier ;-)

         
      • Andreas Kansok

        Andreas Kansok - 2003-02-15

        If you let them ordered by 'orderby' you can enter a free defined order in item admin. But that's not thought to do it for alphabetical order of course, but only to have special products sure on top or on the end of a list.

         
    • Vincent

      Vincent - 2003-02-15

      when i change the lines it displays some products double and some products not :( really weird

       
      • Andreas Kansok

        Andreas Kansok - 2003-02-16

        SQL's  'ORDER BY' only sorts search results, but not incease decrease them. Am I right?

        If items are double or not there seems to be a problem with:
        ... item.ID=iteminfo.itemID AND iteminfo.langID=$langID ...

         
    • Vincent

      Vincent - 2003-02-16

      i've changed nothing else. and i've got only one language id 1 ...

       
    • Vincent

      Vincent - 2003-02-19

      so it's a really weird bug :S

       
    • Anonymous

      Anonymous - 2003-02-19

      may this solve your problem
      but it is only an first aid -

      limit.nav - line 20 if (!isset($caller) || ($caller=="main")) {

        $item_result = db_query("select distinct item.*,iteminfo.* from item, iteminfo, it_itgr

       
    • Vincent

      Vincent - 2003-02-20

      thx.. that's working .. but why isn't that good to do..? because u said it is only first aid ??

       
      • Andreas Kansok

        Andreas Kansok - 2003-02-21

        Because a lot of lines are duplicated (so much as entries in it_itgr) and are removed by DISTINCT.
        Another solution is a modified query with JOIN like:

        SELECT ite.*, inf.*
        FROM iteminfo AS inf, item AS ite
        LEFT JOIN it_itgr AS itg ON ite.ID=itg.itemID
        WHERE (itg.itemgrID=$itemgr OR ite.itemgrID=$itemgr)
        AND ite.ID=inf.itemID
        AND inf.langID=$langID
        AND ite.visible=1
        ORDER BY ite.orderby

        With this query are only lines selected and no doubles, may be this is faster then DISTINCT (and works with MS-SQL ;-)

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.