Results 1 to 4 of 4
  1. #1
    Join Date
    May 2009
    Posts
    8
    Plugin Contributions
    0

    Default capture additional information during checkout

    Zen cart 1.5.1

    Can you help?

    Here's what I am trying to do...

    I need to record the product item's cost price after checkout so I can create a single sales export which includes the final price and the cost price. The cost price is to be recorded in the PRODUCTS table in a new field (cost), each time a product is added, along with the usual info.

    I have also created a new field in table ORDERS_PRODUCTS called my_cost_price for the purpose of recording the cost price for a sold product, but how do I get that field populated when an order occurs?

    I think this is might be done via includes/classes/order.php and even assuming that is correct I am not at all clear how to call up the data from the table PRODUCTS for the products_model that has been sold - so that it is inserted into that table.

    Is it possible - if so how? Any possible issues about doing this?

    Thanks.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: capture additional information during checkout

    Why record it after checkout??

    Just enter it when setting the product up
    Zen-Venom Get Bitten

  3. #3
    Join Date
    May 2009
    Posts
    8
    Plugin Contributions
    0

    Default Re: capture additional information during checkout

    Quote Originally Posted by kobra View Post
    Why record it after checkout??

    Just enter it when setting the product up
    We do enter it when setting up and updating the product - and the result is placed in the PRODUCTS table. We also update to the 'current average cost' when updating stock levels. Why? We sell at low margins and need easy way to keep track.

    We wanted to pass orders to our backoffice systems automatically and can export info OK from the ORDERS_PRODUCTS table via the 'Export_shipping_information' mod. It would help us to be able to export the cost price too - hence the request. It seemed the easiest way would be to record the cost price with the sale price and get that written to the ORDERS_PRODUCTS table.

    Certainly, and just for testing, I have manually adjusted the ORDERS_PRODUCTS table with the cost price and the sales export works a treat. Now need to get it to happen for real as sales occur.

    Thanks for your comment.

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: capture additional information during checkout

    By default orders.php generates the order confirmation email and also sends extra copies to the admin address if enabled
    One would have to add the "cost" data to ONLY the admin email interrupting the auto function of sending the standard confirmation to the admin

    You might get a clue looking at the alterations for "Dual pricing wholesale" plugin
    Zen-Venom Get Bitten

 

 

Similar Threads

  1. v151 Additional data, information or text capture during checkout
    By JonnoC in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 8 Jul 2013, 04:19 AM
  2. How can I ask for more information during checkout?
    By SocalPotHead in forum General Questions
    Replies: 0
    Last Post: 7 Nov 2011, 09:22 PM
  3. Capture additional product information for an order
    By bigsy85 in forum Managing Customers and Orders
    Replies: 12
    Last Post: 24 Jun 2010, 03:58 PM
  4. Replies: 13
    Last Post: 20 May 2008, 05:32 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