Prestashop: diferència entre les revisions

De WikiMar
Salta a la navegació Salta a la cerca
(Es crea la pàgina amb « ==Import images with Prestashop using CSV import tool== sudo vi /var/www/test.dafyn.com/htdocs/prestashop/controllers/admin/AdminImportController.php <pre> ... # solu...».)
 
Cap resum de modificació
Línia 1: Línia 1:
==Debug==
/var/www/test.dafyn.com/htdocs/prestashop/config/config.inc.php
@ini_set('display_errors', 'on');




Línia 6: Línia 12:
<pre>
<pre>
...
...
# solucio marti treta de http://www.prestashop.com/forums/topic/218088-fix-for-1531-failure-to-upload-images-with-csv-file/
# Solution marti taken from http://www.prestashop.com/forums/topic/218088-fix-for-1531-failure-to-upload-images-with-csv-file/
do $uniqid_path = _PS_UPLOAD_DIR_.uniqid(); while (file_exists($uniqid_path));
do $uniqid_path = _PS_UPLOAD_DIR_.uniqid(); while (file_exists($uniqid_path));
file_put_contents($uniqid_path, $field);
file_put_contents($uniqid_path, $field);
Línia 21: Línia 27:
unlink($uniqid_path);
unlink($uniqid_path);


 
</pre>
 
<pre>
#solucio 2: http://www.prestashop.com/forums/topic/215671-probleme-import-produit-csv/
# Solution 2: http://www.prestashop.com/forums/topic/215671-probleme-import-produit-csv/
         #      $fd = fopen($temp, 'r');
         #      $fd = fopen($temp, 'r');
$fd = fopen(_PS_UPLOAD_DIR_.$uniqid, 'r');
$fd = fopen(_PS_UPLOAD_DIR_.$uniqid, 'r');
</pre>
</pre>

Revisió del 01:29, 23 gen 2013

Debug

/var/www/test.dafyn.com/htdocs/prestashop/config/config.inc.php

@ini_set('display_errors', 'on');



Import images with Prestashop using CSV import tool

sudo vi /var/www/test.dafyn.com/htdocs/prestashop/controllers/admin/AdminImportController.php
...
# Solution marti taken from http://www.prestashop.com/forums/topic/218088-fix-for-1531-failure-to-upload-images-with-csv-file/
do $uniqid_path = _PS_UPLOAD_DIR_.uniqid(); while (file_exists($uniqid_path));
file_put_contents($uniqid_path, $field);
$fd = fopen($uniqid_path, 'r');

        #       do $uniqid = uniqid(); while (file_exists(_PS_UPLOAD_DIR_.$uniqid));
        #       $tmp_file = file_put_contents(_PS_UPLOAD_DIR_.$uniqid, $field);
        #       $fd = fopen($temp, 'r');


                $tab = fgetcsv($fd, MAX_LINE_SIZE, $separator);
                fclose($fd);
        #       unlink($tmp_file);
unlink($uniqid_path);

# Solution 2: http://www.prestashop.com/forums/topic/215671-probleme-import-produit-csv/
        #       $fd = fopen($temp, 'r');
$fd = fopen(_PS_UPLOAD_DIR_.$uniqid, 'r');