If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Zen Cart Code Suggestions / Remote downloads - for Amazon S3 or other

Remote downloads - for Amazon S3 or other

Started by mcnewton on 2 Feb 2011, 2:41 AM · Views: 403

Results 21 to 31 of 31
6 Mar 2017, 9:18 AM
#21
akasashasha avatar

akasashasha

Zen Follower

Join Date:
Mar 2009
Location:
France
Posts:
158
Plugin Contributions:
0

Remote downloads - for Amazon S3 or other

DrByte:

Hmmm .... I may not have time to investigate this until after the weekend.

I completely rewrote it and expanded its capabilities, and built it in to the v1.6.0 code. There are a lot of moving parts to it though, so may not be back-port-able. But I may have to consult what I did there to see if there's some strange missing variable here in this version.

Hello

from what I see, everything is written problem, the only problem is the choice of displaying the attribute filename in history page instead of the article name or model (which would be more user friendly than showing the aws script).

Another thing also would be to define a max length for the filename that appear on history page so that it doesn't f... up the template display as in the picture attached here (you can see the right column is out of the frame because of too long filename/script).

thanks for your help, I'd be happy to do it myself but my knowledge of php is too bad, I'm a html/css geek only.

Attachment 16958

6 Mar 2017, 10:59 PM
#22
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Remote downloads - for Amazon S3 or other

In tpl_modules_downloads.php, a little later on in the file, is a line like this:

      <td class=""><?php echo $downloads->fields['orders_products_filename']; ?></td>

It should be changed to:

      <td class=""><?php echo $zv_filename; ?></td>

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Mar 2017, 9:51 AM
#23
akasashasha avatar

akasashasha

Zen Follower

Join Date:
Mar 2009
Location:
France
Posts:
158
Plugin Contributions:
0

Re: Remote downloads - for Amazon S3 or other

DrByte:

In tpl_modules_downloads.php, a little later on in the file, is a line like this:

  <td class=""><?php echo $downloads->fields['orders_products_filename']; ?></td>
> 
> It should be changed to:
> ```
      <td class=""><?php echo $zv_filename; ?></td>

Hourray!
Thanks a lot Dr Byte ... that was the right spot I was looking for.
I also changed in the same file the cellpading to give a bit of space in between cells otherwise text in different cells all stick together :

 <table border="0" width="100%" cellspacing="0" cellpadding="0" id="downloads">
 <table border="0" width="100%" cellspacing="0" cellpadding="5" id="downloads">

... of course can be adapted to needs, not sure but I imagine the cellpadding is in pixels.

Another one solved.
By the way this is a great addon, I hope it will continue to be available for any future upgrade of zencart.

Have a nice day, and thanks again.

7 Mar 2017, 10:32 AM
#24
akasashasha avatar

akasashasha

Zen Follower

Join Date:
Mar 2009
Location:
France
Posts:
158
Plugin Contributions:
0

Re: Remote downloads - for Amazon S3 or other

@Dr Byte: a last question, if I want to hide the filename column in history page, what should be edited out ?

7 Mar 2017, 3:49 PM
#25
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Remote downloads - for Amazon S3 or other

Akasashasha:

@Dr Byte: a last question, if I want to hide the filename column in history page, what should be edited out ?
That's not so easy, because the same file is used for both pages.
You'd have to write code to test which page you're on, and then wrap that test around both the column-header TD or TH and the cell TD where the filename text are output.

Question: why?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Mar 2017, 8:42 AM
#26
akasashasha avatar

akasashasha

Zen Follower

Join Date:
Mar 2009
Location:
France
Posts:
158
Plugin Contributions:
0

Re: Remote downloads - for Amazon S3 or other

thanks for your answer ... why ? because if you look on history page, in the first column for the download, what is there ? the item name ! ... so filename is not really needed actually in the tab, item name gives enough infos to the customer isn't it ? then getting rid of the filename column will enable more space for the item name to display which is great in case of long book titles for example ...

Attachment 16961

9 Mar 2017, 9:22 AM
#27
akasashasha avatar

akasashasha

Zen Follower

Join Date:
Mar 2009
Location:
France
Posts:
158
Plugin Contributions:
0

Re: Remote downloads - for Amazon S3 or other

... another point I just realise: in order for the download to be available in customer account history, the order need to be updated to another status by an admin, can this be changed ? once the download is paid there is no reason why customers can't access it.

thanks

9 Mar 2017, 2:00 PM
#28
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Remote downloads - for Amazon S3 or other

Akasashasha:

... another point I just realise: in order for the download to be available in customer account history, the order need to be updated to another status by an admin, can this be changed ? once the download is paid there is no reason why customers can't access it.

thanks

Why aren't my downloads activating after checkout?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

9 Mar 2017, 2:10 PM
#29
akasashasha avatar

akasashasha

Zen Follower

Join Date:
Mar 2009
Location:
France
Posts:
158
Plugin Contributions:
0

Re: Remote downloads - for Amazon S3 or other

thanks a lot ... I'm using worldpay so just needs to set up worldpay module to set the order to processing once payment is made.

1 Aug 2017, 6:17 AM
#30
jonny_19 avatar

jonny_19

New Zenner

Join Date:
Oct 2011
Posts:
6
Plugin Contributions:
0

Re: Remote downloads - for Amazon S3 or other

Hey Dr. Byte,

I have a store running zen cart version 1.5. I see the plugin for Ver 1.39 and 1.54.. but would either of these work with 1.5? Are there any changes I would need to make to make it compatible?

Thanks in advance!

1 Aug 2017, 9:38 PM
#31
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Remote downloads - for Amazon S3 or other

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.