Announcement

Collapse
No announcement yet.

passing information to tradedoubler?

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

    passing information to tradedoubler?

    Hi, we're currently trying to implement some tracking for tradedoubler but they want a lot of information that i cant seem to get actinic to report.

    The information they want is as follows:

    Product number
    product name
    product price
    quantity
    order number
    order value

    So far i can only find NETQUOTEVAR:THEORDERNUMBER and NETQUOTEVAR:ACTINICORDERTOTAL

    Ive read the affiliate section in the manual but it only mentions these 2 variables. is there any way i can pass all of this information on using javascript?

    Thanks

    #2
    Hi Christianos,

    Have you searched for 'TradeDoubler' on the community as yet? There are a few threads covering this.

    Kind regards,
    Bruce King
    SellerDeck

    Comment


      #3
      After going through the other suggested threads, ive got most of it working except ive come across a slight problem with the script which i have used.

      Original post by Printerbase
      Code:
      sub GetAffiliateData
      	{
      	my ($pCartList) = @_;
      	my $pCartObject = $::Session->GetCartObject($::TRUE);
      	my $sAffiliateData = "";
      	my @Response;
      	foreach my $pOrderDetail (@$pCartList)				# for each item in the cart
      		{
      		my %CurrentItem = %$pOrderDetail;				# get the next item
      		#
      		# Locate the section blob
      		#
      		@Response = ACTINIC::GetSectionBlobName($CurrentItem{SID}); # retrieve the blob name
      		if ($Response[0] != $::SUCCESS)
      			{
      			return (@Response);
      			}
      		my $sSectionBlobName = $Response[2];
      		#
      		# locate this product's object
      		#
      		@Response = ACTINIC::GetProduct($CurrentItem{"PRODUCT_REFERENCE"},  $sSectionBlobName, ACTINIC::GetPath());
      		if ($Response[0] != $::SUCCESS)
      			{
      			next;
      			}
      		my ($pProduct) = $Response[2];
      		my $nPrice;
      		#
      		# Get the product price 
      		#
      		my $nProductPrice;
      		my @aProductTax;
      		my ($nStatus, $sMessage);
      		my ($sTax1Band, $sTax2Band);
      
      #		($nStatus, $sMessage, $nProductPrice, 	$nPrice, $sTax1Band,	$sTax2Band,	@aProductTax) = 
      #			$pCartObject->GetCartItemPrice($pOrderDetail);
      #		if ($nStatus == $::FAILURE)				# general error
      #			{
      #			return ($nStatus, $sMessage);			# return error
      #			}	
      	
      		$sAffiliateData .= sprintf("%sf1=%s&f2=%s&f3=%d&f4=%1.2f",
      			$sAffiliateData eq "" ? "" : "|",
      			$CurrentItem{"PRODUCT_REFERENCE"},
      			$pProduct->{"NAME"},
      			$CurrentItem{"QUANTITY"},
      			$nProductPrice/100);
      		}
      	return ($::SUCCESS, '', $sAffiliateData);
      	}
      The problem we have is that 'f3' needs to be the 'product price' and 'f4' needs to be the quantity, we've tried swapping bits of the code around but either get script errors or the quantity doesnt register.

      having no experience with perl, we dont really know what we're doing, just trial and error, so if someone can point us in the right direction that would be much appreciated

      Comment

      Working...
      X