Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2009
    Posts
    234
    Plugin Contributions
    0

    Default Adding conditional code to emails

    Hi all, just wondering what file i would need to edit to add some code to the 'welcome' and 'order updates' emails?

    If possible, Id like to include some code if it equals a certain zone ID - in other words, there some extra wording I want to include for international customers.

    Thanks in advance,

    Scott.
    Donation made. Enjoy those donuts! :-)

  2. #2
    Join Date
    Jun 2009
    Location
    Brisbane, QLD AUS
    Posts
    210
    Plugin Contributions
    0

    Default Re: Adding conditional code to emails

    i would imagine you might want to create a new function that is similar to the send_order_email() function, and then add whatever logic you like for your restrictions on content there. this function is located in the file includes/classes/order.php.

    not sure about changes to the order, but i'd imagine their would be a similar function in the admin classes folder for status changes and such. please don't blame me if it doesn't work though, as I've not tried altering this before!

    andrejs

  3. #3
    Join Date
    Jun 2009
    Location
    Brisbane, QLD AUS
    Posts
    210
    Plugin Contributions
    0

    Default Re: Adding conditional code to emails

    sorry, forgot to mention this function is called from includes/modules/checkout_process.php, so once you create your new function make sure to call it from this file instead of the original.

  4. #4
    Join Date
    Dec 2009
    Posts
    234
    Plugin Contributions
    0

    Default Re: Adding conditional code to emails

    Hi Andre, thats great thanks, this at least points me in the right direction.

    Cheers,

    Scott.
    Donation made. Enjoy those donuts! :-)

  5. #5
    Join Date
    Jan 2004
    Posts
    66,419
    Blog Entries
    7
    Plugin Contributions
    277

    Default Re: Adding conditional code to emails

    LOL .. actually it points you in completely wrong directions, at least as far as filenames are concerned. Neither of those files has anything to do with welcome emails or order-status-update emails.

    welcome emails = create_account module
    order-status-updates = admin orders.php
    .

    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.

  6. #6
    Join Date
    Dec 2009
    Posts
    234
    Plugin Contributions
    0

    Default Re: Adding conditional code to emails

    Hmm ok, thanks.

    I wish I had more of a programming background at times like this...
    Donation made. Enjoy those donuts! :-)

  7. #7
    Join Date
    Jun 2009
    Location
    Brisbane, QLD AUS
    Posts
    210
    Plugin Contributions
    0

    Default Re: Adding conditional code to emails

    ...and i wish i had read your initial email properly. please accept my apologies, must have been way past my bedtime, as i was on a completely different tangent...

  8. #8
    Join Date
    Dec 2009
    Posts
    234
    Plugin Contributions
    0

    Default Re: Adding conditional code to emails

    No harm done, and no apology required Andre.. Im sure I wouldnt muddled my way through to the right file eventually!
    Donation made. Enjoy those donuts! :-)

 

 

Similar Threads

  1. Conditional code - how to?
    By twdhosting in forum General Questions
    Replies: 17
    Last Post: 25 Oct 2007, 10:20 PM
  2. Confirmation Emails - conditional by category?
    By davestrand in forum General Questions
    Replies: 4
    Last Post: 4 May 2007, 02:59 PM
  3. Add Conditional Code To Some Pages
    By Anuragji in forum General Questions
    Replies: 4
    Last Post: 9 Jun 2006, 02:58 AM

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