Post by Wallimann » Thu Mar 08, 2012 1:37 am

I'm experimenting a very frustrating problem and can't seem to figure out the cause...
I sell downloads only and some downloads in my customers account are duplicated or missing.

This issue only happens in the customer download page.
If I look at the customer's order, every downloadable product appears correctly.

Any help would be very appreciated!

Guitar Backing Tracks and Video Lessons at http://www.guitarplayback.com


New member

Posts

Joined
Fri Oct 29, 2010 1:38 am
Location - Colorado

Post by merry » Thu Mar 08, 2012 9:43 am

Wallimann wrote:I'm experimenting a very frustrating problem and can't seem to figure out the cause...
I sell downloads only and some downloads in my customers account are duplicated or missing.

This issue only happens in the customer download page.
If I look at the customer's order, every downloadable product appears correctly.

Any help would be very appreciated!
Wallimann, I too sell a lot of downloads and have a lot of experience with them. I just need some more information to be able to help... without knowing a thing, I'd have to guess the customers are having a caching issue with their browsers. This is not just an OpenCart downloads issue, anybody who deals with downloads will have to occasionally tell a customer how to clear their cache.

You might also try asking the customers who have problems what browser, OS etc. that they are on... try to see if there is a pattern. Again I doubt that this is an OpenCart issue.

Good Luck,
Merry

Most answers are from my OpenCart 1.5 User Manual CURRENT TO 1.5.5.1 and includes free updates.
FREE HELP! 60-page user guide with OpenCart Admin Menu Cheatsheet, Install Guide & 30 Minute QuickStart Guide: http://showmeguides.com/


User avatar
Active Member

Posts

Joined
Thu Dec 09, 2010 12:51 am
Location - Mexico and sometimes Texas

Post by Wallimann » Thu Mar 08, 2012 11:00 pm

Thanks for the quick response...
I don't think it's a cache issue as I logged in to some of the customers accounts to try myself and can verify the issue...

This seems to happen with items that have multiple downloads associated with them...
Here are a few strange things that are probably all related:

The order of appearance of the downloads for a same product change each time a customer logs out and back in..
The duplicate and missing downloads don't happen for all customers...

Very strange!

Guitar Backing Tracks and Video Lessons at http://www.guitarplayback.com


New member

Posts

Joined
Fri Oct 29, 2010 1:38 am
Location - Colorado

Post by alber99 » Tue Oct 13, 2015 8:38 am

Having same problem with OC 2.0.3. Has there been any solution to this?

New member

Posts

Joined
Sun Apr 08, 2012 9:14 am

Post by alber99 » Sat Oct 31, 2015 8:16 am

Hmmm not much feedback in the forum lately, so in the meantime I've discovered a very simple, partial solution.

Go into Admin > System > Settings > Option > Default Items Per Page (Catalog). Change the number to a high enough number that all downloads show on the same page.

What seems to be happening is, on each page load the downloads re-sort randomly and so the order keeps changing from page to page - making it seem like there are missing downloads. So if you force everything to load on the same page you'll see that they are all there. But each time you reload the page they will re-shuffle (sort) again, but as long as they are on the same page you'll find them all there. At least that's how it works on my site.

I've simply upped the number to 200 and it seems to load fine without slowdown. However this also effects the product thumbnail listings on the front end - but it does not seem to slow my page load.

Maybe someone else has a solution to the random resorting ?

New member

Posts

Joined
Sun Apr 08, 2012 9:14 am

Post by jkitz » Mon Jan 23, 2023 10:57 am

Having the same issue, many years later in 2.3
Customer with many downloads (45) are getting randomly resorted each time. Some repeat across the pages.

Alber99's solution doesn't appear to work, the only option here: Admin > System > Settings > Option > Default Items Per Page (Catalog) is for Admin items.

Newbie

Posts

Joined
Thu Sep 01, 2016 10:28 am
Location - Ottawa, Canada

Post by huntbee » Mon Nov 11, 2024 5:14 pm

Try Editing catalog/model/account/download.php

Find

Code: Select all

$query = $this->db->query("SELECT DISTINCT op.order_product_id, d.download_id, o.order_id, o.date_added, dd.name, d.filename FROM `" . DB_PREFIX . "order` o LEFT JOIN " . DB_PREFIX . "order_product op ON (o.order_id = op.order_id) LEFT JOIN " . DB_PREFIX . "product_to_download p2d ON (op.product_id = p2d.product_id) LEFT JOIN " . DB_PREFIX . "download d ON (p2d.download_id = d.download_id) LEFT JOIN " . DB_PREFIX . "download_description dd ON (d.download_id = dd.download_id) WHERE o.customer_id = '" . (int)$this->customer->getId() . "' AND dd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND (" . implode(" OR ", $implode) . ") ORDER BY o.date_added DESC LIMIT " . (int)$start . "," . (int)$limit);
Remove DISTINCT and update the code like this

Code: Select all

$query = $this->db->query("SELECT op.order_product_id, d.download_id, o.order_id, o.date_added, dd.name, d.filename FROM `" . DB_PREFIX . "order` o LEFT JOIN " . DB_PREFIX . "order_product op ON (o.order_id = op.order_id) LEFT JOIN " . DB_PREFIX . "product_to_download p2d ON (op.product_id = p2d.product_id) LEFT JOIN " . DB_PREFIX . "download d ON (p2d.download_id = d.download_id) LEFT JOIN " . DB_PREFIX . "download_description dd ON (d.download_id = dd.download_id) WHERE o.customer_id = '" . (int)$this->customer->getId() . "' AND dd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND (" . implode(" OR ", $implode) . ") ORDER BY o.date_added DESC LIMIT " . (int)$start . "," . (int)$limit);
Hope this helps.

HuntBee OpenCart Services
https://www.huntbee.com


User avatar
New member

Posts

Joined
Sun Nov 01, 2015 4:01 am
Location - India

Post by khnaz35 » Mon Nov 11, 2024 6:54 pm

huntbee wrote:
Mon Nov 11, 2024 5:14 pm
Hope this helps.
@Priya didn't you pickup little too late on this XD

Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by huntbee » Mon Nov 11, 2024 11:11 pm

Today, I learned about this issue from one of my clients. While checking if others have encountered the same problem, I came across this thread.
khnaz35 wrote:
Mon Nov 11, 2024 6:54 pm
huntbee wrote:
Mon Nov 11, 2024 5:14 pm
Hope this helps.
@Priya didn't you pickup little too late on this XD

HuntBee OpenCart Services
https://www.huntbee.com


User avatar
New member

Posts

Joined
Sun Nov 01, 2015 4:01 am
Location - India

Post by paulfeakins » Tue Nov 12, 2024 8:38 pm

huntbee wrote:
Mon Nov 11, 2024 11:11 pm
Today, I learned about this issue from one of my clients. While checking if others have encountered the same problem, I came across this thread.
Nice, so this seems to be a real bug in 2.0.3.0? And the code here fixes it?

If so, shall we mark it [SOLVED]?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by huntbee » Tue Nov 12, 2024 10:13 pm

This bug is continued in newer opencart versions (3.0.4.0) as well. With this code update, the issue with download duplication in the paginations seems to have been fixed (tested for orders with one product and multiple downloads assigned to the product). I have not thoroughly tested it for other scenarios like when an order contains multiple products with multiple downloads.
paulfeakins wrote:
Tue Nov 12, 2024 8:38 pm
huntbee wrote:
Mon Nov 11, 2024 11:11 pm
Today, I learned about this issue from one of my clients. While checking if others have encountered the same problem, I came across this thread.
Nice, so this seems to be a real bug in 2.0.3.0? And the code here fixes it?

If so, shall we mark it [SOLVED]?

HuntBee OpenCart Services
https://www.huntbee.com


User avatar
New member

Posts

Joined
Sun Nov 01, 2015 4:01 am
Location - India

Post by paulfeakins » Wed Nov 13, 2024 11:30 pm

huntbee wrote:
Tue Nov 12, 2024 10:13 pm
This bug is continued in newer opencart versions (3.0.4.0) as well.
Is there a github issue for it?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 80 guests