Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2008
    Posts
    4
    Plugin Contributions
    0

    Default 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
    Code:
    (isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : 'Unknown');
    to generate the IP Address in the Admin>Catalog>Attributes Controller, as well as trying the
    Code:
    zen_session_id()
    function to generate the Session ID, with the expected result of fail.

    Any ideas are appreciated on how to generate these filenames.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Dynamic Attribute Filename for Downloadable Product

    Take a look at includes/classes/order.php & others there
    Zen-Venom Get Bitten

 

 

Similar Threads

  1. Problems with addon: Dynamic Drop Downs for Stock By Attribute
    By Dunk in forum All Other Contributions/Addons
    Replies: 56
    Last Post: 30 Apr 2014, 07:55 PM
  2. get product image filename for header
    By fakeDecoy in forum General Questions
    Replies: 5
    Last Post: 22 Feb 2012, 08:50 AM
  3. Dynamic price on product listing based on attribute
    By lbpp in forum General Questions
    Replies: 2
    Last Post: 23 Dec 2009, 07:30 PM
  4. Replies: 0
    Last Post: 12 Aug 2008, 09:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg