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.