Announcement

Collapse
No announcement yet.

My guide to customising digital downloads

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

    My guide to customising digital downloads

    Updated 19-12-2012:
    6. Slightly better Digital Download Folder Index Page.
    7. How to handle large file uploads.

    Updated 31-10-2012:
    4. How to display the link based on payment method.

    Hi All,

    1. Taking online and Offline digital download orders.
    For digital downloads it is critical that each download file associated with a product be given a unique name. May seem obvious, but let me explain...

    One of our products is an AIR file that can run on both Mac and Windows so we could simply link to this file in the visible product and be done with it. However, for layout consistancy, we wanted to stick with offering the client the Windows and Mac options. For online ordering, linking to the same file on both options worked great but for offline ordering, we kept getting the following error, "One of your digital download files hasn't been uploaded yet. Please upload your site first. You can resend the download location later." Well... the site was uploaded and working for online orders. Using the resend download link email did not send the link. So where was the problem, 2 days later... renamed one of the download files as xxx_mac.air. Uploaded and hey presto, offline ordering now works exactly the same as online ordering.

    2. How to setup product options for each version of your DD product.
    This info can be useful for stores offering download products in various formats where it is impratical to present the customer with an individual product for each file type. For example image files in jpg, png and tiff or audio files in mp3, 3ga and wav or even video files in mpeg, wmv and avi.

    Creating options is covered in great detail elsewhere but for the sake of completeness, I mention it here.
    Create a visible product and hidden products for each product version. The hidden products are excluded from the site map, product feeds, etc. Now add the link to the respective download files in each hidden product.
    On each visible product create a component and then inside this an attribute.
    Inside the attribute, add a choice for each of your product versions.
    Back at the component under permutations, link each choice to the respective hidden product.
    Still on the component, you can change the permutation layout to radio button list.
    You can also set your pricing overrides, etc. as you require.
    Clients are now presented with the link based on the option they select.

    3. How to limit the payment types used for DDs (eg. accept Credit Card payments only)
    You will need to edit your perl scripts as per http://community.sellerdeck.com/show...91&postcount=1

    4. How to display the download link on the receipt page and customer email based on payment type
    With these script changes you are, in effect, controlling when to autoship DDs and when not to. The changes will not affect the generation of the DD link in anyway, they simply control the displaying of the links. For example, you accept card as well as deferred payments for DDs. You want to display the link for successful card/psp payments but not for any other payment type. For deferred payments, you can send the link by simply sending the resend link email once you have received the payment.

    These changes are only useful if you autoship your DDs.

    This uses the Payment Method ID's as they appear in the PaymentMethods table inside the DB. 10005 = Credit Card, 900 = Pay Pal, etc. Example, to display the link to both credit card and pay pal clients you would use if (($sPMeth eq "10005") || ($sPMeth eq "900"))

    Edit OrderScript.pl
    search for "if (@aDownloadLinks > 0)"

    Replace the following code:
    Code:
    if (@aDownloadLinks > 0)
    	{
    		$ACTINIC::B2B->AppendXML('CART', "\r\n" . ACTINIC::GetPhrase(-1, 2250, $$::g_pSetupBlob{'DD_EXPIRY_TIME'}));
    		my $sLine;
    		foreach $sLine (@aDownloadLinks)
    			{
    			$ACTINIC::B2B->AppendXML('CART', "\r\n\r\n" . $sLine);
    			}
    	}
    With this code:
    Code:
    if (@aDownloadLinks > 0)
    	{
    		my $sPMeth = $::g_PaymentInfo{'METHOD'};
    		if ($sPMeth eq "10005")
    		{
    			$ACTINIC::B2B->AppendXML('CART', "\r\n" . ACTINIC::GetPhrase(-1, 2250, $$::g_pSetupBlob{'DD_EXPIRY_TIME'}));
    			my $sLine;
    			foreach $sLine (@aDownloadLinks)
    			{
    				$ACTINIC::B2B->AppendXML('CART', "\r\n\r\n" . $sLine);
    			}
    		}
    	}
    Edit ActinicOrder.pm
    search for "if ($hDDLinks{$hLineData{'REFERENCE'}} ne "")"

    Replace the following code:
    Code:
    if ($::ReceiptPhase &&								# and this is the receipt
    				 $bShowDDLinks)									# and links are allowed
    				{														# then add link
    				my $nPrompt = $bPlain ? 2251 : 2252;
    				$hLineData{'DDLINK'} = ACTINIC::GetPhrase(-1, $nPrompt, $hDDLinks{$hLineData{'REFERENCE'}}[0]);
    				}
    With this code:
    Code:
    if ($::ReceiptPhase &&								# and this is the receipt
    				 $bShowDDLinks)									# and links are allowed
    				{														# then add link
    					my $sPMeth = $::g_PaymentInfo{'METHOD'};
    					if ($sPMeth eq "10005")
    					{			
    						my $nPrompt = $bPlain ? 2251 : 2252;
    						$hLineData{'DDLINK'} = ACTINIC::GetPhrase(-1, $nPrompt, $hDDLinks{$hLineData {'REFERENCE'}}[0]);
    					}
    				}
    Then search for "if ($hDDLinks{$Component{code}} ne "")"

    Replace the following code:
    Code:
    if ($::ReceiptPhase &&							# and this is the receipt
    						 $bShowDDLinks)								# and links are allowed
    						{													# then add link
    						my $nPrompt = $bPlain ? 2251 : 2252;
    						$hComponentItem{'DDLINK'} = ACTINIC::GetPhrase(-1, $nPrompt, $hDDLinks{$Component{code}}[0]);
    						}
    With this code:
    Code:
    if ($::ReceiptPhase &&							# and this is the receipt
    						 $bShowDDLinks)								# and links are allowed
    						{
    						my $sPMeth = $::g_PaymentInfo{'METHOD'};
    						if ($sPMeth eq "10005")
    							{			
    							my $nPrompt = $bPlain ? 2251 : 2252;
    							$hComponentItem{'DDLINK'} = ACTINIC::GetPhrase(-1, $nPrompt, $hDDLinks{$Component{code}}[0]);
    							}
    						}
    5. Allowing customers to order more than 1 digital download item.
    This also requires a script change as per http://community.sellerdeck.com/show...47&postcount=1

    6. Slightly better Digital Download Folder Index Page.
    The current solution is an index page inside your dd folder that displays a message stating something or other. My solution is to rather redirect users to my index page. To do this... In the design tab, select the "Digital Download Folder Index Page". Click on the layout code tab (at the bottom) and replace the html with the following. Obviously, change "www.yoururl.com" to your url. This will immediately redirect users to the url you specify.
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>Redirect</title>
    <meta http-equiv="REFRESH" content="0;url=http://www.yoururl.com/index.html"></HEAD>
    <BODY>
    </BODY>
    </HTML>
    7. Uploading large files.
    If you have tried uploading large files using the publish process, you will know that you can expect a long wait and a few time outs. However, most FTP clients do not time out so... The solution that worked for me was to create "dummy" 0kb files, upload using SellerDeck and then overwrite using an FTP client.

    Start by creating 0kb files using the correct file names. For DD's, select the 0kb file as the DD product. Upload as per normal, this should now go very quickly. In the case of DD's, Sellerdeck renames the files during the upload so you will need to rename your true files to match the new names. Then upload and overwrite using an FTP client.

    8. Sending a unique license key with a digital download.
    Current solution... Software runs on 5 day trial mode... key is manually emailed.

    Thoughts on license keys:
    1. Using the existing coupon system?

    This will only work if you are not already tied into a key generation system.
    Generate a list of single use coupons with no discounts or other benefits. Use this list to populate your product key DB. You would then include the key (first coupon code that is marked as unused in the table) inside the receipt and resend link emails. This might need a custom variable linked to the coupon code if one doesn't already exist, but there are a few hints in the KB on how to possibly get this done. Once a key has been sent (used) it is marked as used. Then the user follows the normal software activation process.

    Questions:
    How secure is this?
    Does the algorithm used to generate the coupon codes guarantee unique codes?

    Pros:
    Can still use the coupon system for discounts, both single use and normal.

    2. Create a new seperate DB and custom variables to use this DB.
    Create a DB with the license keys and fields for "used", "first name", "last name", "order number", "date" and any other info you require.
    Create custom variables for reading and writing to the DB.
    Add the variable containing the first unused license key to the relevant emails.
    Populate the other DB fields using existing sellerdeck variables.

    Questions:
    Will this work for both online and offline ordering?

    Pros:
    Keys are generated outside of sellerdeck.
    Possibly more secure.
    "Opportunities multiply as they are seized." - Sun Tzu

    #2
    Added point 4 to the original post

    Figured out a way to only display the DD Link in the receipt and customer emails if the customer successfully completes the transaction using a credit card or psp method.

    The link is still generated for deferred payment options, like cheque etc. but it is not displayed to the client. Once you have received the payment you can send the link by sending the resend link email from within sellerdeck.

    My testing so far shows that this does not break the cart or hamper online or offline orders.
    "Opportunities multiply as they are seized." - Sun Tzu

    Comment

    Working...
    X