Announcement

Collapse
No announcement yet.

Receipt Email + PERL Enquiry

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

    Receipt Email + PERL Enquiry

    Hi
    I would like to alter the component text in the receipt email.

    At present you get the following:
    Code:
    Shopping Cart (Prices in British Pounds)
     DESCRIPTION                     QUANTITY        PRICE         COST 
    ----------------------------------------------------------------------
     Product 1                              1      £799.00      £799.00 
      Colour                                1 
      Choice: Black                           
    
     Product 2                              1      £200.00      £200.00 
      Chosen                                1 
      Cover: 5 Seats                          
    ======================================================================
                                                 Subtotal:      £999.00
                                                 Shipping:      £1.00
                                                    Total:      £1,000.00
    
    
    ******************************************************
    What I want is:

    Code:
    Shopping Cart (Prices in British Pounds)
     DESCRIPTION                     QUANTITY        PRICE         COST 
    ----------------------------------------------------------------------
     Product 1                              1      £799.00      £799.00 
      Colour Choice: Black                  1 
                                 
    
     Product 2                              1      £200.00      £200.00 
      Chosen Cover: 5 Seats                 1 
    ======================================================================
                                                 Subtotal:      £999.00
                                                 Shipping:      £1.00
                                                    Total:      £1,000.00
    
    
    ******************************************************
    It appears the area to best achieve this is in the OrderScript.pl file.
    Code:
    GenerateCustomerMail Routine
    
    ($pProductDescription,$nLineCount) = ActinicOrder::WrapText($FullDescr,$nDescriptionColumnWidth);	# Word wrap description
    			my $sIndent = "";																						# Indent extra lines
    			foreach (@$pProductDescription)																		# Add all description lines
    				{
    				$pPrintTable->[$nColumn]->[$nCurrentRow++] = $sIndent . $_;								# Keep counting rows
    				$sIndent = " ";   # I removed the double space to line up the components
    				}
    			$nColumn++;																									# Finished, next column
    			$pPrintTable->[$nColumn++]->[0] = $ComponentQuantities[$nComponentCount];
    			}
    How can I best get BOTH component and attribute descriptions on the same line...?

    ("Colour" and "Chosen" are components & "Choice" and "Cover" are attributes)

    It must be a "\n" generated somewhere...

    BTW, "Product 1" and "Product 2" descriptors are NOT included in this enquiry.

    The layout I want IS used on the on screen shopping cart by default, so why is the email different??

    Thanks.

    #2
    Hello.....??

    I suppose I gotta sort it meself then....

    Comment


      #3
      Hi Graeme,

      I am afraid theis will not be possible by making changes in the perl script. The formating of the email is done on the desktop and using VC++ code, so will need a change on the desktop application. There have been a few requests for changes in the formatting of generated emails that cannot at present be done because of this issue. I can add this to a wish list for you.

      Kind regards,
      Bruce King
      SellerDeck

      Comment


        #4
        Hi
        Thanks for the reply.

        It's not a major issue, however I still cannot believe that the cart layout is different in the email to that used on the main shopping cart..

        Comment


          #5
          Graeme,

          You could hide one of the options if this would help, see this thread:-

          http://community.actinic.com/showthr...ponent+display

          This will hide the Component name completely and only show the Attribute name. It will also remove the quantity from that line as well if this is of any use.

          You better check this will work with your version though!

          David
          Cheers

          David
          Located in Edinburgh UK

          http://twitter.com/mcfinster

          Comment


            #6
            Hi
            Thanks for the link, only problem is that this hack
            a) is not for V4 (EDIT: seems harder to find, no comments as per usual in the scripts)
            b) would not affect the email receipt.

            Although Bruce stated the text for the components and attributes are built in the desktop client, the GenerateCustomerMail is clearly the routine that creates the original email "cart" text..

            & How can the desktop client generate a server side email??

            Code:
            If you change:
            $pPrintTable->[$nColumn]->[$nCurrentRow++] = $sIndent . $_;
            
            to>
            
            $pPrintTable->[$nColumn]->[$nCurrentRow++] = $sIndent . $_ . "TEST";
            
            you get>
            
            Shopping Cart (Prices in British Pounds)
             DESCRIPTION                     QUANTITY        PRICE         COST 
            ----------------------------------------------------------------------
             Product 1                              1      £799.00      £799.00 
              ColourTEST                                1 
              Choice: BlackTEST                           
            
             Product 2                              1      £200.00      £200.00 
              ChosenTEST                                1 
              Cover: 5 SeatsTEST                          
            ======================================================================
                                                         Subtotal:      £999.00
                                                         Shipping:      £1.00
                                                            Total:      £1,000.00
            
            
            ******************************************************
            When I get more time, I will look at the dereferencing and strip out the crap I don't want.

            Comment


              #7
              Graeme,

              It does actually affect the receipt, and also what will be downloaded. Thus your email would look like:-

              Product 1 1 £799.00 £799.00
              Choice: Black

              Product 2 1 £200.00 £200.00
              Cover: 5 Seats

              As would the order within Actinic and on your print outs. Then, to remove the component quantity from the receipt you need to run this hack:-

              http://knowledge.actinic.com/users/k...64.html#aKB681

              With any luck, these can both be ported from V7 to V4! Good Luck!
              Cheers

              David
              Located in Edinburgh UK

              http://twitter.com/mcfinster

              Comment


                #8
                Hi Graeme,

                Posted that assuming you were on v7. You can do what Dave has suggested and it should work for you in v4.

                Kind regards,
                Bruce King
                SellerDeck

                Comment


                  #9
                  In the V4 forum

                  Only Joking..

                  Anyways, it would be nice to know which routine in ActinicOrder.pm all these edits are as none of the previous information can be found (V7) and I would like to avoid spending 3 hours searching for it..

                  Thanks

                  Comment


                    #10
                    Hi Graeme,

                    Edit OrderScript.pl.
                    Search for...

                    '$ComponentText .= "\n";'

                    in the above line, replace \n with a single space so the line reads...

                    '$ComponentText .= " ";'

                    This should sort you out.

                    Kind regards,
                    Bruce King
                    SellerDeck

                    Comment


                      #11
                      Hi
                      Thanks Bruce, that's just the job

                      Comment

                      Working...
                      X