Results 1 to 3 of 3

Thread: Sending items to my cart from a drop down list

  1. #1
    Join Date
    Jun 2008

    Sending items to my cart from a drop down list

    This is my first shopping cart site and I wondered if someone can point me in the right direction or maybe give me the terms for what I'm trying to do so I can google it? At the moment I am displaying 6 items from my database using a while loop to show each record in a floated panel

    <div class="panel">
    <div class="id">
    <?php echo $product['id']; ?>
    <div class="title">
    <?php echo $product['title']; ?>
    <div class="weight">
    = <?php echo $product['weight']; ?>% </div>
    <div class="price">
    <?php echo $product['price']; ?>

    I now need to group items into twos in a drop-down list so the first 2 products are in panel A and next 2 are in panel B

    Panel A drop-down
    id1 <?php echo $product['title']; ?> | <?php echo $product['weight']; ?> | <?php echo $product['price']; ?>
    id2 <?php echo $product['title']; ?> | <?php echo $product['weight']; ?> | <?php echo $product['price']; ?>

    Panel B drop-down
    id3 <?php echo $product['title']; ?> <?php echo $product['weight']; ?> | <?php echo $product['price']; ?>
    id4 <?php echo $product['title']; ?> <?php echo $product['weight']; ?> | <?php echo $product['price']; ?>

    I'm currently posting them to my cart using the id…

    <div class="add"><a href="index.php?view=add_to_cart&amp;id=<?php echo $product['id']; ?>">Add</div></a>

    …but I'm not sure how to group the records into twos within each panel using a while loop, or how to go about posting the id of the item selected in the drop-down.

    Can anyone advise me on what sorta thing I need to do? Thanks

  2. #2
    Join Date
    Sep 2012
    use open source program like opencart to make you online store
    check my store sitll in under develop
    u can change your theme and many thigs let me know if u need more help

  3. #3
    Join Date
    Jun 2008
    Sorry just seen this, I didn't get an email notification about your post. Thanks for the tip but I'm trying to build this from the ground up so I understand the workings behind everything

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center