Share it with a Friend!

    This module provides the "Tell a friend" genre of functionality. It adds a button to the product display pages which a customer can click to be taken to a form page where they enter the email address(es) of their friends, enter any comments they want, and send an email to those friends telling them about the product. But it is a bit more flexible than most. The button link from the product page can be displayed in 11 different positions (and even all 11 if the mood strikes you). The form into which the customer enters their email address and the addresses of their friends with whom they are sharing their discovery is completely configurable. You define the html to use for that page with tokens used to represent where you want to put the various form fields. The message on the email is similarly configurable and tokens can be used to represent the product code, name, price, cost, and description. The module includes a logging feature which can save the product and customer's comment to a flatfile. By default, the module includes the HTML you need for a standard form for all of the fields and pages.
NOTE: this module requires use of the OpenUI (http://www.openui.org) OR modification of the Miva Merchant UI.
Installation instructions can be found here

The Module's Admin screen (additional explanation in blue)


Button Position:
10  11 
   These numbers represent the positions on the Product Display page at which you can display the "share it" button. The locations of these various positions can be seen here. You can select as many of these as you want.
Button setup:
   Restore Default?
   The button setup is the html that will be used to display the "share it with a friend" button. When the html is displayed, the token %button% will be replaced with the actual button (the image and alt text can be configured for this button below). If the token %button% does NOT appear in this box, the button will not appear on the product. To restore the default (which you see here), simply click on the "restore default" checkbox and update the page.

Image for "share it" button: upload file
Alt for "share it" button:
Image for "send" button: upload file
Alt for "send" button:
Image for "cancel" button: upload file
Alt for "cancel" button:
   This is where you can set the image to use for the "share it" button (the one that appears on the product display page), and the "send" and "cancel" buttons. These two latter buttons appears on the form page. The "send" button is the button that sends the form and the "cancel" button will close the page. If no image is configured, the alt text will be used instead of the image.

Show "send mail" form as: Popup New Window
   The "send mail" form can be opened as a popup window, or as a new full window.
   Popup window height:
   Popup window width:
   If the form page is opened as a popup window, these values will be used to define the height and width of that window.
Form Page Title:
Background for form page: upload file
Background color for form page:
   These are fairly self-explanatory settings for the form page.
Number of "to" addresses to show:
   This is the number of addresses the customer will be able to enter to send the email to. There is no real limit to the number of emails (but keep in mind that it might take a while to send a few dozen emails).
Columns for Comments Field:
Rows for Comments Field:
   If the "comments" field is to be displayed on the form page, these values will be used to define the size of the textarea form field used to collect the information.

Form header:
Form footer:
   The header and footer that can appear on the form page. Both can contain HTML.
Form main page:
   Restore Default?
   This is the HTML that will appear on the form page. When it is displayed, the following tokens will be replaced with their respective "content". Of course if you do not have the token in the field, they will NOT appear on the form page. Their use is entirely optional.
%addresses%replaced with the list of form fields that the customer can enter the addresses into
%custaddress%replaced with a form field for the customer to enter their own email address
%comments%replaced with a textarea form field into which the customer can enter any comments they might want to appear on the email
%prodname%the name of the product they are sending information about
%prodcode%that product's code
%prodprice%that product's price
%prodcost%that product's cost
%proddesc%the product's description

Show customer "from" field?
   Your from address:
   If this option is checked, your "from" address will be used as the "from" address in the email and the %custaddress% token will NOT be used.
Email Subject:
CC addresses:
   The subject of the email and any cc addresses that the emails will be sent (eg. if you wanted to have a copy sent to yourself). The cc emails are mailed separately than the other emails so the customer's friends will NOT see the cc addresses.
Message on email:
   Restore Default?
   This is the HTML that will appear on the email itself. When it is displayed, the following tokens will be replaced with their respective "content". Of course if you do not have the token in the field, they will NOT appear in the message. Their use is entirely optional.
%prodlink%replaced with a link to the product display page for the product
%comments%replaced with comments entered by the customer on the form page
%prodname%the name of the product they are sending information about
%prodcode%that product's code
%prodprice%that product's price
%prodcost%that product's cost
%proddesc%the product's description
%custemail%replaced with the email address of customer who is sending the email

Time to close "success" page (seconds):
   After the email is sent, the customer is taken to a "success" page. This page contains a "close" button which will close the page, but if a value is entered in this field, the page will close automatically after this number of seconds. In this example, the page will close after 5 seconds.
Message on Success page:
Image for "close" button: upload file
Alt for "close" button:
   The message entered here will be displayed on the "success" page. The images and alternate text will be used to display the "close" button. If no image is configured, the alternate text will be used for the link.

Generate Log file?
   If this option is checked, at the time the email is sent, the date/time, product code, and comments will be exported to a flat file with the file name specified below, using the configured delimiter. If the "append" option is set, the exported data will be added to any existing file with this same name.
   Log file name:
   Delimiter for log file:
   Append to preexisting file?

Installation

This module installs like any typical system extension module.
To install the main module:
1. If you want to ftp the module file (BROK_SHAREIT.mv) to your server, do so now. For convenience, place it into the Merchant2/modules/system directory. Note that your Merchant scripts might NOT be installed in a directory called Merchant2/. Although most setups use this directory. If your's uses a different directory, make sure you put the module there
2. Enter into admin and expand >Modules in the left frame.
3. Click on the link to "Add Module"
4. In the right frame, you'll see a text entry field with an "upload module" button next to it. If you ftped the BROK_SHAREIT.mv file to your server, enter the path to that file into the text field (usually modules/system/brok_shareit.mv). Click on the "add" button. If you did not ftp the file to the server, click on the 'upload' icon next to the text entry field. This will pop up a small window. Enter the path to the file on your local computer or click on the "browse" button to browse your hard drive to find it. After you have the path in the text entry field click on the "upload" key. When you're back to the right frame, click on the "Add" button. After a short delay, you should see a notification that the module was installed and you will see it at the bottom of the list of installed modules in the left frame.
5. The module is now installed into your "mall", but still needs to be installed into your store. Expand your store. Then Expand >System Extension Configuration. In the right frame, you will see the module listed near the top with a checkbox next to the name. Check that box, and click on "update".
6. The module is now installed into your store. You will see a new tab in the right frame, Share it with a Friend. Clicking on that tab takes you to the module's administration screen.
To return to the top, click here



Positions on the Product display page where you can display the button:

1
Product Name 2
3
Product Image 4
Quantity in Basket: none
Code: horse
Price: $12.00
Shipping Weight: 12.00 pounds
5
attr1
attr2
6
7 Quantity: 8
9
10
Product Description
11

To return to the top, click here
[mike@mikeworks.com]