Post by elogpete » Sat Aug 20, 2011 10:08 pm

I have a puzzle with downloads. I'm using OpenCart 1.4.9. In Settings, there's a field headed "Set the order status the customers order must reach before they are allowed to access their downloadable products." I have always set this to Pending, and have set the default order status to Pending as well. This usually works fine.

My problem is that in certain circumstances (I won't bore you with the details) my downloads are free. It appears to me that for these orders, the order status immediately sets itself to "Complete" as soon as the customer has placed it, which obviously is not Pending. So in these circumstances the customer never sees the product listed under their downloads, and can't download it.

I originally thought that if you set the threshold for making downloads available as Pending, they would be visible at that stage OR LATER (e.g. Complete). Yet it appears that when you set the threshold to Pending or whatever, related items such as download visibility apply to that stage and nothing else. Have I got this right, and if not what am I getting wrong?

If it really is true that each order stage is exclusive of all others (I feel I'm wrong, but I'm just anticipating the worst!), can someone point me at the module where I could possibly write a php conditional that would effectively state "Show downloads if order state is Pending OR Complete"? Or if there's another solution, all suggestions welcome!

Many thanks

Newbie

Posts

Joined
Sun Oct 31, 2010 7:13 pm

Post by fido-x » Sat Aug 20, 2011 10:19 pm

Set the order status the customers order must reach before they are allowed to access their downloadable products to "Complete".

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by elogpete » Sun Aug 21, 2011 12:17 am

Thanks for the swift suggestion, fido-x. I did consider setting the download threshold to Complete instead of Pending. But the issue then - unless I'm misunderstanding how the system works - is that this would cause problems for people who have paid for a downlodable product.

At the moment, when people pay for downloads their order status defaults to Pending, and they can immediately access their downloads, which is how I want it to work. I know this means they can get the downloads even if their payment subsequently fails, but with PayPal it's unlikely, and anyway I don't really mind. If I set the threshold to Complete, they won't be able access the downloads until the store owner manually changes the status from Pending to Complete, which might not even be the same day.

I realise I could change the system settings so that ALL orders default to Complete, and then I suppose everything would work as I want. But then there would be no "Pending" flag in the admin section to alert the store owner that things need to be done to certain orders. Everything would be shown as Complete from the word go.

Maybe I'm simply asking too much! But I just thought it would fit my situation best if downloads could be available EITHER on Pending orders OR on complete ones. Any further thoughts?

Newbie

Posts

Joined
Sun Oct 31, 2010 7:13 pm

Post by Qphoria » Sun Aug 21, 2011 1:35 am

I tend to agree that the system is deficient. But the best solution isn't easily configured.

The way it is now, if you sell downloads AND tangible goods on the same site, it is confusing.
Typically for a downloads only site you would set the downoad status "Completed" and the order status in the payment module to "Completed"

But if some items are downloaded and some are shipped, you would want the downloaded items to be "Completed" and the shipped items to "Processing" or some non-final status.

Now you could set the download status = processing and the order status for each payment modules = processing, but then if you were to manually change that order status to complete, it would break the download. Or if you left the status processing, your sales reporting would be messed up because you'd have to search for orders in processing, which isn't really a final state, as well as completed for those that are shipped and have a final state.

So we have a few changes need.

Solution 1: Change the "Download Status" in the system settings area to a multiselect so that downloads can be enabled for multiple states. Then the download can be enabled for both Processing and Complete states. But this is an interim solution as it doesn't finalize orders...

Solution 2: Add a "confirmed order status" selector to each product so that when the payment is processed, it automatically updates the order based on its order status type... but this requires major changes to the way payment extensions are coded.

Solution 3: This is potentially the best, but would have to wait for a major change like OpenCart 2.0.. Based on this thread: http://forum.opencart.com/viewtopic.php?t=28787#p142134
Order status triggering shouldn't be controlled by each payment option anyway. It should be controlled by the extension page. Perhaps in the "list" area. There you should be able to select the status for each payment and an additional column for "download order status" for products that have downloads attached to them. This would actually remove the need for Solution 2... unless we changed the design so that instead of setting the status from the payment.. the payment instead triggers "isPaid()" and then the status set in the product will be set.

But Solution 1 is the only doable one at this current version as the change doesn't break the extension API

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by elogpete » Sun Aug 21, 2011 3:11 am

Hi Qphoria

Wow! Lots of information there. It's gratifying to know that I've tapped into something, and I'm not just imagining the problem. Thanks for responding so fully.

I guess your comments are mainly "thinking aloud" about how the system should be developed in future. Hopefully one of your suggestions will be taken up (they all seem to make sense). It really would be nice to be able to nail this issue. For the present, though, it sounds as though I may have to compromise, and just pick a consistent default order status for all order types - one that will endure long enough for everyone who is entitled to a download to get hold of it. And I suppose it will have to be Complete.

I thought naively that there might be some location where a bit of basic php coding would allow for downloads to be displayed against more than one status option. But a little learning can be a dangerous thing!

Newbie

Posts

Joined
Sun Oct 31, 2010 7:13 pm

Post by TraderDan » Wed Feb 01, 2012 3:57 pm

Qphoria wrote:Solution 1: Change the "Download Status" in the system settings area to a multiselect so that downloads can be enabled for multiple states. Then the download can be enabled for both Processing and Complete states. But this is an interim solution as it doesn't finalize orders...
Can someone please elaborate on this interim solution? I was able to change the "Download Status" to a multiselect easily enough, but when I try to save a total of 3 statuses that I want downloads to be enabled for, the only status that actually gets saved is the last one selected. What else do I need to do in order to get the multiple selections to actually save properly? I am using v1.5.1.3.

I am on the brink of launching my new store, which sells both physical and digital side-by-side, and this download / order status hang-up is proving to be a nasty little thorn in my side. Thanks in advance.

Image


User avatar
New member

Posts

Joined
Thu Oct 27, 2011 10:44 pm
Location - Lawrence, MA
Who is online

Users browsing this forum: No registered users and 113 guests