Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

Buyer Rego at Checkout

Discussion in 'iG Shop' started by lim038, May 8, 2004.

  1. lim038

    lim038 New Member Webmaster

    I was not being specific in my previous message.

    When the admin checks for orders, there is a column called "Buyer" and one can sort orders by clicking it. Now, this column is empty somehow. This makes tracking of orders very difficult.

    I have look through the code, and realized one thing, the cart.php is serializing every details ofa buyer except his/her user_id. In the MySql database, the buyer part needs the user_id, not the fname or lname.

    I wonder which part of the code updates the database for the buyer information, may be I can attempt to change the code myself.

    any help ??

    michael lim
  2. lim038

    lim038 New Member Webmaster

    I have partially solved my problem.

    In cart.php there is this session:

    reset ($cart);
    mysql_query("insert into orders set
    payment_info = '".addslashes(serialize($data))."',
    ****** buyer = '".addslashes($data[first_name])."', ********* <-- this was missing
    products = '".addslashes(serialize($cart))."',
    order_date = now(),
    payed = 'wait'");
    $new_order = 1;
    $session[order_id] = mysql_insert_id();
    $session[cart] = "";

    I added the ******* buyer etc .... ******** line.
    I could potentially add buyer's first/last name there. But the problem is, the order tracking code uses user_id for tracking. Theoretically, I should write a code in cart.php extract the user_id using the first/last name pair, then subsitute it for the buyer's line of code above.

    It would be far easier for the authors to supply those lines of code, as they konw better. Could you help me there please ??

    michael lim

Featured Resources (View All)

Share This Page