FAQ Database Discussion Community


No change in the front office in Prestashop in my first module

php,css,prestashop,prestashop-1.6
First day on PrestaShop. Using PrestaShop 1.6 from the PrestaShop tutorial: Creating a PrestaShop Module I have created a module(mymodule). But I don't see anything special in the front office. My module is listed in the modules' list. Installed and followed the tutorial. But still there's no change in the...

Prestashop - Retrieve searched products results to custom module

prestashop,prestashop-1.6,prestashop-1.5
I need to retrieve the ($search['result']) from SearchController.php in my module when user has performed a prestashop search result. My code is the next public function hookActionSearch($params) { $my_var = $this->context->smarty; //1st test $my_var = $this->context->controller; //2nd test $my_var = $params; //3rd test $var_dump($my_var); //in the three cases Couldn't see...

Prestashop custom php file with query

php,include,connection,prestashop,require
I am new to prestashop and I have made a custom php file which is called by ajax and has SQL queries. The problem is that this file doesn't have a connection. What should I include or require in it to achieve it?

AH01630: client denied by server configuration Apache

linux,apache,.htaccess,prestashop,prestashop-1.6
I get this error when trying to access localhost via a browser. 403 Forbidden I use Ubuntu 14.04 LTS Here is my configuration file: etc/apache2.conf # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See http://httpd.apache.org/docs/2.4/ for...

delphi XE8 REST Interface PUT in prestashop

rest,delphi,prestashop
I'm trying to update a manufacturer in Prestashop through the REST interface. So far I've been able to GET the information, but when I try to PUT, I Always get an HTTP 500 error. try Memo1.Text := '<prestashop><manufacturer><id><![CDATA[804]]></id><name><![CDATA[DisneyLand]]></name></manufacturer></prestashop>'; RESTRequest1.Params.Clear; //authentication does not work with PUT, use token as suffix.... RESTClient1.Authenticator...

Existing eCommerce Framework vs custom eCommerce solution for Scalability [closed]

php,woocommerce,e-commerce,prestashop,scalability
We are planning to start an ecommerce startup and are evaluating scalability options for choosing between (PrestaShop/WooCommerce/OpenCart) or our own custom ecommerce solution. We have thought of the following optimization techniques for scalability: 1) CDN for static resources. 2) Load balancer for horizontal scaling once the traffic goes high. 3)...

how to use prestashop with mongoDB?

php,mongodb,prestashop
I am starting to implement an e-commerce module with PHP. I analyzed and get prestashop is perfact for my requirement. I read almost all documentation of prestashop but I never find mongoDB. I decided to use database mongoDB. But I am not sure how to use it with prestashop. Can...

Uploading category languages in prestashop error

php,csv,import,prestashop
I'm trying to migrate categories from osCommerce 2.2 to the newest Prestashop using the Prestashop's own CSV import. I have succeeded in uploading English, Finnish, Deutch, Italian and French category languages. I am now facing a problem with Russian. The CSV file imports just fine until row 85-86, which are:...

How does prestashop display modules

php,prestashop
my quest is to swap position of 2 modules in left column. I read that normally I should do this in administration panel -> live edit The problem is that prestashop used by this web was little bit edited, some modules were deleted, so live edit does not work. In...

Prestashop override Blocktopmenu function

php,prestashop,prestashop-1.6,method-overriding,function-overriding
I'm trying to override the generateCategoriesMenu function from blocktopmenu.php class BlocktopmenuOverride extends Blocktopmenu { public function generateCategoriesMenu($categories, $is_children = 0) { die( var_dump ('hello I am an override') ); } } I've set up this in the folder override/modules cleared the cache file class_index.php when I load my index page...

Update SQL with Inner Join in Prestashop in DB

mysql,database,sql-update,prestashop,prestashop-1.6
I try to update the quantity in a Prestashop table. I have an INNER JOIN to get the upc from the table "ps_product_attribute" UPDATE ps_stock_available SET ps_stock_available.quantity = ps_stock_available.quantity - 1 INNER JOIN ps_product_attribute ON ps_product_attribute.id_product_attribute = ps_stock_available.id_product_attribute WHERE ps_product_attribute.ups = 01900000118; But I always have this error: #1064 -...

Where should development variables go in Prestashop?

prestashop,prestashop-1.6
I'm trying to add custom variables to use in Prestashop. In other packages I would throw them in the config file as constants but with Prestashop it looks like it can recreate the settings.inc.php file when upgrading. I don't want to run the risk of losing the vars. Is there...

Can I override a scss style in Prestashop?

css,sass,prestashop
I'm using a default theme in Prestashop 1.6 and I have a problem. What I'm trying to accomplish is to simply move the navbar 25px higher. I know that I need to remove or change #block_top_menu { padding-top: 25px; } in blocktopmenu.scss, which is located not in the modules directory,...

How to add image during programmatic product import in prestashop?

php,prestashop,prestashop-1.5
I can't find a proper documentation on adding images during product inserting. Here is the working code of my xml product import script. I have no idea how to add product images also while adding a product. foreach ($xml->Products as $product_xml) { if ($product_xml->Valid_internet_product == 1) { /* Update an...

Prestashop - module - Load on each pageload

smarty,hook,prestashop,prestashop-1.6
I'm developing a prestashop module The goal of this module is that when a page on the front office is loaded a mysql query runs. The query starts to sync the quantity's of all products. So they match the quantity's of a external stock management system. The code is already...

Getting javascript var from database record in Smarty

javascript,jquery,smarty,prestashop
I'm working on a PrestaShop page with the file extension ".tpl". I get the javascript code to auto complete like this: var currencies = [ { value: 'Afghan afghani', data: 'AFN' }, { value: 'Albanian lek', data: 'ALL' }, { value: 'Algerian dinar', data: 'DZD' }, { value: 'European euro',...

prestashop add extra tab to product management with some angular

jquery,angularjs,prestashop
I'm trying to add functionalities to prestashop product management system. With a simple module called Advprod. Using displayAdminProductsExtra hook I was able to add section to product management in prestashop backoffice. In this new section I've to work with angular. My actual tpl is correctly loaded by an ajax request...

Prestashop, in .tpl, how to use smarty variable in