Announcement

Collapse
No announcement yet.

email product id

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

    email product id

    I've got this handy bit of code (I think it is one of Norman's)

    i'd like to be able to send the product details in the email and not just the page.....can anyone amend the code for me?

    ------------------------------------------------<Enter e-mail address to tell a friend <input type=text value="" size=40 onchange="var thisloc=location.href;if(this.value != ''){location.href='mailto:' + this.value +'?subject=Take a look at '+thisloc+'&body=I saw '+thisloc+' and thought you would be interested.'}"><input type=button value="OK">---------------

    #2
    Hmmmm... You could try replacing

    Code:
    &body=I saw '+thisloc+' and thought you would be interested.'
    with

    Code:
    &body=I saw '+thisloc+' and thought you would be interested. NETQUOTEVAR:PRODUCTDESCRIPTION'
    however I don't think it will work very well as there will be bits of HTML in there (special characters get Escaped, etc). Also this could lead to a very long argument being passed to the e-mail client (depending on the length of your product description) and that may mess things up too.

    Try it and see.

    One solution would be to use a function to process the NETQUOTEVAR:PRODUCTDESCRIPTION text and to remove all html and escaped code. Also it could truncate long descriptions to a manageable length.

    Norman
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      I just did a quick test of the idea above and it seemed to work OK using the standard Actinic Demo site. The only page with a problem was the Custom PC where there was embedded html (via !!< and >!!) in the product description. This introduced hard coded new lines which broke the JavaScript. If you don't use embedded HTML (or put it all on a single line) then you may be OK.

      Remember I only did a quick test so you'll need to test more thouroughly.

      Norman

      p.s. If you replace

      thisloc=location.href

      with

      thisloc=location.href + '#NETQUOTEVAR:PRODUCTANCHOR'

      then it'll link you right to the actual product rather than the page top.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Email Product ID

        Hi Guys,

        Can you please post the full script here as this is a wonderful idea? I'm a newbie and I'm not sure of the full script to make this work.

        Many Thanks

        Paul.

        Comment


          #5
          That was it above. Just put this (rather long one-liner) in a suitable place in Act_ProductLine.html.

          Code:
          Enter e-mail address to tell a friend <input type=text value="" size=40 onchange="var thisloc=location.href + '#NETQUOTEVAR:PRODUCTANCHOR';if(this.value != ''){location.href='mailto:' + this.value +'?subject=Take a look at '+thisloc+'&body=I saw '+thisloc+' and thought you would be interested.'}"><input type=button value="OK">
          Norman
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            a little more

            hi all, here is a neat trick to add to normans code, it means that you as a webmaster will get a copy of the email the surfer sends to their friend..

            in normans code, where the snippet

            &body=I saw '+thisloc+' and thought you would be interested.'

            appears, you can change it to read

            &body=I saw '+thisloc+' and thought you would be interested. &bcc=yourname@yourcompany.com'

            obviously substitute yourname@yourcompany.com for your own email address and this will be inserted into the BCC (Blind Carbon Copy) field of the email...try it..

            Steve Quinn
            Harlequin Domains
            www.harlequindomains.com
            Actinic Design, Hosting and Marketing

            Comment


              #7
              Thanks for that Steve

              I was thinking it would be nice to know if the email idea was being used. I will add your snippet to the code

              Jo

              Comment


                #8
                I will add your snippet to the code
                Add in all the bits above and that'll make it an extremely long one-liner Any more ideas to keep it growing?

                Norman
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment


                  #9
                  Email Product ID

                  How about?

                  &body=I saw '+thisloc+' and thought you would be interested. &bcc=yourname@yourcompany.com' &send me a nice cold beer'



                  What do you think?

                  Paul.

                  Pinnacle.

                  Comment


                    #10
                    Actually I have now decided not to use the bcc feature as its leaves the email address open to harvesters.

                    Since spam is going through the roof recently I have really tightened up on placing email addresses in HTML code. ie I don't do it!

                    Comment


                      #11
                      i totally agree jo but it may still be worth it if you use a 'throwaway' email address for a little while just to see if people use it and have some strict filter rules in place in your email client...

                      cheers
                      steve..

                      Comment


                        #12
                        Yep good point!! It would be interesting to see how effective the email is.

                        Comment


                          #13
                          Since spam is going through the roof recently I have really tightened up on placing email addresses in HTML code. ie I don't do it!
                          This is generated by JavaScript so you could break up your e-mail address somewhat. E.g.

                          '&bc' + 'c=myname' + '@' + 'myserver' + '.mydomain'

                          may well fool them enough.

                          And / Or use a throwaway address to see if it actually happens.

                          What do you think?

                          Norman
                          Norman - www.drillpine.biz
                          Edinburgh, U K / Bitez, Turkey

                          Comment


                            #14
                            This is brilliant and very handy, thanks. I've been banging my head against the wall with form mail php trying to get an 'email to a friend' box on individual products.

                            I've used this code to generate an email template that includes product name and price (in our case the name is the book title, the description is usually quite long and title I think is enough). The two functions referenced strip the variables from all the coded stuff and I can send them to anyone who's interested, or you can view them in the popup page source (eg http://www.csbooks.co.uk/acatalog/info_M_02670.html). Or go to any other of the extended info pages (you can view source on a popup from the right-click menu).

                            We decided against bcc-ing because we don't really need to know and didn't want this to put off people who might be paranoid about email harvesting. Here is the code we've used:

                            <input type=text value="" size=30 onchange="var thisloc=location.href;var thisProduct=getProdName();var thisPrice=getProdPrice();if(this.value != ''){location.href='mailto:' + this.value +'?subject=Take a look at www.csbooks.co.uk &body=I saw *' + thisProduct + '* at Collectors Supplies online bookstore for only ' +thisPrice+ '! Here is the link: '+thisloc+' There are loads of other great titles at great prices!'
                            }"><input type=button value="OK">

                            I've changed a few of the original parts of this code, ie the subject line and a little marketing plug addition to the body.

                            If anyone wants to try testing this and can see any potential problems, please let us know.

                            Josie
                            www.csbooks.co.uk
                            Josie Henley-Einion
                            Collectors Supplies
                            http://www.csbooks.co.uk

                            Comment


                              #15
                              I am trying to modify this code and would like a little help. I need to set up the email subject line to capture the product reference number and description. I want the email to automatically be sent to the merchant.

                              The merchant would like to be able to receive questions from the consumer and would like the email to capture the product information automatically so they know exactly which product the inquery is refering to.

                              <Enter e-mail address to tell a friend <input type=text value="" size=40 onchange="var thisloc=location.href + '#NETQUOTEVAR:PRODUCTANCHOR';if(this.value != ''){location.href='mailto:' + this.value +'?subject=Take a look at '+thisloc+'&body=I saw '+thisloc+' and thought you would be interested.'}"><input type=button value="OK">


                              above is the orginal code.

                              any suggestions would be great.
                              Brian Johnson
                              :::Sure Solutions Inc:::Professional Actinic templates from Buythisdesign.com:::
                              1-732-528-7635 x203

                              Comment

                              Working...
                              X