Results 1 to 4 of 4
  1. #1
    Join Date
    May 2007
    Posts
    6
    Plugin Contributions
    0

    Default Which Function Copies Basket Items to Order Tables?

    I need to modify the function that copies basket items to order. For instance when a customer orders, it gets added to the session then once they login its added to the session and customer basket table. When the customer completes the order, the order details are copied from the basket table to the orders table. I need to know which files to modify when the order is being created from the session. Thanks

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Which Function Copies Basket Items to Order Tables?

    What exactly are you trying to modify? Why?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    May 2007
    Posts
    6
    Plugin Contributions
    0

    Default Re: Which Function Copies Basket Items to Order Tables?

    I am working on a new shopping cart and I added a new table that references items in the cart. Its for a online business card design shopping cart. So a user can design their business card. The design tool I have developed allows users to create a nice graphic with layers and it uses GD library & JQuery - Similar to Vistaprint.com

    I need to copy these layers for each product in the cart to the a new table orders_canvas_layers but I cant find where zencart gets the products from the customers basket table and copies them to the order tables then deletes them from the customers basket... Hope it makes sense.

  4. #4
    Join Date
    Feb 2009
    Posts
    98
    Plugin Contributions
    1

    Default Re: Which Function Copies Basket Items to Order Tables?

    Quote Originally Posted by jambazi View Post
    I cant find where zencart gets the products from the customers basket table and copies them to the order tables then deletes them from the customers basket... Hope it makes sense.
    I just posted http://www.zen-cart.com/forum/showthread.php?p=1043378 which might be related to your questions. You might find some of the code references useful, at least.

    The products aren't copied from teh basket table to the order table. The products are known about in the cart object (which reads from the TABLE_CUSTOMERS_BASKET table), and then the order object takes the cart products in checkout_confirmation/header_php.php:

    Code:
    $order = new order;
    The order constructor, when passed no arguments, calls $this->cart() which causes it to initialise its list of products from the current shopping cart. This may include TABLE_CUSTOMERS_BASKET items or be entirely in-memory.

    I think the deletion of basket contents is done in the order processing page, whose modules/pages/checkout_process/header_php.php code clears out the basket passing true, which causes it to delete from TABLE_CUSTOMERS_BASKET.

    Code:
      $_SESSION['cart']->reset(true);
    Nick

 

 

Similar Threads

  1. v153 Which tables do I need to backup
    By su35 in forum General Questions
    Replies: 3
    Last Post: 2 Dec 2014, 02:44 PM
  2. Replies: 10
    Last Post: 15 Oct 2011, 02:31 PM
  3. Which tables to export?
    By fendy in forum General Questions
    Replies: 3
    Last Post: 10 Sep 2011, 06:16 AM
  4. Which tables to move for attribute files
    By cshart in forum General Questions
    Replies: 0
    Last Post: 15 Feb 2007, 03:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg