Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: How to edit receipt?

  1. #1
    omairkha is offline Member
    Join Date
    Aug 2011
    Posts
    89

    Question How to edit receipt?

    Ok, so I can't seem to modify the receipt no matter what I try!

    The XmlPackage.OrderReceipt AppConfig is set to notification.receipt.xml.config

    None of the modifications I've made to notification.receipt.xml.config took affect on the receipt print out. I've tried putting some static text in the <body> tags to see if it comes up but it does not.

    I tried making the exact same changes to notification.receiptv1.xml.config thinking maybe its pulling that file instead but no cigar....

    I even changed the text in order.cs.71 string resource but it is still showing the old text as if it was never updated.

    No matter what changes I make the receipt still looks the same as if no changes were made!

    Using MS 9.1.0.1

    ***UPDATE***
    I just deleted both notification.receipt.xml.config and notification.receiptv1.xml.config from the server but the receipt is still displayed.

    so if not one of these 2 files then where is the template coming from?


  2. #2
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    I know it's obvious, but which directory was the notification.receipt.xml.config you were editing in?

    Search order...

    1. App_Templates/Skin_1/XmlPackages (assuming you are using Skin 1)
    2. /XmlPackages

    Check you don't have versions of the same file in both directories.

  3. #3
    omairkha is offline Member
    Join Date
    Aug 2011
    Posts
    89

    Default

    Hi webopius, thanks for the reply. it must have been some type of glitch with my server or server network. my modified notification.receipt.xml.config are now showing up...

    i only keep one skin directory so i know i am always working with the correct files =p

  4. #4
    christianward is offline Junior Member
    Join Date
    May 2012
    Posts
    1

    Default

    One thing that threw me off when trying to edit my receipt XML Package was that I didn't realize ASPDNSF automatically saves the receipt HTML that is generated at the time of the order to a field called "receipt_html" (or something like that) in the order record in the database, and that is what is output every time you view the receipt online via the receipt.aspx page. You can make changes to the XML Package all day long and won't see the results because you will always see the saved HTML from the database. I believe this is the case with the receipt's stylesheet as well, since these styles are embedded in the body tag of the page upon generation (I guess it is this way so email apps can read the CSS without an external call to your server).

    At any rate, I found that you can change this behavior if you have access to the ASPDNSF source code (this refers to v9, not sure about others).

    Edit the "receipt.aspx.cs" file at the root of the site:

    Find (~Line 58):
    Code:
    Response.Write(o.Receipt(ThisCustomer, false));
    Change to:
    Code:
    Response.Write(o.Receipt(ThisCustomer, false, true));
    This will disable "receipt caching" for the output of the receipt.aspx page, and force regeneration of the receipt HTML via the XML Package every time. I believe the system will still save the receipt HTML to the database only once exactly as before, and not do so each time this page is invoked.