Announcement

Collapse
No announcement yet.

Sample Request Using 'Email A Friend' Method?

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

    Sample Request Using 'Email A Friend' Method?

    Hello

    I run single product per page on a furnishings website, and want to have a 'request sample' link. I have looked through the forum and not found any suitable solutions. I dont want to have a sample page separately, as the site concerned has so many variations that the customer would have to trawl through. One suggestion I saw was to use the Email A Friend code, which does appeal, as at least this holds the Actinic Variables to allow us to identify the product concerned. Here is the standard code from the AUG:
    HTML Code:
    <script type="text/javascript">
    function testkey(ev){
    	return ((ev.which ? ev.which : ev.keyCode) != '13');
    }
    
    function tellfriend(anc, pname){
    	var friend = document.getElementById('tell-' + anc);
    	var thisloc=location.href.replace(/%23/g, '#');
    	if (thisloc.indexOf('#') == -1)	// no anchor so add one in 
    		{
    		thisloc += '#' + anc;
    		}
    	else	// replace existing anchor with our own
    		{
    		thisloc = thisloc.replace(/#.*/, '#' + anc)
    		}
    	if (friend.value != '') {
    		location.href = 'mailto:' + friend.value + '?subject=' + escape('Take a look at ') + pname
    		+ '&body=' + escape('I saw ' + thisloc + ' and thought you would be interested.');
    		}
    }
    </script>
    
    Put the following in your product layout(s):
    Enter e-mail address to tell a friend 
    <input type=text id="tell-<Actinic:Variable Name="EncodedProductAnchor"/>" value="" size="40" onKeypress="return testkey(event);"/>
    <input type=button value="SEND" onclick="tellfriend('<Actinic:Variable Name="EncodedProductAnchor"/>','<actinic:block php="true">echo rawurlencode('<Actinic:Variable Name="ProductName" encoding="perl" selectable="false" />');</actinic:block>');">
    My questions is, and apologies because I am rusty with HTML, how can I edit this code, so that I just have a button on the product page rather than a text entry field, and change the "'mailto:' + friend.value +" so that it populates the mail to field with our samples@ email address? This way I can then put something in the body like "Enter your address below for us to send this sample to" and the link to the product will be sat there so we know what the customer is after! I have tried tweaking the code myself and am going round in circles!

    UNLESS someone has a tidier solution where we can have a sample request icon on a product page, and have it add to basket and over ride shipping to zero? Don't mind buying a plug-in if someone has sussed it!

    Many thanks

    ScottyDog
    www.edgeandwax.co.uk
    Edge & Wax
    Ski & Snowboard Workshop

    #2
    Any suggestions welcome, even if its not via the email friend method!

    ScottyDog
    www.edgeandwax.co.uk
    Edge & Wax
    Ski & Snowboard Workshop

    Comment


      #3
      Originally posted by scottydog View Post
      Any suggestions welcome, even if its not via the email friend method!

      ScottyDog
      Just posted how to do this on http://community.actinic.com/showthread.php?p=291868
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Thanks Norman!
        www.edgeandwax.co.uk
        Edge & Wax
        Ski & Snowboard Workshop

        Comment

        Working...
        X