Announcement

Collapse
No announcement yet.

Passing products ordered to TradeDoubler script

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

    #16
    Did anyone ever figure out how to implement the tradedoubler tracking system?

    ive read through all the posts i can find but it is baffling us. We have been given some javascript which we dont know what to do with and i see that someone has posted a V.7 OrderScript.pl file.

    We currently still use version 7 but we have no idea what to do with it. anyone have step by step instructions for the implementation process?

    Here is the javascript we have been given

    Code:
    <script language="javascript" type="text/javascript">
    
    <!-- Begin TradeDoubler tag-->
    
    var  product_number = "";  //product reference
    
    var  product_name = ""; // product name
    
    var  price = ""; //product price
    
    var  quantity = ""; // quantity
    
    var reportInfo = "";
    
    reportInfo = "f1="+product_number+"f2="+product_name+"f3="+price+"f4="+quantity;
    
    reportInfo = escape(reportInfo);
    
    var orderNr = ""; 
    
    var orderValue = "";
    
    var uri  = "http://tbs.tradedoubler.com/report?organization=10xxx34&event=6xxx6&orderValue="+ orderValue +"curency=GBP&orderNumber="+ orderNr +"&reportInfo="+ reportInfo;  
    
     
    
    document.write("<img src=\""+uri+"\" height=\"1\" width=\"1\" border=\"0\">"); 
    
    <!-- End TradeDoubler tag-->
    
    </script>

    Comment


      #17
      Product recommendations

      Bruce,

      I need to pick up the product code and quantity of all products bought from the receipt page. I have the javascript to do this but understand the Act_Order04.html file does not include these variables.

      Does the OrderScript.pl file you posted do this for v.7? ie can i overwrite my existing orderscript.pl file for v.7 and include the javascript in Act_Order04.html?

      Thanks

      Comment


        #18
        Paul,

        I am sure there are tw links up there, the first is surely for v7. If not let me know and I will check it for you.

        Kind regards,
        Bruce King
        SellerDeck

        Comment


          #19
          Bruce,

          How do i know whether your file is for v7? The filename does not say and nor is there anything (i can see) in the file to denote it is for v7.

          Can you confirm the file will only add variables to the confirmation page and will not amend or delete any other variables needed for the correct operation of the checkout process.

          Thanks,
          Paul.

          Comment


            #20
            Hi Paul,

            My apologies as this one seems to have slipped by. Check this link please...http://community.actinic.com/showpos...75&postcount=4 it clearly says it is for v7
            Bruce King
            SellerDeck

            Comment


              #21
              Many thanks, Bruce.

              I have loaded your file orderscript.pl with success. It returns the data as expected and as you describe earlier in this thread.

              However, i need to return data to incorporate into product ratings/reviews rather than pass to an affiliate scheme. The data to be collected from each order is:

              "product code1,quantity1;product code2, quantity2;...."

              as opposed to:

              "f1=ProdNR01&f2=ProdName1&f3=100.00|f1=ProdNR02&f2=ProdName2&f3=1000.00"

              I think this requires changing the code excerpt below taken from orderscript.pl but I do not know how. Can you tell me the correct code to achieve my aim and is there any other code in orderscript.pl to be amended?

              $sAffiliateData .= sprintf("%s&f1=%s&f2=%s&f3=%1.2f",
              $sAffiliateData eq "" ? "" : "|",
              $CurrentItem{"PRODUCT_REFERENCE"},
              $pProduct->{"NAME"},
              $nProductPrice/100);
              }

              Secondly I do not want the product reference but a customvar i have, "CUSTOMVAR:PRODRECID" created at each product section page level. I have tried just replacing the "PRODUCT_REFERENCE" with "PRODRECID" but this does not work returning just the quote marks, "". I know the customvar works as i have viewed it (view source) on the live product page.

              For anyone else interested in product reviews/ratings i am working with http://www.productrecommendations.co.uk.

              Thanks

              Comment


                #22
                Paul,

                Take a look on http://community.actinic.com/showthread.php?t=28470 for how to add in your CUSTOM property. You will have to tinker with it to pass across exactly what you require.

                Kind regards,
                Bruce King
                SellerDeck

                Comment


                  #23
                  hi, thanks for the reply. The post you have referred me to is for v8. will this work for v7?

                  Comment


                    #24
                    Yes, it will.

                    Regards,
                    Bruce King
                    SellerDeck

                    Comment


                      #25
                      Bruce,

                      finding existing posts on the same subject i can manage, its the 'tinkering with' i need the help with!

                      how do i pass the quantity to my existing javascript in act_order04? is this possible with netquotevar:quantity (i dont think so) or do i need to create a netquotevar in orderscript.pl ?

                      i now have this code in orderscript.pl:
                      $sAffiliateData .= sprintf("%s,f1=%s,f2=%1.2f",
                      $sAffiliateData eq "" ? "" : ";",
                      $CurrentItem{"PRODRECID"},
                      $pProduct->{"QUANTITY"};
                      }

                      and i am trying to produce:
                      'prodrecid1,quantity1;prodrecid2,quantity2;....'

                      problem is i dont know what the "1.2f" on the end of the code above does. i also dont know how to get a customvar: prodrecid into the orderscript.pl and then into the javascript?

                      perhaps you can guide me to understanding the code in the orderscript.pl to include other variables?

                      thanks

                      Comment


                        #26
                        Try this

                        $sAffiliateData .= sprintf("%s&f1=%s&f2=%s",
                        $sAffiliateData eq "" ? "" : "|",
                        $$pProduct{CUSTOMVARS}{PRODRECID},
                        $CurrentItem{"QUANTITY"});
                        }

                        Let me know how you get along.

                        Kind regards,
                        Bruce King
                        SellerDeck

                        Comment


                          #27
                          thanks for the reply.

                          after incorporating your code excerpt from the output on the receipt page is:
                          var Products ='&f1=&f2=1';

                          are you able to suggest a correction?

                          Comment


                            #28
                            Try this please ....

                            {
                            $sAffiliateData .= sprintf("%s&f1=%s&f2=%s&f3=%s",
                            $sAffiliateData eq "" ? "" : "|",
                            $CurrentItem{"PRODUCT_REFERENCE"},
                            $$pProduct{CUSTOMVARS}{PRODRECID},
                            $CurrentItem{"QUANTITY"});
                            }

                            if this does not work I would suggest asking the opinion of one of the perl experts on the forum here.

                            Kind regards,
                            Bruce King
                            SellerDeck

                            Comment


                              #29
                              i dont think you meant the initial bracket as it caused an internal server error, the code should have been:

                              $sAffiliateData .= sprintf("%s&f1=%s&f2=%s&f3=%s",
                              $sAffiliateData eq "" ? "" : "|",
                              $CurrentItem{"PRODUCT_REFERENCE"},
                              $$pProduct{CUSTOMVARS}{PRODRECID},
                              $CurrentItem{"QUANTITY"});
                              }

                              the result was:
                              var Products ='&f1=3365440096660&f2=&f3=1|&f1=12345-1&f2=&f3=2';

                              3365440096660 is the correct product code for product 1
                              12345-1 is the correct product code for product 2
                              quantity of 1 is correct for both
                              f2= is blank so it is not picking up the custom var prodrecid

                              is the line
                              $$pProduct{CUSTOMVARS}{PRODRECID},
                              referencing the product template customvar specifically? i ask as i have the customvar in the section page in which the product is contained rather than the product itself. would the following make sense?
                              $$pSection{CUSTOMVARS}{PRODRECID},

                              Comment


                                #30
                                ive just noticed that the quantity for product 2 is incorrect as it shows 2 rather than 1.

                                Comment

                                Working...
                                X