
yomas
Members-
Posts
53 -
Joined
-
Last visited
Everything posted by yomas
-
Hello all ! Thanks for this subject, it's very interesting ! I'd like to add a customer image (avatar like) in the registration form. This thread talks about text data but how to manage image field upload and storage ? If someone has already manage this it would be great sharing ! Thanks in advance for tips ^^ Best regards, Yoann
-
Manufacturer Page breadcrumb (1.6)
yomas replied to yomas's topic in Addons, modules and themes developers
Nobody ? ^^- 1 reply
-
- breadcrumb
- manufacturer
-
(and 1 more)
Tagged with:
-
Adding a category list to the header
yomas replied to SonnyBoyII's topic in Addons, modules and themes developers
You're welcome ! 1,2,3 that's it ! I just took a look to tpl and php files, there's no way of choosing one specific category... Maybe hacking the tpl or change the getTree function in the php. Maybe using CSS hiding the ones you don't want... If someone else has featured it it's right the time to help ^^ Regards. -
Adding a category list to the header
yomas replied to SonnyBoyII's topic in Addons, modules and themes developers
Hi ! The category module seems to fit your needs. To hook your module in the right position in your template, you'll have to use (or creat) a hook near your logo. Actually you can hook the category module on hookLeftColumn/hookRightColumn and hookFooter. To add a hook go to the module php fuile named blockcategories.php and add this line : public function hookRightColumn($params) { return $this->hookLeftColumn($params); } But then you have to be careful with updates cause this hack will be overrided so I advise you to make a copy of the module changing his names and vars and then add it to you prestashop so that you don't have problems with updates... Good luck ! -
Hi, I'm often using the free leotheme modules that you can find here : http://www.leotheme.com/download/viewcategory/75-free-prestashop-extension.html Maybe you can customize them to fit your needs ^^ Another great module maker is to be found here : http://contentbox.org/#what-is-new Good luck !!
-
Hi all ! I've searched without finding the answer ! In the manufacturer page the breadcrumb looks like : Home > My Manufacturer I would like to have it like : Home > Manufacturers > My Manufacturer I found this topic but for an old prestashop and though the method seems not to be clean, since there modifying breadcrumb.tpl and not manufacturer.tpl... Do I have to override the Manufacturer controller and if so how to do this properly ? Or maybe using smarty {capture} with append or something like this ? Thanks in advance for helping ! Best regards.
- 1 reply
-
- breadcrumb
- manufacturer
-
(and 1 more)
Tagged with:
-
Hi all ! I was wondering how to add "Next" and "Prev" buttons in the manufacturer page to navigate between them ? Is there a simple way or have to override the manufacturer class to achieve this ? Thanks in advance for you replies ! Regards. EDIT : To achieve this override ManufacturerController.php file putting it in overrides/controller/front/ and put that code in : class ManufacturerController extends ManufacturerControllerCore { protected function assignOne() { $data = Manufacturer::getManufacturers(false, $this->context->language->id, true, false, false, false); $this->manufacturer->description = Tools::nl2br(trim($this->manufacturer->description)); $nbProducts = $this->manufacturer->getProducts($this->manufacturer->id, null, null, null, $this->orderBy, $this->orderWay, true); $this->pagination((int)$nbProducts); $products = $this->manufacturer->getProducts($this->manufacturer->id, $this->context->language->id, (int)$this->p, (int)$this->n, $this->orderBy, $this->orderWay); $this->addColorsToProductList($products); $prev = false; $next = false; for ($i=0; $i<count($data); $i++){ if ($this->manufacturer->id == $data[$i]['id_manufacturer']){ if ($i > 0) $prev = $data[$i-1]; if ($i < count($data)-1) $next = $data[$i+1]; } } $this->context->smarty->assign(array( 'prev' => $prev, 'next' => $next, 'nb_products' => $nbProducts, 'products' => $products, 'path' => ($this->manufacturer->active ? Tools::safeOutput($this->manufacturer->name) : ''), 'manufacturer' => $this->manufacturer, 'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM'), 'body_classes' => array($this->php_self.'-'.$this->manufacturer->id, $this->php_self.'-'.$this->manufacturer->link_rewrite) )); } } Then in your manufacturer.tpl you can use {$next} and {$prev}. That's all folks !!
-
Thickbox / JqZoom - jak zupełnie wyłączyć?
yomas replied to michal.b's question in Wsparcie i pomoc użytkowników
Hi there ! Can you share your solution please ? Having the same problem !! Regards.- 2 replies
-
- Prestashop
- Thickbox
-
(and 2 more)
Tagged with:
-
Hi there ! Have you find an answer ? It would be great to share if so !! ^^ Regards.
-
Bonjour à tous ! Je rencontre une difficulté quant la gestion des stocks avancée... - D'un côté j'ai un magasin physique qui échange les données de stocks sur un entrepôt prestashop (appelons le magasin) via le module Sora caisse. - De l'autre la boutique en ligne (entrepôt eshop). - Le catalogue produit est le même pour les deux boutiques Le problème est que je voudrais que les stocks utilisable sur l'eshop n'impacte que le stock dans l'entrepot eshop... Sauf que les quantités disponibles affichées sur la page produit indique le total du stock des 2 entrepôts... Y'a t-il un moyen de faire ça ??!! C'est à dire un stock spécifique à la boutique en ligne (entrepôt eshop) et un autre stock dédié au magasin physique (entrepôt magasin) ? Ou alors faut il passer par le multiboutique ? (Et est-ce possible en multiboutique avec le même catalogue produit ?) Merci de vos réponses car là je frappe en touche !!
-
Hi everyone ! Having a weird issue within my CMS pages with images : Uploading and choosing works and displays the image in editor, but when saving the image attributes changes to <img src="%5" .. and adds "" to the alt ??? Does someone knows how to fix that ? I activated the dev mode to see if php errors apperas while saving but no errors... I also tried to code manually the image but does the same thing.. Here's the link of one of the cms page concerned : http://baskalia.fr/content/26-decouvrez-baskalia Thanks in advance for your help ^^ Regards
-
Product Combination Deletion
yomas replied to yomas's topic in Ecommerce x PrestaShop [ARCHIVE BOARD]
Thanks ^^ -
Hi all ^^ I have some prducts with the same 3 attribute values : Size : S (no price impact) M (+2) L (+4) I want to delete the M value, if I do so in the "attribute and values" will it delete in the product combination ? Thanks for your reply I don't want to make my product crash and want to be sure of what will happen ^^ Best regards.
-
Hi there everyone ! I manage a shop for a friend who's selling photography. He's used to import 25 photo (products) at the same time, but each photo has the same 32 combinations, so it's very anoying to import combinations :-( The csv file is very huge cause we have 25x32 lines in the file ^^ does anyone knows a free or paid module that can import products and combinations at the same time ? My csv product file looks like : id prodcut / name /... And the combination for one product is : 1 Taille:select:1,Support d'Impression:select:1,Qualité Papier:select:1,Finition:select:1 13x18:1,Sans Support:1,Mat:1,Normale:1 #1-1 0 1 1 Taille:select:1,Support d'Impression:select:1,Qualité Papier:select:1,Finition:select:2 13x18:1,Sans Support:1,Mat:1,Fine Art:2 #1-2 8.361204 0 1 Taille:select:1,Support d'Impression:select:1,Qualité Papier:select:2,Finition:select:1 13x18:1,Sans Support:1,Brillant:2,Normale:1 #1-3 0 0 1 Taille:select:1,Support d'Impression:select:1,Qualité Papier:select:2,Finition:select:2 13x18:1,Sans Support:1,Brillant:2,Fine Art:2 #1-4 8.361204 0 1 Taille:select:1,Support d'Impression:select:2,Qualité Papier:select:1,Finition:select:1 13x18:1,Cadre Aluminium Dibon:1,Mat:1,Normale:1 #1-5 8.361204 0 1 Taille:select:1,Support d'Impression:select:2,Qualité Papier:select:1,Finition:select:2 13x18:1,Cadre Aluminium Dibon:1,Mat:1,Fine Art:2 #1-6 16.722408 0 1 Taille:select:1,Support d'Impression:select:2,Qualité Papier:select:2,Finition:select:1 13x18:1,Cadre Aluminium Dibon:2,Brillant:1,Normale:1 #1-7 8.361204 0 1 Taille:select:1,Support d'Impression:select:2,Qualité Papier:select:2,Finition:select:2 13x18:1,Cadre Aluminium Dibon:2,Brillant:1,Fine Art:2 #1-8 16.722408 0 1 Taille:select:2,Support d'Impression:select:1,Qualité Papier:select:1,Finition:select:1 20x30:2,Sans Support:1,Mat:1,Normale:1 #1-9 12.541806 0 1 Taille:select:2,Support d'Impression:select:1,Qualité Papier:select:1,Finition:select:2 20x30:2,Sans Support:1,Mat:1,Fine Art:2 #1-10 20.903010 0 1 Taille:select:2,Support d'Impression:select:1,Qualité Papier:select:2,Finition:select:1 20x30:2,Sans Support:1,Brillant:2,Normale:1 #1-11 12.541806 0 1 Taille:select:2,Support d'Impression:select:1,Qualité Papier:select:2,Finition:select:2 20x30:2,Sans Support:1,Brillant:2,Fine Art:2 #1-12 20.903010 0 1 Taille:select:2,Support d'Impression:select:2,Qualité Papier:select:1,Finition:select:1 20x30:2,Cadre Aluminium Dibon:1,Mat:1,Normale:1 #1-13 29.264214 0 1 Taille:select:2,Support d'Impression:select:2,Qualité Papier:select:1,Finition:select:2 20x30:2,Cadre Aluminium Dibon:1,Mat:1,Fine Art:2 #1-14 37.625418 0 1 Taille:select:2,Support d'Impression:select:2,Qualité Papier:select:2,Finition:select:1 20x30:2,Cadre Aluminium Dibon:2,Brillant:1,Normale:1 #1-15 29.264214 0 1 Taille:select:2,Support d'Impression:select:2,Qualité Papier:select:2,Finition:select:2 20x30:2,Cadre Aluminium Dibon:2,Brillant:1,Fine Art:2 #1-16 37.625418 0 1 Taille:select:3,Support d'Impression:select:1,Qualité Papier:select:1,Finition:select:1 30x45:3,Sans Support:1,Mat:1,Normale:1 #1-17 29.264214 0 1 Taille:select:3,Support d'Impression:select:1,Qualité Papier:select:1,Finition:select:2 30x45:3,Sans Support:1,Mat:1,Fine Art:2 #1-18 37.625418 0 1 Taille:select:3,Support d'Impression:select:1,Qualité Papier:select:2,Finition:select:1 30x45:3,Sans Support:1,Brillant:2,Normale:1 #1-19 29.264214 0 1 Taille:select:3,Support d'Impression:select:1,Qualité Papier:select:2,Finition:select:2 30x45:3,Sans Support:1,Brillant:2,Fine Art:2 #1-20 37.625418 0 1 Taille:select:3,Support d'Impression:select:2,Qualité Papier:select:1,Finition:select:1 30x45:3,Cadre Aluminium Dibon:1,Mat:1,Normale:1 #1-21 54.347826 0 1 Taille:select:3,Support d'Impression:select:2,Qualité Papier:select:1,Finition:select:2 30x45:3,Cadre Aluminium Dibon:1,Mat:1,Fine Art:2 #1-22 62.709030 0 1 Taille:select:3,Support d'Impression:select:2,Qualité Papier:select:2,Finition:select:1 30x45:3,Cadre Aluminium Dibon:2,Brillant:1,Normale:1 #1-23 54.347826 0 1 Taille:select:3,Support d'Impression:select:2,Qualité Papier:select:2,Finition:select:2 30x45:3,Cadre Aluminium Dibon:2,Brillant:1,Fine Art:2 #1-24 62.709030 0 1 Taille:select:4,Support d'Impression:select:1,Qualité Papier:select:1,Finition:select:1 40x60:4,Sans Support:1,Mat:1,Normale:1 #1-25 45.986622 0 1 Taille:select:4,Support d'Impression:select:1,Qualité Papier:select:1,Finition:select:2 40x60:4,Sans Support:1,Mat:1,Fine Art:2 #1-26 54.347826 0 1 Taille:select:4,Support d'Impression:select:1,Qualité Papier:select:2,Finition:select:1 40x60:4,Sans Support:1,Brillant:2,Normale:1 #1-27 45.986622 0 1 Taille:select:4,Support d'Impression:select:1,Qualité Papier:select:2,Finition:select:2 40x60:4,Sans Support:1,Brillant:2,Fine Art:2 #1-28 54.347826 0 1 Taille:select:4,Support d'Impression:select:2,Qualité Papier:select:1,Finition:select:1 40x60:4,Cadre Aluminium Dibon:1,Mat:1,Normale:1 #1-29 87.792642 0 1 Taille:select:4,Support d'Impression:select:2,Qualité Papier:select:1,Finition:select:2 40x60:4,Cadre Aluminium Dibon:1,Mat:1,Fine Art:2 #1-30 96.153846 0 1 Taille:select:4,Support d'Impression:select:2,Qualité Papier:select:2,Finition:select:1 40x60:4,Cadre Aluminium Dibon:2,Brillant:1,Normale:1 #1-31 87.792642 0 1 Taille:select:4,Support d'Impression:select:2,Qualité Papier:select:2,Finition:select:2 40x60:4,Cadre Aluminium Dibon:2,Brillant:1,Fine Art:2 #1-32 96.153846 0
-
Combination Generator not working
yomas replied to waterworks2's topic in Configuring and using PrestaShop
Hi have the same issue with a product with 544 combinations and it was lucky if upgrading to strongest server config made the script execution faster and worked... But still the php script for these tasks isn't optimised... What's good about presta is running under small hosting services works but with those non optimized services for medium shops or simply shops with complex products it's very anoying.. I'm wondering if working on Magento isn't best for this kind of product types... And be sure I'm very sad to say this because I really appreciate presta for the perfect compromise between users and devs... -
Combination Generator not working
yomas replied to waterworks2's topic in Configuring and using PrestaShop
There is a non elegant solution but that works without buying module... Export your database, get your FTP files, and make it on local machine then put the files and database updated online again... This is an ugly way but on local it will work, or you can upgrade your hosting offer to a dedicated or VPS. The second option seems to me the best since the VPS prices are lowest but costs more than a small one! -
Combination Generator not working
yomas replied to waterworks2's topic in Configuring and using PrestaShop
Hi! Obviously you can't increase this param... You can ask your hosting if they can raise it for a time but I think you're gonna have a negative answer... I totally agree with you that buying a module for every prestashop non option is annoying but for now on there isn't any other solution I guess... It's an issue mainly uped by users but it seems not to be prestashop team urgency... Sorry if I can't help you further but maybe in the future I'll have a solution! -
Combination Generator not working
yomas replied to waterworks2's topic in Configuring and using PrestaShop
Hello waterworks2 ! I have the same problem in many shops, due to server max_execution_time limit. Depending on your server you can change the max_execution_time limit in your php.ini file, or not... This is one of my reproches to prestashop some script are long to execute and not optimized to run under small servers. I'm trying to improve this but it means lots of core overrides and I don't have much time for this... For thumbnail regeneration you could have the same issue, there is a post in wich I explain how to avoid this : http://www.prestashop.com/forums/topic/305266-prestashop-improvements-php-max-execution-time-issue/?do=findComment&comment=1544846 Hoping you find an solution for this, If so let me know !! Best regards. -
PHP Code to Regenerate thumbnails by image ID
yomas replied to PHPZeroCode's topic in Core developers
Hi again !! The complete controller gives this : protected function _regenerateThumbnails($type = 'all', $deleteOldImages = false) { $this->start_time = time(); ini_set('max_execution_time', $this->max_execution_time); // ini_set may be disabled, we need the real value $this->max_execution_time = (int)ini_get('max_execution_time'); $languages = Language::getLanguages(false); $process = array( array('type' => 'categories', 'dir' => _PS_CAT_IMG_DIR_), array('type' => 'manufacturers', 'dir' => _PS_MANU_IMG_DIR_), array('type' => 'suppliers', 'dir' => _PS_SUPP_IMG_DIR_), array('type' => 'scenes', 'dir' => _PS_SCENE_IMG_DIR_), array('type' => 'products', 'dir' => _PS_PROD_IMG_DIR_), array('type' => 'stores', 'dir' => _PS_STORE_IMG_DIR_) ); // Launching generation process foreach ($process as $proc) { if ($type != 'all' && $type != $proc['type']) continue; // Getting format generation $formats = ImageType::getImagesTypes($proc['type']); if ($type != 'all') { $format = strval(Tools::getValue('format_'.$type)); if ($format != 'all') foreach ($formats as $k => $form) if ($form['id_image_type'] != $format) unset($formats[$k]); } if ($deleteOldImages) $this->_deleteOldImages($proc['dir'], $formats, ($proc['type'] == 'products' ? true : false)); if (($return = $this->_regenerateNewImages($proc['dir'], $formats, ($proc['type'] == 'products' ? true : false))) === true) { if (!count($this->errors)) $this->errors[] = sprintf(Tools::displayError('Cannot write %s images. Please check the folder\'s writing permissions %s.'), $proc['type'], $proc['dir']); } elseif ($return == 'timeout') $this->errors[] = Tools::displayError('Only part of the images have been regenerated. The server timed out before finishing.'); else { if ($proc['type'] == 'products') if ($this->_regenerateWatermark($proc['dir']) == 'timeout') $this->errors[] = Tools::displayError('Server timed out. The watermark may not have been applied to all images.'); if (!count($this->errors)) if ($this->_regenerateNoPictureImages($proc['dir'], $formats, $languages)) $this->errors[] = sprintf( Tools::displayError('Cannot write "No picture" image to (%s) images folder. Please check the folder\'s writing permissions.'), $proc['type'] ); } } return (count($this->errors) > 0 ? false : true); } Can we call the image size type like this in the override : <?php class AdminImagesController extends AdminImagesControllerCore { public function regenerateThumbnails($type = 'products', $format ='my_format', $deleteOldImages = true) { return parent::_regenerateThumbnails($type, $format, $deleteOldImages); } } ?> Thanks in advance I'm getting stucked :'( -
PHP Code to Regenerate thumbnails by image ID
yomas replied to PHPZeroCode's topic in Core developers
Hi again ! Just one last question, how to select an specific image size with the cron ? Like small_image or thickbox_image ? Maybe in the controller override : public function regenerateThumbnails($type = 'all', $deleteOldImages = false) Thanks in advance ! Best regards ! -
Hello everyone ! I'm very disapointed with some prestashop issues I encounter for those tasks : - Combination generation - Image regeneration - Module traduction The fact is that on small servers offer(OVH or Gandi) the php.ini file limits the php max_execution_time to 120s. So when we have many products the script takes to long and gives a 503 errror... I know that module exits to avoid those issues but I think this issues are more like to be improved in the prestashop core. I actually managed to do it with cron task for image regeneration in this post (thanks to Juanmaria) : http://www.prestashop.com/forums/topic/239917-php-code-to-regenerate-thumbnails-by-image-id/ Here's the how to : 1. Create this file -> /override/controllers/admin/AdminImagesController.php : class AdminImagesController extends AdminImagesControllerCore { public function regenerateThumbnails($type = 'all', $deleteOldImages = false) { return parent::_regenerateThumbnails($type, $deleteOldImages); } } 2. Create this file -> /myadminfolder/thumbnailscron.php : if ($argc != 3) die('Usage: php thumbnailscron_cli.php my_admin_directory my_token'); $myDir=$argv[1]; $myToken=$argv[2]; if (!chdir($myDir)) die($myDir . ' is not a valid directory!'); define('_PS_ADMIN_DIR_', getcwd()); include(dirname(__FILE__).'/../config/config.inc.php'); Context::getContext()->shop->setContext(Shop::CONTEXT_ALL); if (substr(_COOKIE_KEY_, 34, 8) != $myToken) die ("bad token"); ini_set('max_execution_time', 7200); $ic = new AdminImagesController; $ic->regenerateThumbnails(); The token is the same as the one in the searchcron -> go to your BO -> preferences -> search In french préférences -> recherche 3. Launch the php script with cron like this : php thumbnailscron.php my_admin_directory my_token Now if somebody knows or aimed to improve combination generation without paying for a module, it would be great to have your experience shared ! We have the same problem for module traductions either !! There are actually 2 module to avoid it : - for the module traduction -> http://addons.prestashop.com/fr/outils-administration-modules-prestashop/5615-traduction-simplifiee-de-prestashop.html - for the combination -> http://addons.prestashop.com/fr/outils-administration-modules-prestashop/5052-generateur-combinaisons-declinaisons-illimites-plus-3.html The aim of this topic is to improve that part of prestashop once at all ^^ I will post my research for those two points. Thanks in advance for your contribution !!! Best regards
-
- 1
-
-
- max execution time
- server limits
- (and 4 more)
-
PHP Code to Regenerate thumbnails by image ID
yomas replied to PHPZeroCode's topic in Core developers
Hello! Thanks for your help and advice ! I got it working simply changing the default module params to my needs directly in the module php file ^^ Just another question, do you think it's possible to add a mail confirmation when script execution is over ? Mine worked for about an hour and had to wait this morning to know if it was finished;-) Thanks again! -
PHP Code to Regenerate thumbnails by image ID
yomas replied to PHPZeroCode's topic in Core developers
Hi again ! Ok I did it differently using the Gandi SSH console and it worked !!! But... I have another issue : I'm using the watemark module found here :http://albertosuarezcaballero.es/marca-de-agua-png-redimensionable-watermark-prestashop/ But the image regeneration didn't work properly as it applied the default module params :'( Can you give a clue about this please ? Thanks in advance ! -
PHP Code to Regenerate thumbnails by image ID
yomas replied to PHPZeroCode's topic in Core developers
Hi ok I've editted the files to test it ^^ Thanks ! If I adapt your code to mine it will look like : 1@daily 0 imageregenerate php thumbnailscron.php /srv/data/web/vhosts/www.mydomain.com/htdocs/manager token=Jf7TVbk4 Is that looking well ? Greetings from France ^^