PHP Scripting Forums » PHP Classes Support Forum » Db_cart class Support forum

Adding to Cart

(5 posts)
Great offers not only for geeks!
Your Ad Here

  1. User has not uploaded an avatar

    xkarlos
    Member

    I have question, I don't know if this is normal behavior :

    If I have the product "A" in the basket and I add it again,
    it doesn't update the quantity (+1).

    Is this normal behaviour or I have something wrong.

    thank you !

    Posted 8 months ago #
  2. User has not uploaded an avatar

    xkarlos
    Member

    One more question: Is it possible to show immediately after adding to the cart show the chechout page ? (I have turned off the continue page.)

    many thanks for your help

    Posted 8 months ago #
  3. If I have the product "A" in the basket and I add it again,
    it doesn't update the quantity (+1).

    There is some replace option for this method:

    function update_row($row_id, $quantity, $replace = "yes") {
    		if ($quantity == 0) {
    			$this->delete_row($row_id);
    		} else {
    			$new_quant = ($replace == "no") ? "quantity + ".$quantity : $quantity;

    use this to update or replace the current item.

    Is it possible to show immediately after adding to the cart show the chechout page ?

    No not really, maybe you can change that code and redirect to the checkou page

    Posted 8 months ago #
  4. User has not uploaded an avatar

    xkarlos
    Member

    Thank you,

    I have one more question,
    Is it possilbe to use this script without customer id ?
    Because I need use this shopping cart without registration.

    the previous problem I solved with the calling of the update function with the new quantity.

    Posted 8 months ago #
  5. yes it's possible (check the examples), please don't use the same thread for multiple questions.

    Posted 8 months ago #

RSS feed for this topic

Reply

You must log in to post.