Post by LorenaUY » Tue Jan 28, 2020 7:03 am

Hi guys, how can I do this? ... on the download page (my website is downloadable products) the customer sees all their products purchased on one page ... and not on the pages ...
I need to show all the products that the customer has bought on one page and obviously download them from that single page
how?
OC 3.0.3.2

New member

Posts

Joined
Fri Jan 27, 2017 9:23 pm

Post by paulfeakins » Tue Jan 28, 2020 5:56 pm

LorenaUY wrote:
Tue Jan 28, 2020 7:03 am
I need to show all the products that the customer has bought on one page and obviously download them from that single page
So the problem is that currently there are numbers at the bottom and they are spread across multiple pages?

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


User avatar
Legendary Member

Posts

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

Post by LorenaUY » Tue Jan 28, 2020 8:43 pm

paulfeakins wrote:
Tue Jan 28, 2020 5:56 pm
LorenaUY wrote:
Tue Jan 28, 2020 7:03 am
I need to show all the products that the customer has bought on one page and obviously download them from that single page
So the problem is that currently there are numbers at the bottom and they are spread across multiple pages?
Yes, the customer ... goes to my site ... and buys downloadable products ... then he goes to the download section and he can see what he bought and download it ... in exactly that part I want him to see all the products purchased at a single page and not have to go from one page to another. I only need this in this section and NOT in the whole site.

If the customer bought 40 products ... he can see the 40 products together and not in batches of 8 as currently.

Otherwise it would increase the limit of products downloaded in the same part ... from 8 (current) to ..40 ...

New member

Posts

Joined
Fri Jan 27, 2017 9:23 pm

Post by straightlight » Tue Jan 28, 2020 8:53 pm

Filtering the purchased products by name could also help to maintain optimization on your website rather than leaving all the products in one page. For these very few customers, it may not be an issue to leave all the products in one page, and also depending on the mount of different products being purchased per orders, but when it comes to several hundreds or more customers seeing all the products in one page, it can make a difference on the site's performance.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by victorj » Tue Jan 28, 2020 8:57 pm

for what i can see, download page is restricted to show 20 downloads per page at least on oc 3.0.3.2
could be its restriced in your theme (if other than default) or different version.

you can check file catalog/model/account/download.php
Search for

Code: Select all

	public function getDownloads($start = 0, $limit = 20) {
		if ($start < 0) {
			$start = 0;
		}

		if ($limit < 1) {
			$limit = 20;
		}
		
or in your case 20 could be 8 and change to whatever number you need.

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by LorenaUY » Tue Jan 28, 2020 9:52 pm

victorj wrote:
Tue Jan 28, 2020 8:57 pm
for what i can see, download page is restricted to show 20 downloads per page at least on oc 3.0.3.2
could be its restriced in your theme (if other than default) or different version.

you can check file catalog/model/account/download.php
Search for

Code: Select all

	public function getDownloads($start = 0, $limit = 20) {
		if ($start < 0) {
			$start = 0;
		}

		if ($limit < 1) {
			$limit = 20;
		}
		
or in your case 20 could be 8 and change to whatever number you need.
Indeed ... in the part that you indicate to me ... I see 20, but in the part of the client I see 8 (of 40 products purchased).
Thanks to your answer I was reviewing (I use the theme of Journal 3). In it, if I change the amount of visible products ... from 8 per page to 20 ... 40, the change is reflected throughout the site. I just need this on the download page ... (if I change it from Journal ... it changes throughout the site).
I raised help to Journal technical support but it always takes up to 48 hours to respond and I need it soon to move forward.
Any help is appreciated.
Thank you all.

New member

Posts

Joined
Fri Jan 27, 2017 9:23 pm

Post by victorj » Tue Jan 28, 2020 10:49 pm

The file shown is the one that creates the client download page in his account.
I dont have access to journal 3, nor have i worked with it in admin side, but i wont be suprised if somewhere deep hidden in journal admin there is a option where you can set the number.

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by LorenaUY » Tue Jan 28, 2020 11:30 pm

victorj wrote:
Tue Jan 28, 2020 10:49 pm
The file shown is the one that creates the client download page in his account.
I dont have access to journal 3, nor have i worked with it in admin side, but i wont be suprised if somewhere deep hidden in journal admin there is a option where you can set the number.
Thanks for your time!!
:)

New member

Posts

Joined
Fri Jan 27, 2017 9:23 pm

Post by JNeuhoff » Wed Jan 29, 2020 7:54 pm

This could be a bug in Journal3.

The controller controller/account/download.php uses this:

Code: Select all

$results = $this->model_account_download->getDownloads(($page - 1) * $this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit'), $this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit'));
Hence it ought to look for this config setting: theme_journal3_product_limit in your oc_setting DB table where it doesn't exist.
The model model/account/download.php in its method getDownloads then always downloads the first 20 results, regardless of what page you use.

You'll have to get in touch with the Journal3 customer support on this, this is not an OpenCart bug. Or you could use another web theme which is actually more compatible with OpenCart standards. See also this forum thread.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by LorenaUY » Wed Jan 29, 2020 9:55 pm

JNeuhoff wrote:
Wed Jan 29, 2020 7:54 pm
This could be a bug in Journal3.

The controller controller/account/download.php uses this:

Code: Select all

$results = $this->model_account_download->getDownloads(($page - 1) * $this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit'), $this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit'));
Hence it ought to look for this config setting: theme_journal3_product_limit in your oc_setting DB table where it doesn't exist.
The model model/account/download.php in its method getDownloads then always downloads the first 20 results, regardless of what page you use.

You'll have to get in touch with the Journal3 customer support on this, this is not an OpenCart bug. Or you could use another web theme which is actually more compatible with OpenCart standards. See also this forum thread.
In fact, the technical support of Journal has just responded to me that it is not related to Journal, to consult it here.
If I can't change the amount due to the Journal Theme ... but they refer me here ... which is not related to them ... Journal support is paid and they answer that! Terrible.
I will see how to solve it ..
Changing the theme is not an option right now because it is just online and it took me 2 months to leave it as I want it.
At the time of major site update I will see the options.
Which recommend me to include "page builder..modulos..etc .." I am not understood in code..that is why I need to include modules, page builder ... things like that ..
Thank you all really for taking the time to answer me. I appreciate it. Thank you.

New member

Posts

Joined
Fri Jan 27, 2017 9:23 pm

Post by xxvirusxx » Wed Jan 29, 2020 10:02 pm

After you made changes you have refreshed ocmod, clear theme cache, sass cache, journal 3 cache?

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by LorenaUY » Wed Jan 29, 2020 10:17 pm

xxvirusxx wrote:
Wed Jan 29, 2020 10:02 pm
After you made changes you have refreshed ocmod, clear theme cache, sass cache, journal 3 cache?
Yes, I did it.
Thanks!

New member

Posts

Joined
Fri Jan 27, 2017 9:23 pm

Post by xxvirusxx » Wed Jan 29, 2020 10:26 pm

Then should work.
I didn't find anything related to Downloads limit in journal 3 files.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by JNeuhoff » Wed Jan 29, 2020 10:42 pm

You are not the only one experiencing problems with the Journal customer support. It's definitely a Journal3 bug with the missing theme_journal3_product_limit config setting which is needed for the download page's pagination.

But for your purposes you could try this quick workaround for the catalog/controller/account/download.php:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>Journal3 modification</name>
    <code>journal3_modification</code>
    <version>3.0</version>
    <author>mhccorp.com</author>
    <link>https://www.mhccorp.com</link>

    <file path="catalog/controller/account/download.php">
        <operation>
            <search><![CDATA[$this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit')]></search>
            <add position="replace"><![CDATA[9999]]></add>
        </operation>
    </file>

</modification>
Save it as a .ocmod.xml file and upload it to your system folder, then do a Refresh at Extensions > Modifications

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by LorenaUY » Wed Jan 29, 2020 10:59 pm

xxvirusxx wrote:
Wed Jan 29, 2020 10:26 pm
Then should work.
I didn't find anything related to Downloads limit in journal 3 files.
What I, for my part, see is ... in Journal 3 there is an option to change the quantity of products that are seen in pages ... I currently have it (chosen by me) in 8, then in all the pages that are shown Maximum products is 8 per page.
Now when you go to the downloads, in the part where you see the purchased products purchased (in list mode) there you also see 8. I want to see more in that part without having to go to another page.
BUT, if I go back to the Journal and change the value to 40 ... then on all pages I see 40 products per page, even in the download section. What happens is that I want to isolate the download part so that it shows how much I want indiscriminately from the rest of the page.
Journal support tells me that it is not relative to them. (for me it is) but ...

New member

Posts

Joined
Fri Jan 27, 2017 9:23 pm

Post by xxvirusxx » Wed Jan 29, 2020 11:09 pm

Try @JNeuhoff method or this

From:

Code: Select all

$pagination->limit = $this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit');
To

Code: Select all

$pagination->limit =40;
From

Code: Select all

$data['results'] = sprintf($this->language->get('text_pagination'), ($download_total) ? (($page - 1) * 10) + 1 : 0, ((($page - 1) * 10) > ($download_total - 10)) ? $download_total : ((($page - 1) * 10) + 10), $download_total, ceil($download_total / 10));
To:

Code: Select all

$data['results'] = sprintf($this->language->get('text_pagination'), ($download_total) ? (($page - 1) * 40) + 1 : 0, ((($page - 1) * 40) > ($download_total - 40)) ? $download_total : ((($page - 1) * 40) + 40), $download_total, ceil($download_total / 40));
LE. First code is same as @JNeuhoff

If you use ocmod, then change this

<search><![CDATA[$this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit')]></search>

to this
<search><![CDATA[$this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit')]]></search>

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by xxvirusxx » Wed Jan 29, 2020 11:24 pm

Also Products Download should be improved in Master branch....
Now is ugly......

Should be like when you buy non downloaded products.

Ex: You buy 50 downloaded products. Order id is 25.
In account you have Order id 25. Here you click on View order...then Download button for each product...

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by LorenaUY » Thu Jan 30, 2020 12:34 am

JNeuhoff wrote:
Wed Jan 29, 2020 10:42 pm
You are not the only one experiencing problems with the Journal customer support. It's definitely a Journal3 bug with the missing theme_journal3_product_limit config setting which is needed for the download page's pagination.

But for your purposes you could try this quick workaround for the catalog/controller/account/download.php:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>Journal3 modification</name>
    <code>journal3_modification</code>
    <version>3.0</version>
    <author>mhccorp.com</author>
    <link>https://www.mhccorp.com</link>

    <file path="catalog/controller/account/download.php">
        <operation>
            <search><![CDATA[$this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit')]></search>
            <add position="replace"><![CDATA[9999]]></add>
        </operation>
    </file>

</modification>
Save it as a .ocmod.xml file and upload it to your system folder, then do a Refresh at Extensions > Modifications
Hi and thanks.
At the time of making the Refresh in modifications .. the site is down and indicates error 500 Internal Server Error. If I remove the file, the system returns to normal.
Now ... on the client side ... in downloads, appears: Journal Theme Installation Error / Make sure you have refreshed Opencart Modifications.

New member

Posts

Joined
Fri Jan 27, 2017 9:23 pm

Post by JNeuhoff » Thu Jan 30, 2020 12:44 am

The devil is in the detail ;D

Try this one:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>Journal3 modification</name>
    <code>journal3_modification</code>
    <version>3.0</version>
    <author>mhccorp.com</author>
    <link>https://www.mhccorp.com</link>

    <file path="catalog/controller/account/download.php">
        <operation>
            <search><![CDATA[$this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit')]]></search>
            <add position="replace"><![CDATA[9999]]></add>
        </operation>
    </file>

</modification> 

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by xxvirusxx » Thu Jan 30, 2020 1:12 am

JNeuhoff wrote:
Thu Jan 30, 2020 12:44 am
Try this one:
Much easier ;D

Attachments


Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România
Who is online

Users browsing this forum: No registered users and 9 guests