Jump to content

Digital Download Link


Guest peter7

Recommended Posts

Cubecart 5 – Question regarding digital download of orders: after payment approval, on the “Thank You Page†is there a link displayed for the instant download of the product purchased, or must the customer still wait to receive an email with the link for downloading the digital product purchased?

peter7

Link to comment
Share on other sites

Cubecart 5 – Question regarding digital download of orders: after payment approval, on the “Thank You Page†is there a link displayed for the instant download of the product purchased, or must the customer still wait to receive an email with the link for downloading the digital product purchased?

peter7

If I recall, no, there is no link on the Thank You page one gets after a successful transaction.

There is, however, a page available in the customer's Account pages that lists all pertinent download links and their status.

Thanks for the information. Is there a way to give the buyer a link for instant downloading (without the email) ?

peter7

Link to comment
Share on other sites

I haven't tried this (yet), so you may have to experiment to discover any consequences. This is for CC514 (you haven't mentioned the specific version you have), and should work in CC515 with no problems.

This adds a small image indicating a link to the download.

In the file /classes/cubecart.class.php, find the function _complete(). About 25 lines down, find:


$item['options'] = unserialize($item['product_options']);





Add these new line below it:



$accesskey = $GLOBALS['db']->select('CubeCart_downloads', 'accesskey', array('order_inv_id' => $item['id']));

if(!empty($accesskey)) $item['accesskey'] = $accesskey[0];





In the file /skins/YOUR_SKIN/templates/content.receipt.php, find:



<p>

<span class="price">{$item.price_total}</span>

<span class="price">{$item.quantity}</span>

<strong>{$item.name}</strong> {if isset($item.product_code) && !empty($item.product_code)} - {$item.product_code}{/if} ({$item.price})

</p>





Just above the closing </p> tag, add:



{if isset($item.accesskey)}<a href="{$STORE_URL}/index.php?_a=download&amp;accesskey={$item.accesskey}" title="{$LANG.common.download}"><img src="{$STORE_URL}/skins/{$SKIN_FOLDER}/images/common/file_download.png" alt="{$LANG.common.download}" /></a>{/if}

For this small edit, there is no check that the order is good and final. CubeCart's download functionality should make that determination.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...