Just wondering if there is a contribution that would allow a user to attach a pdf to the contact form and email.
i have had a search look but cant see anything suitable
many thanks!!!![]()
This is a discussion on Pdf Upload for contact page within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Just wondering if there is a contribution that would allow a user to attach a pdf to the contact form ...
Just wondering if there is a contribution that would allow a user to attach a pdf to the contact form and email.
i have had a search look but cant see anything suitable
many thanks!!!![]()
Sorry - there is no available mod on the catalog side to allow files to be uploaded. For the Contact Us and About - this could be a BIG security issue. If you do add this - make sure you restrict the types of files. Maybe put some kind of limit of how many time one can upload a file. As well most servers may limit the size of file (about 2MB if I remember correct)
JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
Try out our osCMax at: Live Catalog Demo
Limited access Admin: Live Admin Demo
Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!
would you recommend a sendmail page (that i can insert using the dynamic pages) with an upload? I agree, the file field will be restricted to .pdf, .jpg & .gif files and approx 2mb limit to file size#
this would also allow a fast update to any additional information the client wishes to add (they are picky one!)
sound like the correct solution or would there be any pitfalls to this approach?
thanks for the quick reply![]()
If you did it that way, how would you get it into the shopping card to buy?
the pdf upload isnt to buy, it is just for enquiries sake
the client sells retail display solutions and has asked for the functionality for a user to email them a pdf or photo of the space available etc
based on that i think this solution would be viable?
I am trying to do something simillar to you, only I need it to be added to a cart. I have no solution.![]()
I could see a PDF being uploaded as like "official purchase order" or "sample graphic". There are places on the net to find sample code to add this. I will look later today.
JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
Try out our osCMax at: Live Catalog Demo
Limited access Admin: Live Admin Demo
Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!
A little bit of googleing....
in your html or template files put the following HTML code or simular
upload.phpCode:<form enctype="multipart/form-data" action="upload.php" method="POST"> Please choose a file: <input name="uploaded" type="file" /><br /> <input type="submit" value="Upload" /> </form>
I take no credit - this is straight from: PHP File Upload - PHP Upload Script - Upload file scriptPHP Code:<?php
// a private directory of where you want files uploaded to
$target = "upload/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
//This is our size condition
if ($uploaded_size > 350000) {
echo "Your file is too large.<br>";
$ok=0;
}
//This is our limit file type condition
if (!($uploaded_type=="application/pdf")) {
echo "You may only upload pdf files.<br>";
$ok=0;
}
//Here we check that $ok was not set to 0 by an error
if ($ok==0) {
Echo "Sorry your file was not uploaded";
}
//If everything is ok we try to upload it
else {
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
} else {
echo "Sorry, there was a problem uploading your file.";
}
}
?>
You may have to modify and edit as necessary.
JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
Try out our osCMax at: Live Catalog Demo
Limited access Admin: Live Admin Demo
Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!
Cool. Anyway to add it to a cart now?
The original post was to add it to a contact form. That should be not hard to do with the code above. However to have as an ATTRIB - then no - far from that.
I am looking at other options for the future version of MAX (not current beta- as that is closed for changing features).
JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
Try out our osCMax at: Live Catalog Demo
Limited access Admin: Live Admin Demo
Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!
Bookmarks