Announcement

Collapse
No announcement yet.

email a friend at section level

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

    email a friend at section level

    I am trying to add the email a friend code (from AUG) but only want it to appear once on a page. we may have more than one product per page and use single add to cart button
    I have therefore added it to the Single Add to Cart Bottom Layout.
    This dis actually work but gave numerous errors in Actinic saying the variable were in an invalid place - which is actually correct as we are not "within" a product at this time
    I therefore edited the code to try and allow for this changing the following variables:
    ProductName in the subject line to SectionName - this works well
    EncodedProductAnchor - I have tried numerous setting for this including trying to hard code the path and appending SectionPageName but I still get a weird url if the link works at all.

    Currently I am trying the following:
    Code:
    <input type=text value="" size=40 onchange="
    	var thisloc='www.ringhaddy-daffodils.com/acatalog/<actinic:variable name="SectionPageName" />';
    	if (this.value != '') {
    		location.href='mailto:' + this.value +'?subject=Take%20a%20look%20at%20<actinic:variable name="SectionName" />&body=I%20saw%20' + thisloc + '%20and%20thought%20you%20would%20be%20interested.'
    		}
    ">
    When I select the Go button nothing happens.
    If I look at the generated html I get the following
    Code:
    <input value="" size="40" onchange=" var thisloc='www.ringhaddy-daffodils.com/acatalog/Accomplice.html'; if (this.value != '') { location.href='mailto:' + this.value +'?subject=Take%20a%20look%20at%20Accomplice&body=I%20saw%20' + thisloc + '%20and%20thought%20you%20would%20be%20interested.' } " type="text">
    Can anyone point me in the right direction - all I need to do is somehow get the url for the section page into the code so that it appears as the link in the email. Ideally without having to hard code the path but that is a small price to pay.

    Hope someone can help - this does seem to be quite a simple task so I am puzzled as to where I have gone wrong.....

    Regards
    David Cunningham

    www.truska.com
    -----------------------------
    ECommerce (SellerDeck) & Web Design, Hosting, Search Engine Optimisation, Social Media and Remote Backup (Truska Backup)

    #2
    Hi there - just notice this thread. Do you have '<script>' tags somewhere in this mix? It's not going to work without them. Also, you'll need the http:// in the address.

    Comment


      #3
      Yes the <script> tag is in place OK - I have a tried altering it that many times so not sure of all the configurations I have tried. I have now actually gone back the the standard script which does ! work except for reporting errors in Actinic as it is trying to use a Product Variable in a Section - but as our section names are the same as the product and there is only one product per page - the anchor is not therefore needed - and the script does actually work. I would just like to remove the errors in Actinic, it scares the client, and to not have the #anchor code on the end of the link..

      I will try again and use what I showed in the original post and add http:// before the www. code and see what happens again. I am sure I have tried it - but then again .......

      In short I guess from your comments it should work OK so it is worth making the effort to make it work

      Yes the <Script> tags are in place OK

      Thanks for your advise
      David Cunningham

      www.truska.com
      -----------------------------
      ECommerce (SellerDeck) & Web Design, Hosting, Search Engine Optimisation, Social Media and Remote Backup (Truska Backup)

      Comment

      Working...
      X