Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Nov 2008
    Posts
    51
    Plugin Contributions
    0

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

    Can anyone tell me how to change the URL in the Order Confirmation email message that is behind the "Click here for a Detailed Invoice"?

    Here is why I am asking for this:
    ==========================================
    I am displaying my ZC store from inside an IFRAME on my main site. This seems to work great--my cart is now integrated perfectly into the rest of my website. The only problem I have found so far is that Order Confirmation emails contain a link in them that goes directly to the store, and does not start at the real website and go through the IFRAME. That means, clicking on the link in the email order confirmation message brings up the store only and my store does not have a header and nav bars--these are part of the main site. So, I want to change the URL of that link, as follows:

    from: http://bmisurgery.org/store/index.php?main_page=login
    to: http://bmisurgery.org/index.php?ID=supplements-new

    Also, I have not actually shipped out an order yet, as the store is not yet live, so are there any other such links that would also need to be changed in other email messages?

    Sincere thanks in advance for any/all help anyone can give. All responses greatly appreciated!


    For the record:
    ===============================
    1. I have searched extensively in the forums and on Google with many different keywords and phrases. No one has provided relevant info on this.

    2. I have used the Developer's Toolkit in the admin area and THOUGHT I found the file that is generating the email and tried to modify it, but not gotten the results I want. I am not sure I really l understand the code well enough to modify it.

    3. I am using: Zen Cart 1.3.8a
    Patch: 1::
    Database Patch Level: 1.3.8

    4. I have not upgraded this site -- it is brand new. I have been modifying the version I downloaded.

    5. I will list the few add-ons that I have if anyone wants me to, but they do not impact the email and I do not think that they are involved in this issue--I just need to modify the link in the email message.

  2. #2
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

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

    Iframes and Zen Cart do not play well together, plus many payment gateways will not accept payments from an Iframes source, so this is a bad idea.

    Check this thread http://www.zen-cart.com/forum/showthread.php?t=84362
    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

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

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

    Got any suggestions for a better way to do this?

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

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

    Here's an important update for anyone interested (I found others who want to use an iframe within ZC by searching the forum using "iframe")"

    When invoking ZC inside an iframe with Authorize.Net (SIM) as my 3rd Party Gateway, , I AM able to enter orders which are authorized and captured successfully.

    To verify this, I checked A/N and the order shows up there, I checked ZC and see the order there. I even turned on the log and had it emailed to me and checked the fields in it: the return code from A/N looks fine.


    Also of interest, I have tested my website and have not found any significant iframe issues other than the one I brought up in my original posting, (ie, the URL in the Order Confirmation "Click here for a Detailed Invoice" ). If anyone knows of any specific ones, please point them out to me, as I am human and could be missing something.

    And lastly, I am not worried about the search engines as I have a site map for them to follow and also can set up URL redirects if needed. These will all be on the same domain name, just under different folders, so I don't THINK that Google et all will take umbrance with this, if I am interpreting their guidelines correctly.

    So, given that, I'd like to go back to the original issue: I would think it really SHOULD be fairly easy to change the URL, provided one understands the code, which is a little difficult for me. So, again, does anyone know how to modify the URL in the Order Confirmation email?

    Many thanks in advance for comments on this. I think it brought out many good issues which are important to consider.

  5. #5
    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.

  6. #6
    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.

  7. #7
    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.

  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

    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,

  9. #9
    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.

  10. #10
    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

 

 
Page 1 of 2 12 LastLast

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