Announcement

Collapse
No announcement yet.

Change email subject using Actinic Designer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Change email subject using Actinic Designer

    Hi folks
    I can't seem to find anything on the forum relevant to my problem.

    My client wants me to change the subject of the 'Order Shipped' email to 'Order Information' yet Actinic Designer doesn't appear to have this facility - I can change the body text but nothing else. I see from other posts that this is possible within Catalog but as I do all their site work (other than order processing) on Designer and send them the snapshots to import they are not very confident getting into the guts of the system. Any ideas anyone?
    The Pretty Dress Company

    #2
    You can change the subject in the perl script and/or design text. You may find this useful, it's old but I think it's still relevant to v10:
    http://community.actinic.com/showpos...03&postcount=2

    Comment


      #3
      Thanks Duncan.
      I looked in Design Text and could only find a loose reference (screenshot attached) but I'm not convinced it refers to the email subject - do you think I'm in the right place.

      I'm not sure how to go about accessing the Perl side of things - where are the files kept? On the server I assume but I could only find a few in the CGI Bin and none of them seem to have the 'Order Shipped' text in them for me to edit, and if I did would the Perl file be overwritten the next time my client refreshes the site....?

      Any more help you can provide would me most appreciated
      Attached Files
      Last edited by meden; 12-May-2011, 03:43 PM. Reason: screenshot attached
      The Pretty Dress Company

      Comment


        #4
        I think the post Duncan links to is for the 'order received' email. The order shipped email is generated by Actinic on the desktop rather than in the scripts.

        If you can't edit the email title within Actinic then the only other way I can think of doing this is to edit the perl scripts so they'll replace the text 'Order Shipped' with 'Order Info' before sending the mail. I think we've discussed this before in the past but it would have been a while ago and I haven't been able to find the post. It might take a bit of searching.

        Changes to the perl scripts would be made in the Actinic files on the desktop so a refresh won't over-write them. An upgrade would and the change would need to be re-applied then.

        Mike
        -----------------------------------------

        First Tackle - Fly Fishing and Game Angling

        -----------------------------------------

        Comment


          #5
          Thanks Mike
          I'm trying to find the correct .pl file in the site folder but with no luck so far - any idea which one it's likely to be?
          The Pretty Dress Company

          Comment


            #6
            Probably ACTINIC.pm. Look there for "sub SendMail".
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Thanks Norman - I'll do that when I've finished in the pub
              The Pretty Dress Company

              Comment


                #8
                <rant> Ok, I've had enough - I've been through every .pl and .pm script and can't find anything approximating a solution, checked ACTINIC.pm and orderscript.pl and nothing stands out - why is this so complicated? surely the ability to change an email subject line text should be straightforward? If I can easily change the body of an email within Designer why can't I easily change the subject? </rant>

                Any chance of some advice please, towers?
                The Pretty Dress Company

                Comment


                  #9
                  Why look through all the Perl when I told you exactly where to go?

                  Do as I suggest above and save yourself a lot of bother!

                  Read the comments above sub SendMail and you'll see that the Subject is the 3rd parameter passed in.

                  Five lines of code later it ends up in a variable called (rather obviously) $sSubjectText. Test it for the string you don't want, and if you find said string, put in your alternative.
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    Hi Norman
                    Sorry if I was testy but I was very frustrated last night. I had found the snippet you referred to
                    Code:
                    sub SendMail
                        {
                    #? ACTINIC::ASSERT($#_ >= 3, "Invalid argument count in SendMail ($#_)", __LINE__, __FILE__);
                    
                        #
                        # !!!!!! This is a function commonly used by many utilities.  Any changes to its interface will
                        # !!!!!! need to be verified with the various utility scripts.
                        #
                    
                        if ($#_ < 3)
                            {
                            return($::FAILURE, GetPhrase(-1, 12, 'Actinic::SendMail'), 0, 0);
                            }
                    
                        my ($sSmtpServer, $sEmailAddress, $sSubjectText, $sMessageText, $sReturnAddress) = @_;
                        #
                        # pass it on to the rich mail function
                        #
                        return(SendRichMail($sSmtpServer, $sEmailAddress, $sSubjectText, $sMessageText, "", $sReturnAddress));
                        }
                    But I cannot see where the variable is getting the value from - I've done a search for 'Order Shipped' (which is the text I need to change) in ACTINIC.pm with no results returned. I'm obviously missing something rather basic.....
                    The Pretty Dress Company

                    Comment


                      #11
                      Maybe try and remove $sSubjectText and replace it with the fixed text that you want.

                      Comment


                        #12
                        Hi Duncan
                        I see from my email that you've just posted a comment but it's not showing up on the forum so I've quoted it below for clarity

                        Maybe try and remove $sSubjectText and replace it with the fixed text that you want.
                        Yeah, I thought of doing that but the only way to test it would be to publish it and wait for an order to come through - I'd prefer to be a little more confident in the outcome before possibly breaking it. Out of interest would I need to wrap the new string in single or double quotes?
                        The Pretty Dress Company

                        Comment


                          #13
                          As I said.

                          Test it for the string you don't want, and if you find said string, put in your alternative.
                          Norman - www.drillpine.biz
                          Edinburgh, U K / Bitez, Turkey

                          Comment


                            #14
                            I did understand Norman, I just don't know how to write the condition to test for 'Order Shipped' I don't know any Perl and while I dabble in PHP I'm not confident enough to translate into Perl.

                            I'm thinking of going another route and using Logmein or other remote access to make the changes required on my clients Catalog machine, it's something I've been thinking about for a while anyway so I may bite the bullet
                            The Pretty Dress Company

                            Comment


                              #15
                              You don't need to do anything complicated to test and replace. A single line of code should do it:

                              $sSubjectText =~ s/Order Shipped/Order Info/g;

                              This will change any occurences of 'Order Shipped' in $sSubjectText to say 'Order Info'. Just place this line after the point Norman's directed you to where $sSubjectText is set.

                              To test it should be easy. Just open an order and send yourself an 'order shipped' email (you can edit the email address to send it to yourself rather than the customer).

                              Mike
                              -----------------------------------------

                              First Tackle - Fly Fishing and Game Angling

                              -----------------------------------------

                              Comment

                              Working...
                              X