Announcement

Collapse
No announcement yet.

Exraxting an e-mail address

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

    #16
    Sorry should be:

    Code:
    <!-- Campaign Commander capture code start -->
    <script type="text/javascript">
    var oldString = 'NETQUOTEVAR:INVOICEEMAIL';
    newString = oldString.replace(/Email:&nbsp;(.*)<br>/,"$1");
    document.write('<img src="http://as1.emv2.com/D?emv_pageok=http://www.butterflies-healthcare.co.uk/&emv_pageerror=http://www.butterflies-healthcare.co.uk/&emv_webformtype=3&emv_bounceback=0&emv_clientid=36055&NAME_FIELD=NETQUOTEVAR:INVOICENAME&EMAIL_FIELD=');
    document.write(newString);
    document.write('&BOUGHT_OCUSAN_FIELD=Yes" width="1" height="1">');
    </script>
    <!-- Campaign Commander capture code end -->
    I've had a look with Firefox but it make no sense to me, sorry.

    I really can't believe that Actinic can't simply export a simple email on its own
    www.butterflies-healthcare.co.uk
    www.viteyes.co.uk - vitamins for macular degeneration
    www.natorigin.co.uk - natural/organic cosmetics and skin care for sensitive skin & eyes
    www.butterflies-eyecare.co.uk - eye drops, vitamins and other eye care products
    www.prescription-swimming-goggles.co.uk - optical and prescription swimming goggles

    Comment


      #17
      Okay I am making some progress here but need a little more help.

      It appears that:
      Code:
      <Actinic:Variable Name="InvoiceEmail"/>
      generates an email like this
      Email: test@test.co.uk<br>

      Now I need to get just the pure email address of test@test.co.uk

      I have found that if I change the 'Customer Email Receipt Prompt' in TEXT - WEB SITE (CONT) I can remove the 'Email:'

      However, I am left with a space at the beginning and the <br> at the end.

      Any ideas as to where I could remove these.

      Merry Christmas everyone.

      James
      www.butterflies-healthcare.co.uk
      www.viteyes.co.uk - vitamins for macular degeneration
      www.natorigin.co.uk - natural/organic cosmetics and skin care for sensitive skin & eyes
      www.butterflies-eyecare.co.uk - eye drops, vitamins and other eye care products
      www.prescription-swimming-goggles.co.uk - optical and prescription swimming goggles

      Comment


        #18
        I've found where the space and the <BR> comes from, but I'm afraid it's hidden away in the Perl, and the same code is used for every bit of the receipt address details.

        You could remove the space and the <BR> from here though and then hard-code it into the receipt I guess - that'll work.

        Find this bit in ActinicOrder.pm

        Code:
        #######################################################
        #
        # HashToVarTable - add specific hash items to the
        # variable table.
        #
        # Input:		0 - \%HashID - Hash key => VarTable Key map
        #				1 - \%Hash - has of values
        #				2 - \%VarTable - the variable table
        #
        # Returns:	0 - $::SUCCESS or $::FAILURE
        #				1 - undef or error message
        #				\%VarTable
        #
        # Author: Zoltan Magyar
        #
        #######################################################
        
        sub HashToVarTable
        	{
        	my ($pHashID, $pHash, $pVarTable) = @_;
        	my ($sKey, $sValue);
        	while (($sKey, $sValue) = each(%$pHashID))
        		{
        		my $sTemp = '';
        		if ($sValue =~ /([^\|]+)\|(.*)\|(.*)/)				# is there any | as separator?
        			{													# if so look up the phrase and add to text
        			$sTemp = ACTINIC::GetPhrase($2, $3) . " " .$$pHash{$sKey}; # edit this one
        			$sValue = $1;
        			}
        		else													# there is no prompt secified
        			{
        			$sTemp = $$pHash{$sKey};					# then simply use the text of hash
        			}
        		my @Response = ACTINIC::EncodeText($sTemp, $::TRUE, $::TRUE);	# but encode before
        		$sTemp = $Response[1] . "<BR>";	 # edit this one
        		if ((length $$pHash{$sKey}) == 0) 			# if the value doesn't exist
        			{
        #?			ACTINIC::TRACE("OrderScript::HashToVartable could not find mapping for " . $$pHash{$sKey});
        			$sTemp = "";									# erase the value
        			}
        		$$pVarTable{$::VARPREFIX . $sValue} = $sTemp;
        		}
        	return($::SUCCESS, '');
        	}
        Where I've put '#edit this one' in the code above, remove the values in the quote marks, then upload your store.

        Comment


          #19
          Thanks for that Chris.

          Would that only effect the receipt layout?

          James
          www.butterflies-healthcare.co.uk
          www.viteyes.co.uk - vitamins for macular degeneration
          www.natorigin.co.uk - natural/organic cosmetics and skin care for sensitive skin & eyes
          www.butterflies-eyecare.co.uk - eye drops, vitamins and other eye care products
          www.prescription-swimming-goggles.co.uk - optical and prescription swimming goggles

          Comment


            #20
            The variable itself is used in several places, but the Perl code is purely for formatting the display in the receipt. It might also do the emails as well. I haven't been able to test that, so you might want to.

            Comment


              #21
              Why not make a copy of the MDB and grab it from the customer or Person file?
              Chris Ashdown

              Comment


                #22
                Chris

                This works to some extents, but it does not strip the <BR> from the end of the customers name (it does for all other lines)

                James
                www.butterflies-healthcare.co.uk
                www.viteyes.co.uk - vitamins for macular degeneration
                www.natorigin.co.uk - natural/organic cosmetics and skin care for sensitive skin & eyes
                www.butterflies-eyecare.co.uk - eye drops, vitamins and other eye care products
                www.prescription-swimming-goggles.co.uk - optical and prescription swimming goggles

                Comment


                  #23
                  Sorry Jimbo - I thought you just wanted the email address.

                  The <BR> for the contact name is in this chunk of code in OrderScript.pl
                  Code:
                  	if ((length $::g_BillContact{'NAME'}) > 0)		# if the contact name exists
                  		{
                  		$sTemp = $::g_BillContact{'SALUTATION'} . " " . $::g_BillContact{'NAME'};
                  		@Response = ACTINIC::EncodeText($sTemp);
                  		$sInvoiceName .= $Response[1] . "<BR>\n";	# add it to the message display
                  		}

                  Comment

                  Working...
                  X