Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by perarg

  1. Hello, i am searching but with no luck, some kind of documentation on creating my own cronjobs for my custom module. That is to say, i want to run periodically a function which i have built up in a custom module. What should i do in my module's code to create this functionality ?
  2. Sorry but i don't understand what are you trying to say. Do you have an example on this ? Or is there a module that you know it work with the same functionality so to be inspired ?
  3. Please read the warning at this page http://doc.prestashop.com/display/PS16/Overriding+default+behaviors It is clearly says "Overrides in PrestaShop are exclusive. This means that if your module overrides one of PrestaShop's behaviors, another module will not be able to use that behavior properly, or override it in an predictable way." That is why i asked here about a way that doesn't include overriding. I would like to create a more permanent solution and i don't want to worry for malfunction of future modules...
  4. Thank you for reply but as i write in my first post, i don't want to override anything. It is not good practice.
  5. Hello, i am creating a module which already add a column in an existing db table. More specific, in `stock_available` table i add a column let's call it quantity2. So far so good. My need, among others, is to edit controllers/admin/AdminProductsController.php at about line 185-187 and make some little changes at $this->_select variable. So just for testing purposes i changed that and everything works as i expected. My problem is that i don't want to edit that file directly neither make some kind of override. I want a more safe solution only through the module. That is to say, when the module is installed the changes are applied. When the module is uninstalled everything goes back to normal. How is the more appropriate way to achieve that ?
  6. After many many tests with your method Scully, i find out that the mailchimp module is responsible for the delay! It was indeed a third party that causes the delay and i found out with your way Scully. Thank you very much, i appreciate that
  7. I really appreciate your help Scully. Ok i don't have any problem to test anything. But as i said twice, i do my all tests changing the order status to statuses that DON'T send any email at all. So, putting the method addLog to Mail.php will not log anything... Having this in mind, how the mail connection may related to the delay where no email is sent ?
  8. Yes i think your approach is in right direction. I disabled the gapi module and the errors have been stopped. There is no difference on the delay problem though...
  9. I check /var/log/nginx/error.log file but there is nothing relevant to my issue. Almost everything is about module gapi (i think google analytics module) where it is thrown an error: PHP message: PHP Fatal error: Uncaught Error: Unsupported operand types in /var/www/e-sea.gr/html/controllers/admin/AdminStatsController.php:537 Stack trace: #0 /var/www/e-sea.gr/html/classes/controller/Controller.php(204): AdminStatsControllerCore->displayAjaxGetKpi() #1 /var/www/e-sea.gr/html/classes/Dispatcher.php(367): ControllerCore->run() #2 /var/www/e-sea.gr/html/**backoffice_url**/index.php(58): DispatcherCore->dispatch() #3 {main} thrown in /var/www/e-sea.gr/html/controllers/admin/AdminStatsController.php on line 537" while reading response header from upstream, client:, server: www.e-sea.gr, request: "GET /**backoffice_url**/index.php?controller=AdminStats&token=5cd2b1834f1ed445df As you can see the url of the website is https://www.e-sea.gr, but the above errors is concerned the Dashboard status and not relevant to the delay. It is something with database or presta files for sure... There is no issue with the server. I am pretty sure.
  10. What error logfile ? In Advanced Parameters -- Logs there are no errors, just my actions.
  11. The order creation yes sends email through SMTP. As i wrote in my first post, i tried to disabled email sending through Advanced Parameters -- Email -- Never send emails (may be useful for testing purposes). No difference. But in order status change there are statuses like Payment awaiting or Cancel order that don't have email sending enabled. I try with these and the delay is here... I am going crazy, i really don't know where to check...
  12. Hello, i have developed a website some months ago. Everything was fine until last week where suddenly a huge delay has appeared in the last step of placing an order, where a customer should press the button Confirm Order. Of course i choose to test only bank transfer as payment method so not to have other third parties to consider. So, after pressing the confirmation button, there is over 120sec of waiting and after that the confirmation page is appeared. As you may understand, it's unacceptable for a e-shop to have such a delay. Many customers do refresh and other re-order things twice... There is another one section of the website that the same delay has suddenly appeared. It's on administration's side in Orders page where the administrator has to change the Order Status. When the order changes and the button is pressed we have to wait about 120sec to make the change! (I tried to retain the same order status and just press the button to see what happens and a message of 'The new order status is invalid.' is appeared immediately. The problem is when someone changes the status) I have disabled the email sending process without any change at all. Trying to send an email from the back office, the email is sent immediately without any delay, so i don't think it is related to the problem. The common thing between order status change and order confirmation page, is that in both situation the order is changing its status. I thought that it is a point to start with... But i am really stuck here, i don't know where to search ? What to look up ? Please, do you have any advice, any help... It will be really appreciated P.S. I forgot to mention that the site is in Prestashop (it cannot be updated for any reason, it's another story). In the same server i have an older copy of the e-shop, i test it in a subdomain and there is no delay. Of course it's an old copy as i said and a lot of things missing as some payment gateways or shipping carriers. But i think that with this test, i clarify that this isn't happening due to server load or server quality. (I am hosting at DigitalOcean.com)
  13. Have you ever find an answer to that question ? It is very important to automatically logout a user who has forgotten to log out because he may have items reserved in his cart...
  14. Παιδιά καλησπέρα, έκανα εγώ μια απόπειρα. Άλλαξα τους DNS με αυτούς του CloudFlare. Είχα όμως πρόβλημα με το SSL Certificate. Επικοινώνησα μαζί τους, αν και στο δωρεάν πακέτο, ενδιαφέρθηκαν άμεσα και μου είπαν πως διορθώθηκε το πρόβλημα. Εντωμεταξύ μέχρι να λυθεί το πρόβλημα, αν κι οι DNS είναι του Cloudflare, το είχα απενεργοποιημένο κι έκανε bypass, οπότε στην ουσία δεν χρησιμοποιούσα το CloudFlare. Μετά τη λύση του προβλήματος SSL (απ' ότι μου είπαν αυτοί) δεν το ενεργοποίησα ξανά, οπότε και δεν το έχω τεστάρει γιατί είναι το site live και γιατί υπάρχει γέφυρα με ERP κι όλο αυτό με φοβίζει μη σπάσει με το CloudFlare... Γενικότερα όμως, ήθελα να ρωτήσω και τους τύπους από το CloudFlare, κατά πόσο θα είναι πρακτικό να βάλουμε CloudFlare σε ένα eshop που αλλάζει καθημερινά; Εννοώ προστίθενται προϊόντα, αλλάζουν τιμές κτλ. (φυσικά σε επίπεδο βάσης). Από την άλλη, ακόμα και χωρίς Cloudflare, έβαλε ο πελάτης μου νέα προϊόντα και δεν εμφανίζονταν στις Νέες Αφίξεις μέχρι να κάνουμε Clear Cache από το διαχειριστικό... Με αυτά και με αυτά τρέμω στην ιδέα να ενεργοποιήσω CloudFlare... Ίσως και να μην είχα να προσφέρω κάτι καλύτερο στο thread, αλλά ανέφερα τη δική μου εμπειρία.
  15. Hello, i need to make a cron job to clean the cache. In this thread there is a script from 2014. We are in 2017 and the prestashop version is about 1.6.1.x Is this script still valid ? I want to try it and post here the results but how can i be sure that the script gets the work done ?
  16. I really don't know why i didn't have the pre-defined statuses. I think that if they have installed by Presta and then i deleted them, then the new ones should have id above 14... But i create mines with id of 1,2,3... This is just a thought. However it is sound not very flexible or better say customisable enough to me, having pre-defined statuses that cannot be connected manually with payments... No ?
  17. Hello, please make this clear to me. My prestashop installation didn't have predefined order statuses. This is not a problem at all. I create mine. How can i connect a payment to an order status ? The only way i found is going to sql database and change the value of PS_OS_xxx to the order status id i want... Is it really the only way to do it ? What about a non expert user or a shop owner and not a developer ?
  18. I found a way to figure it out but i am not sure it is the recommended one. I create two overrides in overrides/controller/front/AuthController.php and another one AddressController.php i override the processSubmitAccount() and the processSubmitAddress() respectively. In processSumbitAccount() for example i added the following code $error_vat = false; if (Tools::isSubmit('submitGuestAccount') || Tools::isSubmit('submitAccount') || !Tools::getValue('is_new_customer')) { if (Tools::getValue('company') && !Tools::getValue('vat_number')) { $error_vat = true; } } if ($error_vat) { $this->errors[] = Tools::displayError('The VAT should not be blank once the Company name has been typed.'); } I clean /cache/class_index.php and it works like a charm!
  19. Καλησπέρα κι από μένα, είμαι κι εγώ από Θεσσαλονίκη (Νέα Μηχανιώνα για την ακρίβεια). Αν και σχετικά φρέσκος στο presta, το βρήκα αρκετά εύκολο (μιλάω για το developing κομμάτι). Θα προσπαθήσω στις 24/06 να έρθω κι εγώ να γνωριστούμε εκεί στον "πυρήνα"!
  20. Hello, i am experience the following logical problem. Prestashop has a company field in address registration form. When a user types something in this field then the vat field is shown. I want to make the VAT field required if company field is not empty. I don't want to be required if the company is empty. I cannot make vat field required by default because not all customers have company vat number. I would like not to edit core files. I would prefer make a module for example or something. Is this possible ?
  21. Καλημέρα σας, όταν έχω ένα προϊόν με συνδυασμούς (χρώμα-μέγεθος) για κάθε πιθανό συνδυασμό ελέγχεται η διαθέσιμη ποσότητα κι έτσι όταν κάποιος πηγαίνει να προσθέσει το προϊόν στο καλάθι του, η ποσότητα "ανεβαίνει" μέχρις ότου φτάσει τη διαθέσιμη ποσότητα. Από 'κει και πάνω απλά δεν "υπακούει" το κουμπί. Πολύ ωραία λειτουργία. Θα μπορούσε αυτό να εφαρμοστεί σε όλα τα προϊόντα κι όχι μόνο σε αυτά που έχουν συνδυασμούς; Αν δοκιμάσω σε ένα απλό προϊόν χωρίς συνδυασμούς το οποίο έχει π.χ. 4 διαθέσιμα τεμάχια, η ποσότητα θα μου επιτρέψει να ανέβω όσο θέλω κι απλά θα μου πετάξει μήνυμα (αν ανέβω πάνω από 4) πως "Δεν επαρκεί η ποσότητα"... Γίνεται να έχει την ίδια συμπεριφορά όπως και με τους συνδυασμούς;
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More