Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4

Thread: Sort lists

  1. #1
    Junior Member
    Join Date
    Jun 2007
    Posts
    3
    Member #
    15445
    Hi dear all
    I have created the following web site
    http://www.websites.designpandorabox.eu/avenuechic/rings.htm
    and I would like on top of product pages to put a sort by nam, price, material like the following one
    http://www.charlotterusse.com/category/index.jsp?cp=4241184&cat...s=A-UnitRank-CHIC

    Could someone help me and let me know how to develop such a system?
    The code I know is php, mysql (not an expert) and html , javescript
    Thank you very much




  2.  

  3. #2
    Senior Member Dorky's Avatar
    Join Date
    Jun 2009
    Location
    Destin Florida
    Posts
    1,430
    Member #
    19103
    Liked
    4 times
    use php. at the start of page load, pull all the data from each product into an array naming each value for later retrieval and place all product arrays into a single array. at the point of display use a foreach to break the array back down to individual products. inside the initial foreach, place another foreach and DO with data by [name]. the reason for placing all into a single array at the beginning of the script is ease of transport for any other uses you may have for the data. this keeps down the need to keep calling the DB. you could even store the main array in a $_SESSION to transport from page to page so one user = one call to the DB. do not store media in the arrays, rather store the path to the media and let the html call the actual media.

    while($get_it !== true){ continue; }

  4. #3
    Junior Member
    Join Date
    Jun 2007
    Posts
    3
    Member #
    15445
    Thank you

    Thank you very much for your help but as I am not so expert in php could you send me a code samples?
    Thank you

  5. #4
    Senior Member Dorky's Avatar
    Join Date
    Jun 2009
    Location
    Destin Florida
    Posts
    1,430
    Member #
    19103
    Liked
    4 times
    hahahahah. start googling. if i give you the code you will not understand how it works or what you need to edit for your site, also that type of project is going to take a lot more php then mentioned here. if you are going to build an e-store you will need to know this stuff. start with the foreach and array.

    while($get_it !== true){ continue; }


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:06 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com