caparuni Posted April 13, 2009 Share Posted April 13, 2009 salah satu fitur PS adalah Import, bisa di akses lewat BO > Tools > Import. dgn fitur ini kita bisa import kategori, produk, atribut, kostumer, dsb. yg paling penting kita harus bikin dulu file .csv, bisa kita bikin di ms-excel ajah biar gampang, terus save ke csv. ada beberapa catatan gw soal fitur import ini.* yg make versi 1.1 kebawah, harus update /admin/tabs/AdminImport.php. soalnya versi ini buggy abis... cara update nya, yah coba download versi terakhir, buka file zip nya, extract AdminImport.php timpa ke server. (gw seh update make yg 1.2 alpha 1)* untuk import produk, cobalah untuk selalu masukan product_id, sebenarnya product_id akan otomatis di generate oleh system, tp dalam beberapa kasus ini harus dimasukin kalo ada kolom tag atau image, jd biar aman selalu masukan lah product_id.* untuk kolom category (import produk), ini harus masukin nya berdasarkan category_id, misalnya 1,2 coba ke BO > catalog, liat category_id (paling kiri). oia untuk Home category_id nya adalah 1* untuk kolom image, bikin satu folder di hosting/server, misalnya image_import, set chmod 777, upload image nya, format penulisannya path utk imagenya bisa dlm 3 variasi :1. relative path >> ../image_import/produk.jpg2. full path >> /home/caparuni/public_html/image_import/produk.jpg (rekomendasi gw seh make yg ini)3. url >> http://domainanda/image_import/produk.jpg (url ke file image di server/hostingan, bukan ke url ke image di server lain)segini dulu yah, kalo ada lg nanti gw tambah lg. ) Link to comment Share on other sites More sharing options...
pratama Posted April 13, 2009 Share Posted April 13, 2009 ada demo atau hasilnya gak,,liat donk,,!!! Link to comment Share on other sites More sharing options...
first1 Posted April 13, 2009 Share Posted April 13, 2009 I might have the same problem et me tell you what i have reached so far: – I noticed that there are some files being created in the /img/tmp directory with permission 600. i cant change their permission because the owner of these files is nobody (the php script). and i think that is why they are not been generated and put in the /img/tmp folder.-I asked the hosting support people and they told me that the script should not write them with nobody as owner.so now they removed safemode and they dont allow nobody to write to my domain, so now no files are generated at allnot in the tmp and not in the p folder.we need someone to guide us as it is a big problem for many people, come one guys, someone clever might understand this. i am happy to work with someone even on phone to troubleshoot it. Link to comment Share on other sites More sharing options...
caparuni Posted April 13, 2009 Author Share Posted April 13, 2009 ada demo atau hasilnya gak,,liat donk,,!!! http://cakram.net/ hasil import semua dari csv, 421 produk. kalo tutorialnya ke http://www.prestashop.com/wiki/Importing_Product_Data/ ini ajah, gw juga ingikutin dr sini Link to comment Share on other sites More sharing options...
caparuni Posted April 13, 2009 Author Share Posted April 13, 2009 first1 the problem is in ur hosting not in ps. every time the php uploading a filem the permision of the file will be the same with http user/group, since in ur hosting didnt asign a user/group for http service then nobody/nogroup will be asign for an uploaded file. there an options in httpd.conf about user/group for http service, after that still need to add user based on what you set on http.conf. so the solutions on this depend on ur hosting company, since u didnt have a root password )lets make some simple upload script, upload it on the server, and try it. if file is uploaded normaly then the problem is ps. Link to comment Share on other sites More sharing options...
first1 Posted April 13, 2009 Share Posted April 13, 2009 I started to like this, it seems that you know what you are talking about. thanks for trying to help.How do I test it?What should my host provider change (can you give me specific instruction and i will pass it to them)?Do you think it is why i cant get the import to work?Thanks again, Link to comment Share on other sites More sharing options...
first1 Posted April 13, 2009 Share Posted April 13, 2009 as well What script should i make to test it? Link to comment Share on other sites More sharing options...
caparuni Posted April 13, 2009 Author Share Posted April 13, 2009 http://www.php.net/manual/en/features.file-upload.post-method.php theres a sample about uploading files... <form enctype="multipart/form-data" action="__URL__" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> <!-- Name of input element determines name in $_FILES array --> Send this file: <input name="userfile" type="file" /> <input type="submit" value="Send File" /> </form> <?php // In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead // of $_FILES. $uploaddir = '/var/www/uploads/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); echo ''; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else { echo "Possible file upload attack!\n"; } echo 'Here is some more debugging info:'; print_r($_FILES); print ""; ?> dont forget to change the $uploaddir to your directory (chmod 777) on server, upload this to a server, try to upload some file Link to comment Share on other sites More sharing options...
first1 Posted April 13, 2009 Share Posted April 13, 2009 Ok i have created a file called test.php and pasted the above code in it. I have changed the $uploaddir = '/var/www/uploads/' to $uploaddir = '/test'I have created a new folder called test with permission 777 and it is located right under the public_htmlIt did not work, when i run the test.php and send file, the page gets redirected to another page which prestashp's header and look and it says We're sorry, but the Web address you entered is no longer available.To find a product, please type its name in the field below (it is like inside the shop page if you know what i mean).so i cant tell what this page is trying to say before it gets hijacked Link to comment Share on other sites More sharing options...
caparuni Posted April 13, 2009 Author Share Posted April 13, 2009 my quick guessing because u turn on the Friendly URL in ps, turn off that 1st and dont forget to rename .htaccess Link to comment Share on other sites More sharing options...
first1 Posted April 13, 2009 Share Posted April 13, 2009 I SENT YOU A PM Link to comment Share on other sites More sharing options...
first1 Posted April 14, 2009 Share Posted April 14, 2009 Can someone help with this please Link to comment Share on other sites More sharing options...
first1 Posted April 18, 2009 Share Posted April 18, 2009 I have disabled friendly URL , and renamed .htaccesseverytime i import 3 products, i get 3 new files in /img/tmp /img/tmp/ps_import8kvyyZ/img/tmp/ps_importmjaTi7/img/tmp/ps_importoVPZmdI get something like these names. and /img/p stays emptyWhy are these pictures are getting stuck in the /img/tmp directory? Link to comment Share on other sites More sharing options...
caparuni Posted April 18, 2009 Author Share Posted April 18, 2009 the image gonna be copied to .../img/p/. check the folder permision first, must be 777btw, u using what version of ps? on 1.1 theres a bug about image import, is better if u upgrade it to 1.2 Link to comment Share on other sites More sharing options...
first1 Posted April 18, 2009 Share Posted April 18, 2009 Yes they should be generated to /img/p but they are getting stuck in the tmp directory.permission to the /img and all its subfolders 777i am using 1.2 Link to comment Share on other sites More sharing options...
caparuni Posted April 18, 2009 Author Share Posted April 18, 2009 hmmm... i can help help you any longer, since in my ps all worked.. try to search on bug sections and ask ur problem there... Link to comment Share on other sites More sharing options...
devo Posted July 27, 2009 Share Posted July 27, 2009 first1, caparuni, everybody: I have exactly the same problem! Only generated files in img/tmp (chmod 777 !!!) with names e.g. ps_importaP7an6 and 0 bytes (?). Nothing in img/p (chamod 777). Please any advice? Thanks!! Link to comment Share on other sites More sharing options...
first1 Posted July 27, 2009 Share Posted July 27, 2009 sorry, i never managed to resolve this one Link to comment Share on other sites More sharing options...
devo Posted July 27, 2009 Share Posted July 27, 2009 Thanks! It seems to be a tragedy :-S Nobody knows? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now