Results 1 to 10 of 17

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Changing the URL in the Order Confirmation "Click here for a Detailed Invoice"

    If you must change it, just hack out the call in the orders.php class file which generates the URL intelligently by replacing the zen_href_link call with whatever replacement HTML you want to substitute instead.
    ie: instead of zen_href_link(......), use literal '<a href='blahblah'>'
    .

    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.

  2. #2
    Join Date
    Nov 2008
    Posts
    51
    Plugin Contributions
    0

    Default Re: Changing the URL in the Order Confirmation "Click here for a Detailed Invoice"

    Quote Originally Posted by DrByte View Post
    ... hack out the call in the orders.php class file which generates the URL intelligently by replacing the zen_href_link call with whatever replacement HTML you want to substitute instead.
    ie: instead of zen_href_link(......), use literal '<a href='blahblah'>'

    Thanks very much for the reply. I tried to do so, but apparently do not quite understand. Below is what I did:

    1. I edited the file: includes/classes/order.php
      -
      -
    2. The first reference to zen_href_link was at line 75:
      $zc_coupon_link = '<a href="javascript:couponpopupWindow(\'' . zen_href_link(FILENAME_POPUP_COUPON_HELP, 'cID=' . $coupon_link->fields['coupon_id']) . '\')">';
      I do not change this because I am not sure what it is, but it mentions coupons, which do not show up in the confirmation email.
      -
      -
    3. The 2nd reference was at line 913:
      EMAIL_TEXT_INVOICE_URL . ' ' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false) . "\n\n";.

      This looked like a good possibility, so I changed this to:
      EMAIL_TEXT_INVOICE_URL . ' ' . '<a href="http://bmisurgery.org/index.php?ID=supplements-new" title="BMI Surgery Store">BMI Surgery Storeyyy</a>;' . "\n\n";.

      I uploaded the file, reloaded my browser, entered a test order, and can see no change in the confirmation email.
      -
      -
    4. The 3rd reference was at line 924:
      $html_msg['INTRO_URL_VALUE'] = zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false);.

      I changed this to:
      $html_msg['INTRO_URL_VALUE'] = '<a href="http://bmisurgery.org/index.php?ID=supplements-new" title="BMI Surgery Store">BMI Surgery Storezzz</a>;';.

      I uploaded the file, reloaded my browser, entered a test order, and the confirmation email now has a link to the wrong address: http://bmisurgery.org/store/<a+href=, which is, of course, no good, as it still is putting it's own prefix it and the remaining part is gibberish.


    So, I could really use a little more help. Would you be able to send me the exact lines of code to use for:
    1. #1, if needed
    2. #2
    3. #3
    4. as well as the code to use to change the footer link Copyright (c) 2010 BMI Surgery Online Store (I think I should probably change that as well)


    Many thanks in advance.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Changing the URL in the Order Confirmation when running site in iframe

    Notwithstanding that I'm not a fan of the overall approach you're using with your site, and I'm not a fan of changing these links to no longer take the customer directly to their order, you should be able to accomplish what you requested by making the following changes in /includes/classes/order.php

    1. for Text-Only emails:
    Change this:
    Code:
        EMAIL_TEXT_INVOICE_URL . ' ' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false) . "\n\n";
    to this:
    Code:
        EMAIL_TEXT_INVOICE_URL . ' <a href="http://bmisurgery.org/index.php?ID=supplements-new" title="BMI Surgery Store">BMI Surgery Store</a>' . "\n\n";
    2. for HTML-formatted emails:
    Change this:
    Code:
        $html_msg['INTRO_URL_VALUE']       = zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false);
    to this:
    Code:
        $html_msg['INTRO_URL_VALUE']       = '<a href="http://bmisurgery.org/index.php?ID=supplements-new" title="BMI Surgery Store">BMI Surgery Store</a>';
    .

    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.

  4. #4
    Join Date
    Nov 2008
    Posts
    51
    Plugin Contributions
    0

    Default Re: Changing the URL in the Order Confirmation when running site in iframe

    Thank you for your help.

    I tried what you sent me but still get the same result, that is, the link address is coming out wrong, as follows:

    http://bmisurgery.org/store/<a+href=

    Instead, it should be:


    Looks like some other function is still putting the storefront directory name in the path and stripping out my stuff. Any ideas on how to fix?



    Also, I appreciate your comment below and I actually do agree with you in part:

    Quote Originally Posted by DrByte View Post
    I'm not a fan of the overall approach you're using with your site....
    However, I am at a loss for any other way to accomplish what I want, which is to really and truly integrate zc into the rest of my website. And judging from the forum entries, I am not the only one who wants to do this.

    My thinking (plz tell me if I am wrong) is that there are just too many other, non-zc pages (some yet to come) and too much going on there to put my other pages into zc (as EZ pages or Define pages). And, the alternative is not attractive either, ie. have a link from the main part of my site that jumps into zc, which would have it own copy of the header, footer, css style sheets, and so forth. This is confusing for users to navigate in and out of--there are 2 different pages that are conceptually HOME--not to mention the maintenance effort required to keep both up to date and in sync.

    I have looked through the add-on software for something that would allow me to build in LOTS of other pages, preferably CMS and blog stuff (which is coming) but found nothing. Have I just missed something there that you know of?

    Any further discussion/suggestions/feedback form you on a better method would be appreciated. Zen Cart is truly a wonderful application--I am continually amazed and awed by what it does, how easy it is to customize, and how well it functions. Figuring out to more smoothly integrate it into a main website would be the frosting on the cake and would REALLY make it stand out as the premier shopping cart application. So let's do that! Hey, I'll even volunteer as your first beta tester!

    TIA,

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Changing the URL in the Order Confirmation when running site in iframe

    Quote Originally Posted by ibuttons View Post
    Thank you for your help.

    I tried what you sent me but still get the same result, that is, the link address is coming out wrong, as follows:

    http://bmisurgery.org/store/<a+href=

    Instead, it should be:


    Looks like some other function is still putting the storefront directory name in the path and stripping out my stuff. Any ideas on how to fix?
    I'm guessing that your language file has been customized and thus the original EMAIL_TEXT_INVOICE_URL definition is changed?
    My suggestion was based on using the original content in the language file, particularly for that definition.
    .

    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
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: Changing the URL in the Order Confirmation when running site in iframe

    You could use the Document General product type to add additional pages to your Zen Cart. If you look at my nephew's site in my sig, it's Zen Cart as CMS and all the articles are Document General.
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  7. #7
    Join Date
    Nov 2008
    Posts
    51
    Plugin Contributions
    0

    Default Re: Changing the URL in the Order Confirmation when running site in iframe

    Quote Originally Posted by afo View Post
    If you look at my nephew's site in my sig, it's Zen Cart as CMS and all the articles are Document General.
    Ok, sorry, where is that?

  8. #8
    Join Date
    Nov 2008
    Posts
    51
    Plugin Contributions
    0

    Default Re: Changing the URL in the Order Confirmation when running site in iframe

    Quote Originally Posted by afo View Post
    If you look at my nephew's site in my sig,
    sorry, how do I get to that?

    Never mind, I figured it out, you meant signature. I thought you were referring to a Special Interest Group or some such thing.
    Last edited by ibuttons; 24 May 2010 at 09:17 PM.

  9. #9
    Join Date
    Nov 2008
    Posts
    51
    Plugin Contributions
    0

    Default Re: Changing the URL in the Order Confirmation when running site in iframe

    Quote Originally Posted by DrByte View Post
    I'm guessing that your language file has been customized and thus the original EMAIL_TEXT_INVOICE_URL definition is changed?
    My suggestion was based on using the original content in the language file, particularly for that definition.
    Can you be more specific on what you mean by your language file? I have kept a copy of the original files and can easily compare or go back and restore the file and then carefully add back in any changes I need, but I need to know what file(s) are involved.

    I did compare my original version of includes/classes/order.php to my current one that has the changes you mentioned and that produced the bad results I reported, and the only differences are the lines that you gave me. So I am guessing you are referring to another file.

  10. #10
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Changing the URL in the Order Confirmation when running site in iframe

    https://www.zen-cart.com/tutorials/index.php?article=38
    https://www.zen-cart.com/tutorials/index.php?article=39
    Use the supplied Developers Toolkit to look up the define for that constant: EMAIL_TEXT_INVOICE_URL
    Then compare that file from your server against the original Zen Cart files.
    .

    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.

 

 

Similar Threads

  1. v150 How do I customize the order totals section of the order confirmation email?
    By brannon125 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 24 Feb 2012, 10:30 AM
  2. Replies: 5
    Last Post: 15 Dec 2010, 11:05 PM
  3. No order confirmation email when the buyer using non-English language and PayPal IPN
    By mleeks in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 8 Dec 2010, 11:55 AM
  4. Replies: 5
    Last Post: 5 Jun 2010, 11:18 PM
  5. Replies: 0
    Last Post: 12 Sep 2008, 08:00 PM

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