Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    May 2006
    Posts
    59
    Plugin Contributions
    0

    Which files should I change to call my php functions during the checkout process?

    Hi Zenners,

    Since I sell software for mobile applications, I need to add the following behavior to my checkout process:

    1. When the customer checks out, the checkout php code needs to call my php function that generates a unique code for the purchase.
    2. I need to also modify the php code to call my function that sends the user's mobile device an SMS text message with a URL and the generated code.

    I'm not sure what php file or files to modify? Any pointers to help me make these modifications would be greatly appreciated.

    When I find the file or files to modify, I'll copy them to a myTemplates directory (keeping the same directory structure) and modify them there so my changes will be preserved with zen_cart upgrades. Is this the correct procedure?

    I also need to modify the user registration information to include the user's mobile phone carrier (as a dropdown box) and then save that carrier_id in the zen_customers table. I'm guessing that making these two types of changes (to the checkout php code to call my php functions and to modify the user registration to include the carrier) will be similar. Some pointers as to which files to modify would greatly speed up my developmernt process, and they would be greatly appreciated!

    Thanks,
    jdl

  2. #2
    Join Date
    Jun 2003
    Posts
    33,802
    Plugin Contributions
    0

    Default Re: Which files should I change to call my php functions during the checkout process?

    You only want these things to happen *after* they have paid?

  3. #3
    Join Date
    May 2006
    Posts
    59
    Plugin Contributions
    0

    Re: Which files should I change to call my php functions during the checkout process?

    Yes, after they have paid. Why?

    They'll be paying by credit card or paypal account; so after I capture their cc information and send it to my merchant account and the zen_orders_products table is updated, at that point I'll generate the code and also store it in the zen_orders_products table. Does that makes sense? Is there another flow that would make more sense?

    jdl

  4. #4
    Join Date
    Mar 2004
    Posts
    16,074
    Plugin Contributions
    5

    Default Re: Which files should I change to call my php functions during the checkout process?

    If your manually generating the code then just put the code in the comments section of the exsisting order.

  5. #5
    Join Date
    May 2006
    Posts
    59
    Plugin Contributions
    0

    Default Re: Which files should I change to call my php functions during the checkout process?

    I don't want to parse it from their comments if they have comments--I'd prefer it to be in a separate db field.

    jdl

  6. #6
    Join Date
    Mar 2004
    Posts
    16,074
    Plugin Contributions
    5

    Default Re: Which files should I change to call my php functions during the checkout process?

    It wont parse it from the comments,
    after they hit confirm they can add anything to that section anyway....

    I use it for all kinds of things.,
    usually tracking codes and such

  7. #7
    Join Date
    May 2006
    Posts
    59
    Plugin Contributions
    0

    Re: Which files should I change to call my php functions during the checkout process?

    Interesting, I'll look into that. Thanks!

    In order to generate the code, I need to call my php function; but I'm not sure which zen cart file I need to modify in order to call my function (basically the zen-cart file that's processing the order and saving it to the db). Any pointers?

    There's so much code in zen-cart (which is wonderful because it has a lot of functionality) so I'm a little at a loss (without a lot of digging through the code) as to where the exact code lives that I need to modify.

    Thanks,
    jdl

  8. #8
    Join Date
    Mar 2004
    Posts
    16,074
    Plugin Contributions
    5

    Default Re: Which files should I change to call my php functions during the checkout process?

    you are going to want to ues includes/modules/pages/checkout_success...

    but earlier you stated that you will manually generate the code....

    if your doing this manually why worry about modifying core code that you cant use an over ride on....

  9. #9
    Join Date
    May 2006
    Posts
    59
    Plugin Contributions
    0

    Re: Which files should I change to call my php functions during the checkout process?

    My php function generates the code (thus I don't consider it manually generated).

    I looked at the file you mentioned--that's exactly the pointer I needed.
    Thanks very much!

    Since I've defined MyTemplate as my custom template (per the Template Customization FAQ), then to keep my changes separate, I'll add this directory:

    store\includes\modules\pages\checkout_success\MyTemplate
    and copy the file, header_php.php, to that directory and make my changes there??

    Hmm, that doesn't seem right but I'm not sure where I should place MyTemplate in order to override the header_php.php file in checkout_success?

    jdl
    Last edited by jdl; 8 Jun 2006 at 04:50 AM. Reason: incorrect path in post

  10. #10
    Join Date
    Mar 2004
    Posts
    16,074
    Plugin Contributions
    5

    Default Re: Which files should I change to call my php functions during the checkout process?

    the file in question is not in a directory where over rides exsist, as I stated above.

    so you will need to make the changes in
    includes/modules/pages/checkout_success/header.php

    and keep good notes of what you have changed

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 4
    Last Post: 17 Jul 2015, 04:44 AM
  2. v139h Change Address not working during checkout process
    By TECnews in forum General Questions
    Replies: 1
    Last Post: 18 Sep 2013, 11:54 PM
  3. which PHP files writes the Order to the DB?
    By tcarden in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 29 Mar 2013, 05:02 PM
  4. v138a error on very end of the checkout process - Call to undefined function zen_catalog_h
    By tomphillipspcs in forum Installing on a Linux/Unix Server
    Replies: 7
    Last Post: 16 Aug 2012, 02:30 PM
  5. Blank Screen on Step 2 of the Checkout Process after editing files in dreamweaver
    By cyberfrog in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 18 Apr 2012, 11:46 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR