Download Space does not list available downloads

  • Posts: 5
  • Thank you received: 0
10 years 3 months ago #167467

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.4.x
-- Browser(s) name and version -- : All

I have my shop setup using the Essential version of HikaShop. I am using Hika to sell digital goods only so I need the download space to work properly.

Right now when a customer purchases a downloadable good they are sent the confirmation email and can download the item using the link in the email. However, when they visit the 'Download Space' on the site they are shown no available downloads. I have tried purchasing the file using a coupon code to receive 100% off and tried creating the order then setting it to confirmed in the admin. I have also tried purchasing using the paypal sandbox and even though it says everything went fine and I get my confirmation emails, I still have nothing listed in the Download Space.

I have read in other places that if it is a "free" download it may not show up in the download area but this does not make sense because people should be able to see any download they have signed up to receive and ordered.

Please let me know what I can do.

Thanks in advance! Loving HikaShop so far

Attachments:
Last edit: 10 years 3 months ago by blindmoe.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 3 months ago #167480

Hi,

So, to summarize, you want to display the "free downloads" in the "download" section ?

Yes the download section just display the no-free files for the products that the user bought.
The no-free files can be just download during a specific period after the purchase.
We do not display the free files because they are available directly in the product page in the front-end ; because you do not need to buy the product to download the file, everybody should be able to download it, even if they don't buy it.
So it means that the download section would list every free files available in your store. Which could be awkward if you have a lot of free files (it will be difficult to find the no-free files).

Hope it make sense.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
10 years 3 months ago #167503

Although I would like to also display downloads that may be free ( either because they are free always or because a user used a coupon ) I am also not seeing downloads that the user paid for. Basically right now no matter how a user obtained the download, free or paid, nothing shows up in the download space.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 3 months ago #167509

Hi,

That's not possible. Paid for downloads will display there.
If you don't see anything there, it means that your current user didn't purchase any product with a file download.
Remember that a download will only be available to the user once his order status is set to "confirmed", after the payment notification is received from your payment gateway. So the most likely cause here is that your user's order's status is still "created" because HikaShop didn't receive any payment notification from the payment gateway.
Make sure tha the order status is changed to confirmed and you should then see the downloads there.

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
10 years 3 months ago #167629

As I said in the previous two posts the download space does not show all purchased downloads as well. I guess I will have to debug the issue myself and modify the component to make it work the way I expect it to.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 3 months ago #167631

Hi,

Nicolas message was taking in consideration that the paid downloads are not displayed ; and he recommend you to check that the order are rights.
Like showing the order in the backend and seeing that you don't have a message like "Your order status does not permit downloads" in the order product list.

We understand that the download list is empty ; but if you can provide us more screenshot, about the order detail, etc ; it will help us to understand.
Like having some access to your website (a url, something to help !)

Please understand that we don't have any detail and we try to reproduce your problem in our side ; but it is working fine.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
10 years 3 months ago #167963

So I just did another test by setting a product to $1 and having a friend purchase it. The paypal part went through fine but when I logged in with their account there were no downloads available to them. The status of the order was set to 'none' somehow so I double checked the settings in the paypal configuration and verified that the 'Verified Status' option was set to 'Confirmed'. I think manually set his order to 'Confirmed' but still nothing shows up in the download space for his account. However, when I view his orders from his account on the front end I am presented with the order as confirmed and when I view the order I see the link to download the file. Is there a place I can send some login information to you guys so you may test it out?

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
10 years 3 months ago #168004

So I think I see where the problem is. After breaking down the query that is run to grab downloadable files to this:

SELECT o.order_id,
       o.order_created,
       o.order_user_id,
       f.*,
       p.*,
       Min(o.order_created)                           AS min_order_created,
       Max(o.order_created)                           AS max_order_created,
       Sum(p.order_product_quantity)                  AS file_quantity,
       IF(REPLACE(LEFT(f.file_path, 1), '#', '@') = '@',
       Concat(f.file_id, '@', o.order_id), f.file_id) AS uniq_id
FROM   chjvm_hikashop_order AS o
       INNER JOIN chjvm_hikashop_order_product AS p
               ON p.order_id = o.order_id
       INNER JOIN chjvm_hikashop_file AS f
               ON p.product_id = f.file_ref_id
WHERE  o.order_type = 'sale'
   AND o.order_status IN ( 'shipped', 'confirmed' )
   AND f.file_ref_id > 0
   AND f.file_type = 'file'
   AND o.order_user_id = 5
GROUP  BY uniq_id
ORDER  BY max_order_created DESC

I was able to see that the problem is that my p.product.id is the ID of a variant of a product while the f.file_ref_id points to the main product and not the variant. Because of this the INNER JOIN returns nothing since the IDs do not match.

Adding the files to the different variants individually fixes the problem but brings up a new one. If I have a product with 3 variants and I upload a file for each variant and a user purchases one, they see three different download links for the same variant. This is due to a bad join and should be addressed.

Just a heads up, this also fixes the issue of a product not showing up when using a 100% off coupon. Because the order is still created and the file is not set as 'free' there was no reason for it to not show up in the download list before.

Last edit: 10 years 3 months ago by blindmoe. Reason: More Info

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 3 months ago #168075

Ah yes, that's a good point. The files of main products of variants are not handled in the downloads listing.
Replace the file components/com_hikashop/views/user/tmpl/view.html.php with the one in the archive enclosed and that should avoid the problem.

File Attachment:

File Name: view_html_...8-20.zip
File Size:5 KB

Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum