Jump to content

tovirio

Members
  • Posts

    25
  • Joined

  • Last visited

1 Follower

Profile Information

  • First Name
    Vittorio
  • Last Name
    Perego

tovirio's Achievements

Newbie

Newbie (1/14)

0

Reputation

1

Community Answers

  1. Hi, i translated my module with the dedicated prestashop section. The module is translated and all works well. My question is: where can i find the transalation file .php ? In the my module's folder there isn't this file, but in the other module that i have there is a folder named translations and inside there are all translations. Thanks all.
  2. Hi, i have a problem, i' m trying to edit an input filed with the jQuery plugin autocomplete in the configuration back office of a module. In the getContent(): $this->context->controller->addJqueryPlugin('autocomplete'); return $this->display(__FILE__, 'views/templates/admin/admin.tpl'); In the admin.tpl : <script type="text/javascript"> $(document).ready(function() { var $options = { data: ["blue", "green", "pink", "red", "yellow"] }; $('#basics').autocomplete( { source: $options }); }); </script> <input id="basics" /> The input filed compare and the function autocomplete is associated, but doesn't work the autocomplete. Any solution?
  3. I'm sorry to ask again, but after resolved mysql error now i have this error : Uncaught File '/var/www/html/prestashop/modules/mymodules/taxonomy_en.txt' not found (Errcode: 13 - Permission denied) <br /><br /><pre>LOAD DATA INFILE '/var/www/html/prestashop/modules/salesoar/taxonomy_en.txt' INTO TABLE ps_GoogleTaxonomy FIELDS TERMINATED BY '-' LINES TERMINATED BY '\n' IGNORE 1 LINES</pre> thrown in /var/www/html/prestashop/classes/db/Db.php on line 635 I tried to give al permission to file chmod 777 but error remains. Have any solutions ?
  4. I've already tried with command LOAD DATA INFILE but I thought that prestashop doesn't support it because it returns me this error: DB::getInstance()->execute('LOAD DATA INFILE \' '.dirname(__FILE__).'/taxonomy_en.txt \' INTO TABLE ps_salesoar FIELDS TERMINATED BY \',\' LINES TERMINATED BY \'\r\n\' IGNORE 1 LINES'); Fatal error: Uncaught ccess denied for user 'prestashopuser'@'localhost' (using password: YES) that's why i used a loop to insert values. I' can't build one big INSERT statement because are more than 10000 lines and so it will be quite long. The best option it would be using the LOAD DATA INFILE. It's possible to use it without get FATAL ERROR?
  5. I need to get the value of a select type: renderForm(){ array( 'type' => 'select', 'label' => $this->l('Shop Category'), 'name' => 'CategoryName', 'options' => array( 'query' => $query, 'id' => 'id_feature', 'name' => 'name' ) ), .... } all works perfecly, now i want to get the value that user choose. I use this code: getContent(){ Tools::getValue('CategoryName'); } This code return me nothing. How can i get the value that the user choose ? (the selected $query value)
  6. [sOLVED] I have a big problem, i have to insert lots of values into a table when mymodules is installed. The prooblem is that this inserction take too much time (6/7 minutes). I use this command: $directory = dirname(__FILE__).'/taxonomy_en.txt'; $file = fopen($directory, 'r'); $i=0; while(! feof($file)) { $a = fgets($file); Db::getInstance()->execute(' INSERT INTO ps_GoogleTaxonomy (`id_category`, `name`) VALUES ( '.$i.' , \' '.$a.' \') '); $i++; } fclose($file); i think the problem is that the prestashop function execute() each time has to connect to database and so it takes lots of time. Probably i have to establish just one time the connection insert into file my values and than close the connection. Any ideas how to do it?
  7. I solved myself, the function is ConfigurationCore::get('PS_ROUTE_'.$id_name.' ) where $id_name is the field that you want for example if you want the category schema you have to set 'category_rule'
  8. Hi, i have two shop and in one is enable the option friendly url . Now i need to get with a function the Schema of URLs of a determinate shop (id_shop). How can i get it ? In witch table of DB is saved the schema ?
  9. I need a function that return me if in that shop (id_shop) is enable the option friendly url. In which table of the DB is save this flag??
  10. Hello , I have a problem, when friendly url is on it show 404 Not found page for all pages. apache rewrite is enable from server. i removed .htaccess and make new one empty . When friendly URL is off everything is work ok , product page , category , pics but when it is on nothing . Prestashop redirect me at this url: http://localhost/prestashop/en/?live_configurator_token=9990bef7e777b08c0796b085ac2a571d&id_employee=1&id_shop=1 PS. I have multistore option activated
  11. Hi, i have a module in prestashop with an rss.php inside. I want that this file can not be called by everyone just putting the relative url. Only the admin can call it, is this possible? Thanks
  12. Yes , i want this : shop.com/one => Product::getProducts($id_shop = 2) => get all the products from the shop two
×
×
  • Create New...