Jump to content

Order details not providing download link for virtual items


Recommended Posts

When a customer places an order for downloadable content, they get the email with the direct download link just fine. However, if they try to go to their order history, the order detail page lists the products, but does not provide a link to download, even though the order number displays the link icon next to it, indicating the presence of downloadable items. This is happening to both paid and free download items. Any ideas?

 

 

Running:

Version 1.6.0.8

Payments: PayPal US Canada

Link to comment
Share on other sites

Screenshot attached. I've tested it with both "Payment Accepted" and "Delivered" statuses. As you can see in the pic, the order number actually indicates that it has download links in it, but the product (a free PDF download) has no download link available. There is only one product on this order.

post-812227-0-14403400-1407539906_thumb.jpg

Edited by TxRanger55 (see edit history)
Link to comment
Share on other sites

I had not touched the tpl file. Just to be sure, I ran a compare between the live copy and the original from the install package. While examining the code, I found where the link display is tied to there being an invoice PDF. I did not have invoices turned on. As soon as I went to the test order and forced it to generate an invoice, the download link started working. 

 

Seems like they should not be tied together. I'll have to play with the if/then statements to see if I can get around the invoice check. Until then, I'll just leave the invoices turned on.

 

Thanks for leading me to the problem :)

Link to comment
Share on other sites

hmm..  I suspect they do this to prevent users from downloading the file when the order is cancelled or refunded etc...

It seems like the lazy way to do it, really they should check that the order state is "valid", which is a bit more coding, but the correct way to do it.

 

 

This is the original if statement. 

{if $product.download_hash && $invoice && $product.display_filename != '' && $product.product_quantity_refunded == 0 && $product.product_quantity_return == 0}

You can change it to this to remove the invoice requirement.

{if $product.download_hash && $product.display_filename != '' && $product.product_quantity_refunded == 0 && $product.product_quantity_return == 0}
Link to comment
Share on other sites

×
×
  • Create New...