waqar3 0 Newbie Poster
Hello Mate,         I have a question. I want to use cookies script in my shopping cart with add to cart button. But i don't understand how to start this and action of cookies. Because i want when user click add to cart but product are add in thier cart and i set the time of cookies after complete the cookies time product automatically remove from his checkout box.

okies script in my shopping cart with add to cart button. But i don't understand how to start this and action of cookies. Because i want when user click add to cart but product are add in thier cart and i set the time of cookies after complete the cookies time product automatically remove from his checkout box.
  Here are the script where i include the cookies.        

    <?php 
      $Special_Product_Sql = "SELECT * FROM product WHERE status = 1 && featured = 1";
                $Special_Product_Exe = mysql_query($Special_Product_Sql);
       while($Product_Fetch = mysql_fetch_array($Special_Product_Exe)) {

                $path = 'product/'. $Product_Fetch['product_img'];
                ?>
        <div class="featured_content">
                <a href="product_detail.php?id=<?php echo $Product_Fetch['pro_id']?>"><span class="heading" style="font-weight:bold;">
       <?php echo $Product_Fetch['title']; ?></span></a><br>
                <a href="<?php echo $path; ?>" title="Sony vaio">
                            <img width="148" height="117" border="0" alt="Sony vaio" src="<?php echo $path; ?>">
                        </a><br>

                <span class="productPrice">
                        $<?php echo $Product_Fetch['price']; ?>      </span><br>
       <form method="post" action="">
                        <input type="hidden" value="com_virtuemart" name="option">
                        <input type="hidden" value="shop.cart" name="page">
                        <input type="hidden" value="63" name="Itemid">
                        <input type="hidden" value="cartAdd" name="func">
                        <input type="hidden" value="26" name="prod_id">
                        <input type="hidden" value="26" name="product_id">
                        <input type="hidden" value="1" name="quantity">
                        <input type="hidden" value="" name="set_price[]">
                        <input type="hidden" value="" name="adjust_price[]">
                        <input type="hidden" value="" name="master_product[]">
                        <input type="submit" title="Add to Cart" value="Add to Cart" class="addtocart_button_module">
                        </form>
       </div>
       <?php };  ?>
       </div>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.