Miva HeLp! E-commerce for the rest of us.
E-commerce for the rest of us. 

one.gif (80 bytes)
Click Here for information on the East Coast Miva User Group meetings
one.gif (80 bytes)
one.gif (80 bytes)
Miva HeLp! HomeReady, Set, Go!TutorialsResourcesReviewsContact Us
one.gif (80 bytes)

Search Miva HeLp!

one.gif (80 bytes)
one.gif (80 bytes)

one.gif (80 bytes)

Quick Links

one.gif (80 bytes)

 

Step by Step Tutorial
Integrating ClixGalore Code into Miva Merchant
 By Ahmed Saad, Technology Matrix Group - Copyright 2001

Click here for pointers on integrating Commission Junction and other affiliate network codes.

We use and recommend ClixGalore.   We believe it is one of the best and most affordable third party affiliate networks and it has an excellent user interface.  Click here for disclosures.


Available options for integrating ClixGalore:

Version OUI MMUI
2.x   code below
3.x module code below
4.0 module code below
4.12, 4.13 module module or
code below
4.14 or higher module You CANNOT use the code below.

Before following the steps below, read "Modifying MMUI".  

Please Note:  We have wrapped the code in places to avoid excessive screen width.  Make sure there are no breaks in the ClixGalore code when you put it in.  It should be one long line!

Step 1

You will need to edit MMUI.mv file. To do this you will need to download it to your hard drive via FTP.   Read Editing Your MMUI.mv File and follow the steps to locate and download the correct file.

Step 2

Next you will need to modify the clixGalore code so that it can be inserted. We have replaced the area for your ID number with 777777 and you will need to replace it with your ID number. This is the code you will need to use:

<!--begin clixGalore code, copyright 2001 -->
<img src="https://www.clixgalore.com/AdvTransaction.aspx
?AdID=
777777
&SV=SALE_AMOUNT_HERE&OI
D=AN_ORDER_ID" height="0" width="0" border="0">
<!--end clixGalore code -->

Step 3

The next step is to edit the file.  We recommend that you use PFE (Programmer's File Editor) ... it is a great tool.  William Weiland gave us this tip when we first started and we really appreciate it.

For the free download Click here.

Step 4

Open the file using PFE and save a backup NOW! You may need it... In fact, if you're like us you WILL need it :-)

Step 5

Locate the Invoice function (this is where stuff related to the invoice screen goes).
  THIS IS WHERE ALL THE EDITING WILL TAKE PLACE.  It is located on about line 786 (of the mmui.mv code) in version 2.22  and line 1335 in version 3.  It will look like this:

<MvFUNCTION NAME = "UIModule_Invoice" STANDARDOUTPUTLEVEL = "text, html, compresswhitespace">

Once you have located it scroll down until you reach the line that ends the function; it will be a closing tag </MvFUNCTION> (it is around line 1491 in V2.22, and line 2074 in V3); a few lines above that there will be a closing table tag </table> and above that is <B><MvEVAL EXPR = "{ l.formattedprice }"></B>  You will need to insert your ClixGalore code directly under that line.  This is the code you will need to insert:

<MvEVAL EXPR="<img src='https://www.clixgalore.com/AdvTransaction.aspx?AdID=777777
&SV=&[l.formattedprice];&OID=&[Orders.d.id];' width='0' height='0' border='0'>">

Note how we included the code in an MvEVAL expression, and changed the double quotes around the ClixGalore code (") to single quotes (').

Remember to change 77777 to YOUR clixGalore ID.

Note:  This will show the Grand Total of the sale...i.e. it includes the tax and the shipping.  If you want your affiliate to be paid for the total sale only without shipping or tax then there are a few more steps you will need to do, if not go directly to Step 9.

To get the total amount less the shipping and tax continue with the following steps:

Step 6

You will need to insert a line of code after <MvEVAL EXPR = "{ l.formattedprice }"> (around line 1375 in V2.22 and line 1952 in V3).  This is the l.formattedprice that comes (10 lines) before the first occurrence of
<MvLOCALIZED-TEXT LANGUAGE = "en-US">Shipping: %description%:</MvLOCALIZED-TEXT> it is still within the "UIModule_Invoice"

Add this line:
<MvASSIGN NAME = "clix1" VALUE = "{ OrderCharges.d.disp_amt }">

Step 7

You will need to insert another two lines of code after <MvEVAL EXPR = "{ l.formattedprice }"> (around line 1431 and line 2011 in V3).  This is the l.formattedprice that comes (10 lines) before the first occurrence of <MvLOCALIZED-TEXT LANGUAGE = "en-US">Sales Tax:</MvLOCALIZED-TEXT> it is also STILL within the "UIModule_Invoice".

Add the following lines:

<MvASSIGN NAME = "clix2" VALUE = "{ OrderCharges.d.disp_amt }">
<MvASSIGN NAME = "clix3" VALUE = "{ clix2 + clix1 }">


Step 8

Now scroll down until you reach the line that ends the function; it should show </MvFUNCTION> (it is around line 1491 and line 2059 in V3).  A few lines above the end function tag there will be a closing table tag </table> and above that will be <B><MvEVAL EXPR = "{ l.formattedprice }"></B>

Insert the following three lines directly under the one shown above:

<MvASSIGN NAME = "clix4" VALUE = "{ Orders.d.total }">
<MvASSIGN NAME = "clix5" VALUE = "{ clix4 - clix3 }">
<MvEVAL EXPR="<img src='https://www.clixgalore.com/AdvTransaction.aspx?AdID=77777
&SV=&[clix5];&OID=&[Orders.d.id];' width='0' height='0' border='0'>">


Remember to change 77777 to YOUR clixGalore ID.

 
Step 9

Save, then FTP the file back to the same subdirectory and check that it works!

 

one.gif (80 bytes)

  If you have another affiliate code to integrate, its requirements are probably similar to the ClixGalore code requirements and will most definitely involve the order number and the sale total.  We have also added a tutorial for Commission Junction code integration. Special thanks to James Williams from Ora Sweet for working with us to integrate the code in his store, for giving us the CJ virgin code, and the exact line numbers in Merchant version 3 where he inserted the code.

The order_id is a unique name in the mmui.mv and is global in nature.  Referencing it anywhere will always call the order number for the transaction.  We found the sales amount to be a little trickier since each of the formatted prices we found were localized {l.formattedprice}.  The first referenced the shipping value, the second was for the tax value, and the third was for the Grand Total (there were others pointing to upsale products and attributes).  We were unable to find a called value for the total without the shipping and tax. 

Since the formatted prices were all localized, we had to insert the ClixGalore string at the point where the {l.formattedprice} of the Grand Total occurred.   We also had to assign non localized names to the Tax and Shipping {l.formattedprice} to be able to call them outside the localized function.   Again, note how we included the code in an MvEVAL expression, and changed the double quotes (") to single quotes (').  If you are replacing the ClixGalore code with another third party commission tracking code you will need to replace the double quotes with single quotes.

one.gif (80 bytes)

If you have a better way to implement this integration, or have successfully coded other affiliates and would like to share it with the fellow Miva Merchant users, please e-mail us at feedback@mivahelp.com.

 

Quick Tips

one.gif (80 bytes)

one.gif (80 bytes)

one.gif (80 bytes)
one.gif (80 bytes)


Fotolia
    

Miva Merchant, and the Miva blades logo are registered trademarks of
Miva Corporation.

Miva HeLp! is not affiliated with Miva Corporation.

 

 

Please e-mail site related issues to webmaster@MivaHelp.com and content corrections to content@MivaHelp.com

Copyright 2001- 2008 Technology Matrix Group Ltd.

Site Design by: A Design Elf Site