Jump to content

tarek.fellah

Members
  • Posts

    135
  • Joined

  • Last visited

2 Followers

Contact Methods

Profile Information

  • Location
    tunisia
  • Activity
    Developer

Recent Profile Visitors

6,578,688 profile views

tarek.fellah's Achievements

Newbie

Newbie (1/14)

11

Reputation

4

Community Answers

  1. J'ai rechargé php7.0-fpm et le problème est résolu. Mais ça sera embêtant si ça se répète. Merci.
  2. @doekia Merci pour ta réponse, en fait j'ai voulu compléter le design et ensuite faire pointer le nom de domaine vers le VPS, Nginx vu que j'ai contaté des améliorations dans la rapidité du site. J'ai des doutes que j'ai été hacké, mais comment le savoir? Merci.
  3. Bonjour, J'ai dernièrement créé un site Presta 1.7.3 sur un VPS et serveur web nginx, maleureusement depuis hier, le site ne s'ouvre plus voici le lien http://165.227.162.248/ , htpasswrd tarek / s6gBv"y!-Z Je me suis fait piraté? Merci d'avance.
  4. I have upgraded a customer website from Prestashop 1.6 to 1.7 version, i set it in a VPS hosting, it was my fault i'm not too technical on VPS security and configuration. The website, suddenly, become too slow and consumes a lot of memory, so i had doubt about the server performance (2G RAM), so i informed the client about that and tell that about upgrading, the customer refused, so i decided to use her shared hosting (with the old live website), in a folder and to make a redirection if all became ok. Now sometimes i had access to back end pages and the front is never opened, I got this error on chrome Gateway Timeout The gateway did not receive a timely response from the upstream server or application. I'm using the database from the vps, and i think the website is hacked since i found an empty folder with point prefix ".well-known" and a file ".eslintrc.json". This is the link of the website : http://terre-cosmos.com/terre-cosmos/index.php I would to know to found the infected files? Sorry for my english, and i'm open for all help. Thanks.
  5. You should learn to create a module, i think you need only a simple module http://doc.prestashop.com/display/PS16/Creating+a+first+module
  6. You can do like this on your module public function HookActionProductUpdate($params){ Var_dump($params['product']);exit; } This is what i do and it's working. I don't think Prestashop will change hook names.
  7. You can use action hooks, actionProductAdd and actionProductUpdate You need this hooks on the module install and add function for each hook Hook::exec are called on AdminProductController.php Hook::exec('actionProductAdd', array('id_product' => (int)$this->object->id, 'product' => $this->object)); public function HookActionProductUpdate($params){ Var_dump($params['product']);exit; } Cordially.
  8. Hi, I searched a lot for this question and i didn't the correct answer, i have made a script to clear Prestashop cache, smarty cache, I got the code from adminPerformances controller, Tools::clearSmartyCache(); Tools::clearXMLCache(); Media::clearCache(); Tools::generateIndex(); I read that it cleared the cache from /cache/smarty/cache, but when executing the script or clicking in clear cache in performances page it doesn't remove subfolders from this folder. Any body knows 'clear cache' will affect which folders/files. Thanks.
  9. Hi, I have presta 1.6.1.10, i tried to clear cache by code, but modules folders in cache/smarty/cache are not removed, You know why? Thanks.
  10. I had the same problem but i think that i solved it by clearing cache browser and cookies
  11. Hi, I think the shipping information will not be shown in the block cart, since the user doesn't yet choosed a carrier.
  12. You have to create a FrontController, defaut.php class ModuleNameDefaultModuleFrontController extends ModuleFrontController { public function initContent(){ $row = array(); parent::initContent(); if(Tools::getValue('ajax')){ $id_product = (int)Tools::getValue("id_product"); if($id_product){ $row['id_product'] = $id_product; $product_informations = Product::getProductProperties($this->context->language->id, $row); } if (isset($product_informations) and $product_informations) $json = array( 'productInformations' => $product_informations ); else $json = array( 'status' => 'error', 'message' => $this->l('Error when getting product informations.') ); } else $json = array( 'status' => 'error', 'message' => $this->l('Error when getting product informations.') ); die(Tools::jsonEncode($json)); } } JS in the TPL var id_product = $('input[name="id_product"]').val(); $.ajax({ type: "POST", url: '{$link->$this->context->getModuleLink('modulename', 'default')}', async: false, cache: false, data: "product_id="+id_product+"&ajax=1", success: function(html){ $("#price").html(html.price); $('#link').html(result.productInformations.link); }, error: function() { alert("ERROR:"); } }); You can see using ajax in admin also in this article http://magento-web.blogspot.com/2017/01/utilisation-dajax-en-front-et-back.html it's in frensh, but i think that the code is clear. Best regards.
  13. You can add js or css in the the getContent method in the configuration page, if (method_exists($this->context->controller, 'addJquery')) { $this->context->controller->addJquery(); } $this->context->controller->addJs($this->_path.'views/js/custom_script.js'); Or in the hook hookDisplayBackOfficeHeader public function hookDisplayBackOfficeHeader(){ if (method_exists($this->context->controller, 'addJquery')) { $this->context->controller->addJquery(); } $this->context->controller->addJs($this->_path.'views/js/custom_script.js'); }
  14. I would like to override the HomeSlide class for the module homeslider, for that I created a file HomeSlide.php and i placed it under override/modules/homeslider. I tried this HomeSlide.php : class HomeSlide extends HomeSlideCore{ public $start_date; public $end_date; public function __construct($id_slide = null, $id_lang = null, $id_shop = null, Context $context = null) { self::$definition['fields']['start_date'] = array('type' => self::TYPE_DATE, 'validate' => 'isDate'); self::$definition['fields']['end_date'] = array('type' => self::TYPE_DATE, 'validate' => 'isDate'); parent::__construct($id_slide, $id_lang, $id_shop); [spam-filter] But I got this error Class 'HomeSlideCore' not found Any help would be appreciated. Thanks.
×
×
  • Create New...