servicevu Posted July 5, 2009 Posted July 5, 2009 Hi Everybody, My store is offering a down loadable items. But, we would like to offer the customers a way to see some demo's of what they are buying. Currently, we have placed the demo files in /pub folder and direct the customers to it through emails or a link that we have placed on some pages. On the other hand, we know it is not a good practice, and would like the customer to register/login before they are able to download the free sample. Is there any contribution/option that can do this for us? Regards, Aziz
germ Posted July 5, 2009 Posted July 5, 2009 Until you find something better, hide the download link unless they are logged in. Like this: <?php if ( tep_session_is_registered('customer_id') ) { ?> ******** DELETE THIS LINE AND INSERT THE HTML FOR THE DOWNLOAD LINK HERE ******** <?php } ?> ALWAYS MAKE A BACKUP BEFORE MAKING EDITS ON ANY FILE. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
web-project Posted July 5, 2009 Posted July 5, 2009 Until you find something better, hide the download link unless they are logged in. Like this: <?php if ( tep_session_is_registered('customer_id') ) { ?> ******** DELETE THIS LINE AND INSERT THE HTML FOR THE DOWNLOAD LINK HERE ******** <?php } ?> ALWAYS MAKE A BACKUP BEFORE MAKING EDITS ON ANY FILE. simply setup the product with FREE as price and you will need to modify the payment process as some code is available to disable the redirect to payment gateway if the total of the order is 0.00 Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here! 8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself. Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues. Any issues with oscommerce, I am here to help you.
servicevu Posted July 12, 2009 Author Posted July 12, 2009 Until you find something better, hide the download link unless they are logged in. Like this: <?php if ( tep_session_is_registered('customer_id') ) { ?> ******** DELETE THIS LINE AND INSERT THE HTML FOR THE DOWNLOAD LINK HERE ******** <?php } ?> ALWAYS MAKE A BACKUP BEFORE MAKING EDITS ON ANY FILE. Thank you very much. I have used the code and it is working just perfect for me. The code was inserted in an infobox and doing the job exactly as I wanted :rolleyes: ... If someone is interested to see it in action, here is the website (www.trainersgalaxy.com) and the link is placed in the left side. Regards, Aziz
Recommended Posts
Archived
This topic is now archived and is closed to further replies.