Announcement

Collapse
No announcement yet.

Advanced Tell a Friend functionality

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

    Advanced Tell a Friend functionality

    I'm looking to make a more advanced Tell a Friend function for Actinic which will do the following:-

    1) Craft a link on the product template which pops a window passing the product Name and URL (preferably to a hidden field on the popup)

    2) In the popup, show a form with a field for the friends name and a personal message (if required)

    I've tried this using the 'additional extra info popup' code from the AUG however this results in a unique HTML page in the popup window for *each* product (very inefficient)

    Can anyone suggest how I can pass the variables of product name and referring URL over to a new window so I populate the appropriate fields?

    Thanks
    Thanks

    Jos Medinger

    Tel : 01978 843 962
    www.internetology.co.uk
    Actinic / E-Commerce Hosting, Design & SEO
    ______________________________________

    #2
    query strings?


    additionally, you could construct the code for the popup entirely in the host page and then inject it into the popup.

    Comment


      #3
      Here's something to try (untested)

      In your Product Layout replace

      <h3 class="product"><Actinic:Variable Name="ProductName"/></h3>

      with

      <h3 id="nm_<Actinic:Variable Name="EncodedProductAnchor"/>" class="product"><Actinic:Variable Name="ProductName"/></h3>

      and in your window open URL do something like

      <a href="javascript:ShowPopUp('emailpopup.html?<Actinic:Variable Name="EncodedProductAnchor"/>', 400, 400)">Email a friend</a>


      Now in your Popup page have some onload JavaScript like


      var prodid = location.search(1); // extract the query string (it just has the unique id)
      var productname = opener.document.getElementById('nm_' + prodid).innerHTML; // and get the Product Name
      var productpage = opener.location.href; // get the calling pages URL
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        my 2 cents:

        I've created a new page based on the contact us page, but something more customized and with more fields. The page is a catalog-independant php page (but it retains the same layout as a catalog page) which receives info such as product name, product page url via query string. The form data (friend's address, sender's address, optional message...) is briefly checked out before being sent to mailform.pl to which I've added an action and a subroutine pretty much like the sendmailtomerchant one; the mail is sent to the friend and we're sent to the bounce page and redirected back to the product page. Pretty cool actually.

        Lazyeye

        Comment

        Working...
        X