Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Dynamic Attribute Filename for Downloadable Product

Dynamic Attribute Filename for Downloadable Product

Locked

Views: 1,124

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
28 Jul 2008, 5:58 AM
#1
clevername avatar

clevername

New Zenner

Join Date:
Jun 2008
Posts:
4
Plugin Contributions:
0

Dynamic Attribute Filename for Downloadable Product

OK, here's a whopper for a real brain.

I'm selling customized PDF business letters with certain fields pre-filled by a form on my site.
Since each downloadable product will be uniquely personalized by the customer, I am looking for a method to dynamically generate the attribute's filename based on the customer's session ID or IP address.

I have it currently setup so that the files are generated and saved in the /download directory by the visitor's IP address (ie legalfile_72.166.188.22.pdf).

I've tried using a filename attribute of (isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : 'Unknown'); to generate the IP Address in the Admin>Catalog>Attributes Controller, as well as trying the ```
zen_session_id()


Any ideas are appreciated on how to generate these filenames.
28 Jul 2008, 6:05 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Dynamic Attribute Filename for Downloadable Product

Take a look at includes/classes/order.php & others there