Announcement

Collapse
No announcement yet.

adding subject and product reference to email

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

    adding subject and product reference to email

    I am using a button on each product page to enable people to enquire further about an item. The code is as below and works OK. However, I want to be able to pre-populate the subject line with details about the product itself. I use a customvar caleld STOCKCODE which holds the product reference. What should I include in the code to do this?

    Thanks


    <script type=text/javascript>
    var _u = "sales";
    var _d = "actualartefacts.com";
    var _l = _u + "@" + _d;
    var _m = "<img src=enquire_about.gif border='0'>";
    document.write("<a href='mailto:"+_l+"'' style='color:black' class='actxxsmall'>"+_m+"</a>");
    </script>

    #2
    The code to insert the product reference into the subject would be:

    Code:
    <script type=text/javascript>
    var _u = "sales";
    var _d = "actualartefacts.com";
    var _l = _u + "@" + _d;
    var _m = "<img src=enquire_about.gif border='0'>";
    document.write("<a href='mailto:"+_l+"?subject=CUSTOMVAR:STOCKCODE' style='color:black' class='actxxsmall'>"+_m+"</a>");
    </script>
    If you are using this for every product (within Act_ProductLine.html) you could use the NETQUOTEVARS to include more information, eg the item title etc. For example, you can use NETQUOTEVAR:PRODUCTREFERENCE to give you the product reference without having to use a custom property.
    Last edited by Froogle; 08-Aug-2005, 11:11 AM. Reason: extend

    Comment


      #3
      Thanks. I would like to add in for some products some text in the body such as: Please send me your catalogue. Would I use ?body and how/where should it be inserted in the code?

      John

      Comment


        #4
        The first string added to a mailto: should start with ?, and any further strings need to have & before them, like this:

        Code:
        <a href="mailto:ADDRESS?subject=SUBJECT&body=BODY">LINK</a>
        You'll need to use escape sequences such as %20 for a space and %0a%0d for a new line.

        Comment


          #5
          Thanks. Works a treat.

          John

          Comment

          Working...
          X