Post by zennet » Thu Jan 12, 2012 12:51 am

Hello!

I would like some help about downloadable products .

I would like people to be able to download right away their products even Order is set as "Pending" , how do i go about it? i found some solutions already but it appears to be for older opencart versions. i am on 1.5.1.3

Thanks!

Max

Newbie

Posts

Joined
Thu Jan 12, 2012 12:49 am

Post by OpenCart Addons » Thu Jan 12, 2012 3:07 am

Go to your shop settings (System / Settings) and under the Option tab change "Complete Order Status" to Pending.

Canada's Leading Expert In OpenCart Development & Certified OpenCart Development Partner Image


User avatar
Active Member

Posts

Joined
Thu Nov 24, 2011 10:51 am
Location - Canada

Post by zennet » Fri Jan 13, 2012 3:24 am

Thanks !!

Newbie

Posts

Joined
Thu Jan 12, 2012 12:49 am

Post by OpenCart Addons » Fri Jan 13, 2012 5:47 am

Hey,

I just looked through the model for downloads and it looks like this might stop customers who have had their order status updated from Pending to Completed, unable to download their products.

To fix this, edit file catalog / model / account / download.php
Find:

Code: Select all

$query = $this->db->query("SELECT o.order_id, o.date_added, od.order_download_id, od.name, od.filename, od.remaining FROM " . DB_PREFIX . "order_download od LEFT JOIN `" . DB_PREFIX . "order` o ON (od.order_id = o.order_id) WHERE o.customer_id = '" . (int)$this->customer->getId() . "' AND o.order_status_id > '0' AND o.order_status_id = '" . (int)$this->config->get('config_complete_status_id') . "' ORDER BY o.date_added DESC LIMIT " . (int)$start . "," . (int)$limit);
Replace With:

Code: Select all

$query = $this->db->query("SELECT o.order_id, o.date_added, od.order_download_id, od.name, od.filename, od.remaining FROM " . DB_PREFIX . "order_download od LEFT JOIN `" . DB_PREFIX . "order` o ON (od.order_id = o.order_id) WHERE o.customer_id = '" . (int)$this->customer->getId() . "' AND o.order_status_id > '0' AND (o.order_status_id = '" . (int)$this->config->get('config_complete_status_id') . "' OR o.order_status_id = '" . (int)$this->config->get('config_order_status_id') . "') ORDER BY o.date_added DESC LIMIT " . (int)$start . "," . (int)$limit);
Now set your complete order status back to "Complete", and now the customer can download their products if either their order status matches the complete order status, or if their order status matches the default order status.

Cheers,
Joel.

Canada's Leading Expert In OpenCart Development & Certified OpenCart Development Partner Image


User avatar
Active Member

Posts

Joined
Thu Nov 24, 2011 10:51 am
Location - Canada

Post by Larry1967 » Sun Jan 05, 2014 12:41 pm

OpenCart Addons wrote:Go to your shop settings (System / Settings) and under the Option tab change "Complete Order Status" to Pending.

I have....ADMIN/ SYSTEM/SETTINGS /OPTION/(CHECKOUT) settings set as follows:

I have "order status" set to "complete", and "Complete order Status" set to "pending", but customer cannot download file. When they click on link in email, they see this (below):

Date Added Status Comment
04/01/2014 Pending

Why is this happening? seems to be be something simple. The downloads are FREE so why such an issue?

Newbie

Posts

Joined
Sat Jan 04, 2014 11:27 am

Post by Larry1967 » Mon Jan 06, 2014 8:54 am

Problem solved. The download product I was testing with did not have an actual download associated with it. I feel real small right now.

Newbie

Posts

Joined
Sat Jan 04, 2014 11:27 am
Who is online

Users browsing this forum: Semrush [Bot] and 21 guests