If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Categories, Products, Attributes / Can You Help With Personalized Downloads?

Can You Help With Personalized Downloads?

Started by palmtreedreamin on 14 Dec 2021, 6:09 PM · Views: 1,452

Results 1 to 7 of 7
14 Dec 2021, 6:09 PM
#1
palmtreedreamin avatar

palmtreedreamin

New Zenner

Join Date:
Dec 2021
Location:
Colorado
Posts:
4
Plugin Contributions:
0

Can You Help With Personalized Downloads?

Hey there, Zen Cart Community!
This is my first post. Never needed help that I couldn't find, before.

I have a new install of Zen Cart v1.5.7c set up on a wampserver on windows 10, for testing.
MySQL version 5.7.31
PHP version 7.3.21

I am customizing the basic blue responsive template, and will be adding ultimate seo urls, later today, so I guess include that.

I had Zen Cart, way back in 2010, and much has changed, so you could say I am new to it. I am fairly comfortable with changing sections of PHP code, but don't always know what it does. I am a little skittish about making changes to the database, but can add things if needed. Html and css are easy for me.

I know what I want to do is possible. I am just wondering the best way to go about it. I will have personalized digital downloads (pdf and mp3). I can use attributes to allow the customer to give me the personalization.

My challenge is in delivery.
The product has not been made yet. It will be ready in 3 days or less, and I want them to be able to download it from their account, if possible, or a link in email.
Since each file will be personalized, the original product will just be a dummy zip file.

If I create a download product, how can I change the name of the actual download file, after purchase, for the individual customer (when it is ready)? Or is there a better way to do this?

I thought about redirecting the download, so that the url will be unique, and just replacing the file, but if the first download fails, the file is removed and then they would get a copy of the dummy file when they retry? Or am I wrong about that?

I know from searching that this is not a common problem, but maybe somebody has already dealt with something like this?
Any constructive suggestions would be welcome. Thanks, in advance!

14 Dec 2021, 6:53 PM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: Can You Help With Personalized Downloads?

Unless your order volume is massive, I'd suggest just using the cart for payment and then fulfilling separately (email link to a file on Google Drive, perhaps).
You could even capture this link and display it on the My Account pages with order history.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

14 Dec 2021, 7:09 PM
#3
palmtreedreamin avatar

palmtreedreamin

New Zenner

Join Date:
Dec 2021
Location:
Colorado
Posts:
4
Plugin Contributions:
0

Re: Can You Help With Personalized Downloads?

swguy:

Unless your order volume is massive, I'd suggest just using the cart for payment and then fulfilling separately (email link to a file on Google Drive, perhaps).
You could even capture this link and display it on the My Account pages with order history.

Thank YOU, for that, swguy! Previously, I had been setting the files up at hightail and messaging them with the url.
So, on My Account pages, I can edit/add information from the admin? No need to answer if that is accurate. That would be ideal! Then, I could track the download by sending the file to myself and putting that url in their account --> order history. I believe that would work for me.
Thank you, very much for your help!

14 Dec 2021, 8:43 PM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: Can You Help With Personalized Downloads?

My Account pages retrieve information from the orders_products table.

I would do something like this:

  • add a field to orders_products to hold URLs
  • create an admin tool that allowed you to populate this data. It should email the customer when their file is ready for download.
  • update the template files for my account (tpl_account_history_default.php, tpl_account_history_info_default.php, tpl_account_default.php) to display this data.
  • modify Admin > Tools > Define Pages Editor > define_checkout_success.php to tell them how the process works.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

16 Dec 2021, 3:54 AM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Can You Help With Personalized Downloads?

At some point, I thought it was possible in the "filename" of the download to identify characteristics about the file such as a "display name", followed by a local filename, "size" of download and other information to split between what is displayed to the customer and what is happening in the background. In this way, information specific to the order itself could be updated to where the file to be downloaded would point to something "real" at which point the customer could actually download their custom file not being the wiser that it is different than the other files on the server and in their history... of course such an update would involve a database query unless the server filename had been "autogenerated" in such a way that when the work was done and file uploaded, it matched the autogenerated filename... at that point, no database change needed, just an upload of the completed file so that the customer then is given access to actually download the ordered item.

I went looking for this feature again when I saw the OP, but only half-heartily. I swear I saw it introduced to core code over the last couple of versions but I haven't had to consider it in a while.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

16 Dec 2021, 4:27 PM
#6
palmtreedreamin avatar

palmtreedreamin

New Zenner

Join Date:
Dec 2021
Location:
Colorado
Posts:
4
Plugin Contributions:
0

Re: Can You Help With Personalized Downloads?

swguy:

My Account pages retrieve information from the orders_products table.

I would do something like this:

  • add a field to orders_products to hold URLs
  • create an admin tool that allowed you to populate this data. It should email the customer when their file is ready for download.
  • update the template files for my account (tpl_account_history_default.php, tpl_account_history_info_default.php, tpl_account_default.php) to display this data.
  • modify Admin > Tools > Define Pages Editor > define_checkout_success.php to tell them how the process works.

Thank you, swguy!
This is a little more than I want handle at this point, with the holdiays and all. I can create a new field in the database and hacking away at the templates will be hit and miss, but eventually I would get there. I was hoping the functionality for editing the order would be there, already. Perhaps, there is a plugin that might work. I know there are a couple that have to do with editing order information. I will have to look further. Anyway, thank you, very much and happy holidays to you!

16 Dec 2021, 4:42 PM
#7
palmtreedreamin avatar

palmtreedreamin

New Zenner

Join Date:
Dec 2021
Location:
Colorado
Posts:
4
Plugin Contributions:
0

Re: Can You Help With Personalized Downloads?

mc12345678:

At some point, I thought it was possible in the "filename" of the download to identify characteristics about the file such as a "display name", followed by a local filename, "size" of download and other information to split between what is displayed to the customer and what is happening in the background. In this way, information specific to the order itself could be updated to where the file to be downloaded would point to something "real" at which point the customer could actually download their custom file not being the wiser that it is different than the other files on the server and in their history... of course such an update would involve a database query unless the server filename had been "autogenerated" in such a way that when the work was done and file uploaded, it matched the autogenerated filename... at that point, no database change needed, just an upload of the completed file so that the customer then is given access to actually download the ordered item.

I went looking for this feature again when I saw the OP, but only half-heartily. I swear I saw it introduced to core code over the last couple of versions but I haven't had to consider it in a while.

Thank you, for your reply, mc12345678!
I am only just beginning to get to the point where I will need this and your idea sounds like what I wanted to do in the first place. I will be looking at plugins that edit orders. If they add a field that the admin previously did not have access to editing, I might be able to copy that process for a new field holding the url to the file and add that to the database. And as swguy said, if I change the template for the account/order, then this would show up in their order history.
If you think of/or come across the code that you were thinking of, do let me know. I would so appreciate it. I will work on this more after the holidays. We lost power for over 14 hours, yesterday, so I am going off to bake some holiday treats, now.
Thank you, very much for your help on this. Each of you, added to the mix of possibility, and that was very helpful. Have a wonderful holiday season!