-
Posts
40 -
Joined
-
Last visited
Everything posted by /rai
-
on top page pastle this: <?php error_reporting(0); $old_error_handler = set_error_handler("userErrorHandler"); function userErrorHandler ($errno, $errmsg, $filename, $linenum, $vars) { $time=date("d M Y H:i:s"); // Get the error type from the error number $errortype = array (1 => "Error", 2 => "Warning", 4 => "Parsing Error", 8 => "Notice", 16 => "Core Error", 32 => "Core Warning", 64 => "Compile Error", 128 => "Compile Warning", 256 => "User Error", 512 => "User Warning", 1024 => "User Notice"); $errlevel=$errortype[$errno]; //Write error to log file (CSV format) $errfile=fopen("errors.csv","a"); fputs($errfile,"\"$time\",\"$filename: $linenum\",\"($errlevel) $errmsg\"\r\n"); fclose($errfile); if($errno!=2 && $errno!=8) { //Terminate script if fatal error die("A fatal error has occurred. Script execution has been aborted"); } } ?>
-
How can i catch the errors of these functions. When running on the backend you can see if something fails but since php I do not know how I can catch those error messages or that the operation has been a success. function loadProductsPost() { $_POST = array ( 'tab' => 'AdminImport', 'skip' => '1', 'csv' => 'productos.csv', 'forceIDs' => '0', 'match_ref' => '1', 'convert' => '', 'entity' => '1', 'separator' => ';', 'multiple_value_separator' => ',', 'iso_lang' => 'es', 'import' => 'Importar datos CSV', 'type_value' => array ( 0 => 'category', 1 => 'name', 2 => 'description_short', 3 => 'reference', 4 => 'ean13', 5 => 'weight', 6 => 'wholesale_price', 7 => 'price_tex', 8 => 'ecotax', 9 => 'manufacturer', 10 => 'image', ), ); } $import = New AdminImportController(); loadProductsPost(); $import->productImport(); //______________________________________CATEGORIAS function loadCategoriesPost() { $_POST = array ( 'tab' => 'AdminImport', 'skip' => '1', 'csv' => 'categorias.csv', 'forceIDs' => '1', 'convert' => '', 'entity' => '0', 'separator' => ';', 'multiple_value_separator' => ',', 'iso_lang' => 'es', 'import' => 'Importar datos CSV', 'type_value' => array ( 0 => 'id', 1 => 'active', 2 => 'name', 3 => 'parent', 4 => 'is_root_category', 5 => 'description', 6 => 'meta_title', 7 => 'meta_keywords', 8 => 'meta_description', 9 => 'link_rewrite', 10 => 'image', ), ); } $import = New AdminImportController(); loadCategoriesPost(); $import->categoryImport();
-
I have this error any solution? Notice: Undefined index: pfb94 in /home/silvercarshop/htdocs/tienda/tools/smarty/sysplugins/smarty_internal_compile_capture.php on line 1 I have _PS_MODE_DEV_ true
-
By seems to be a bug that mozilla, blocks the location tracking. But I in prestashop I have deactivated the geolocation option.
-
In chrome and operates from pc you can see VAT. And from the phone I can see VAT in firefox and chrome. But since firefox pc all products come without VAT, it is serious failure. prestashop 1.6.1..1 firefox 50.1.0
-
Zoom imagenes en movil
/rai replied to /rai's topic in PrestaShop Download: instalación, actualización y configuración
https://www.prestashop.com/forums/topic/301879-module-elevatezoom-for-prestashop-zoom-and-magnifier-effects-on-images/ -
https://www.prestashop.com/forums/topic/301879-module-elevatezoom-for-prestashop-zoom-and-magnifier-effects-on-images/
-
I'm trying to zoom in on an image of a product on the phone, but it does not work. Prestashop uses fancybox. Any idea how to activate zoom in fancybox? I have tried the JqZoom but it is not what I am looking for.
-
2 column of sub-category on mobile view
/rai replied to /rai's topic in Configuring and using PrestaShop
in #subcategories ul li category.css Modifies width -
want to see two columns of the sub-categories on my mobile device, I have edited the product_list.tpl to pull out two product columns but with subcategories not working. Any idea what is the .tpl that affects the sub-categories? I just have to change the xs-12 for an xs-6
-
I'm looking for a prestashop template
/rai replied to /rai's topic in Looking for a module or a theme
found theme leo mochi -
I am looking for a prestashop device that looks like this page on my mobile: https://geek.wish.com/ I've been looking but I can not find ...
-
I am using the code below to make an import from csv. But today prestashop its functions takes me 40 minutes to 300 products with pictures. Is there any way to optimize it? function loadProductsPost() { $_POST = array ( 'tab' => 'AdminImport', 'skip' => '1', 'csv' => 'xxxxx.csv', 'forceIDs' => '0', 'match_ref' => '1', 'convert' => '', 'entity' => '1', 'separator' => ';', 'multiple_value_separator' => ',', 'iso_lang' => 'es', 'import' => 'Importar datos CSV', 'type_value' => array ( 0 => 'category', 1 => 'name', 2 => 'description_short', 3 => 'reference', 4 => 'ean13', 5 => 'weight', 6 => 'wholesale_price', 7 => 'price_tex', 8 => 'ecotax', 9 => 'manufacturer', 10 => 'image', ), ); } $import = New AdminImportController(); loadProductsPost(); $import->productImport(); function loadCategoriesPost() { $_POST = array ( 'tab' => 'AdminImport', 'skip' => '1', 'csv' => 'xxxxxx.csv', 'forceIDs' => '1', 'convert' => '', 'entity' => '0', 'separator' => ';', 'multiple_value_separator' => ',', 'iso_lang' => 'es', 'import' => 'Importar datos CSV', 'type_value' => array ( 0 => 'id', 1 => 'active', 2 => 'name', 3 => 'parent', 4 => 'is_root_category', 5 => 'description', 6 => 'meta_title', 7 => 'meta_keywords', 8 => 'meta_description', 9 => 'link_rewrite', 10 => 'image', ), ); } $import = New AdminImportController(); loadCategoriesPost(); $import->categoryImport();
-
mantenimiento automatico
/rai replied to /rai's topic in PrestaShop Download: instalación, actualización y configuración
se podría hacer pero para mi implicaría mas trabajo, con lo que he puesto solo hay que poner los update al inicio del script y al final y con cron ejecutar el script de actualizacion. Así el tiempo de mantenimiento es exactamente el tiempo de ejecución de la actualizacion. Todavia no lo he probado malo sera si no funciona jajaja -
mantenimiento automatico
/rai replied to /rai's topic in PrestaShop Download: instalación, actualización y configuración
solucionado: //para cerrar la tienda $query = "UPDATE `ps_configuration` SET `value` = 0 where `name` = 'PS_SHOP_ENABLE';"; //para abrir la tienda $query = "UPDATE `ps_configuration` SET `value` = 1 where `name` = 'PS_SHOP_ENABLE';"; -
hay alguna forma de poner la tienda en modo mantenimiento de forma automática, por ejem a las 3 am realizo una actualizacion y mientras se actualiza quiero poner la tienda en modo mantenimiento y cuando termine ponerla de nuevo al publico. Tengo el modulo cron para prestashop que me ejecuta el script de actualizacion. pero el de mantenimiento ando un poco perdido.
-
works thanks
- 8 replies
-
- import
- truncateTables
-
(and 1 more)
Tagged with:
-
eliminar imagenes en FTP
/rai replied to /rai's topic in PrestaShop Download: instalación, actualización y configuración
solución function eliminarDir($carpeta) { foreach(glob($carpeta . "/*") as $archivos_carpeta) { //echo $archivos_carpeta; if (is_dir($archivos_carpeta)){ eliminarDir($archivos_carpeta); } else{ unlink($archivos_carpeta); } } rmdir($carpeta); } //limpiar imagenes $carpeta1 = '../img/p/1'; $carpeta2 = '../img/p/2'; $carpeta3 = '../img/p/3'; $carpeta4 = '../img/p/4'; $carpeta5 = '../img/p/5'; $carpeta6 = '../img/p/6'; $carpeta7 = '../img/p/7'; $carpeta8 = '../img/p/8'; $carpeta9 = '../img/p/9'; if (file_exists($carpeta1)) { eliminarDir($carpeta1); } if (file_exists($carpeta2)) { eliminarDir($carpeta2); } if (file_exists($carpeta3)) { eliminarDir($carpeta3); } if (file_exists($carpeta4)) { eliminarDir($carpeta4); } if (file_exists($carpeta5)) { eliminarDir($carpeta5); } if (file_exists($carpeta6)) { eliminarDir($carpeta6); } if (file_exists($carpeta7)) { eliminarDir($carpeta7); } if (file_exists($carpeta8)) { eliminarDir($carpeta8); } if (file_exists($carpeta9)) { eliminarDir($carpeta9); } : -
first delete all products delete folders 1,2,3,4,5,6,7,8 and 9 in img / p import products Would it work?
- 8 replies
-
- import
- truncateTables
-
(and 1 more)
Tagged with:
-
OK thanks one more question: to import products, prestashop stores images in img / p Every time I import products creates the images, but does not erase the old. I have checked the option to delete images but only deletes in the database. if I delete everything in the folder before importing, would pass something?
- 8 replies
-
- import
- truncateTables
-
(and 1 more)
Tagged with:
-
funcion truncateTables()
/rai replied to /rai's topic in PrestaShop Download: instalación, actualización y configuración
no, lo trae prestashop en el admin import, ya pero yo quiero hacerlo de forma automática con una tarea cron. Lo que intentaba es implementar esa función en este script https://www.prestashop.com/forums/topic/499237-script-importacion-automatica-prestashop-16/ Pero al final me decanto por hacerlo manual y no me como la cabeza: //limpiar productos if ($mysqli->query("TRUNCATE TABLE ps_product") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_product_shop") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_feature_product") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_product_lang") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_category_product") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_image") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_image_lang") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_image_shop") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_specific_price") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_specific_price_priority") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_product_carrier") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_cart_product") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_compare_product") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_product_attachment") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_product_country_tax") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_product_download") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_product_group_reduction_cache") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_product_sale") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_product_supplier") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_scene_products") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_warehouse_product_location") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_stock") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_stock_available") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_stock_mvt") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_customization") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_customization_field") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_supply_order_detail") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_attribute_impact") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_product_attribute") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_product_attribute_shop") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_product_attribute_combination") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n" . PHP_EOL; } if ($mysqli->query("TRUNCATE TABLE ps_product_attribute_image") === TRUE) { //echo "Se ha vaciado la tabla ps_category_lang correctamente \n