FAQ Database Discussion Community


How to integrate prestashop with android?

php,android,api,prestashop,prestashop-1.6
Recently I have created a eshop website using prestashop https://www.prestashop.com/en/ And since I am going to build the android app for it. What includes in apps are only some basic function e.g. create customer account / list product / order product / pay / view order etc..common eshop functions... 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...

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...

How prevent PrestaShop from updating product quantities after order validation

php,sql,prestashop-1.6,prestashop-1.5
I am new to prestashop and I am trying to make a payment module where I need to duplicate an order for statistical issues. My problem is that the duplicate order also substracts from product stock and I need to know where, after an order validation, does prestashop update stock...

Prestashop 1.6 - TAX Calculation - Explanation

php,prestashop,prestashop-1.6
I've got a problem on PS 1.6.0.9 after about one mounth of customizzazions I found out a problem in TAX calculations. I have used the TAX calculations for Switzerland, with the lowest rate (2,5%). There is something wrong in the calculation algorithm. (See the attached picture. Sorry, my backoffice is...

How to add another row in Best Seller items in prestashop

prestashop-1.6
I'll like to add another row of 4 best items on my home page under "LOS MAS VENDIDOS", how can I do it?

Prestashop select attribute combination photos

prestashop,prestashop-1.6
Short version : I want to get product photos that are assigned to product's attribute groups. Long version : I want to accomplish the feature by creating a custom module : on product page, you can choose a product color by choosing from a list of product's photos representing different...

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...

prestashop 1.4 to 1.6 image missing issue

prestashop,prestashop-1.6
I've upgraded a Prestashop site manually from 1.4 to 1.6.I can get the category images to appear but not the product images. My product path on the old 1.4 site takes the following route .../img/p/11-638-home.jpg but version 1.6 is asking for Original image is missing or empty (/.../.../../img/p/1/1.jpg) for product...

CMS Editor not working

html,css,content-management-system,editor,prestashop-1.6
I have created a cms page with a table in it. I am trying to put a border around my table but it does not show the border in the front end. I can see the border appear when i edit the page but not on the actual site. I...

How to disable product or enable compare in prestashop 1.6?

prestashop,prestashop-1.6
How to enable or disable the product compare option in the prestashop 1.6 ?

Prestashop 1.6 : Display a line TotalProductsTaxes in order-detail.tpl

order,prestashop,prestashop-1.6
I want to display a Total Taxes line in the Order-Detail.tpl I added that line of code but I don't know what to write to get TotalProductsTaxes instead of TotalProductsWithoutTaxes. I tried several things but they all broke the page. <tr class="item"> <td colspan="{if $return_allowed}2{else}1{/if}"> <strong>{l s='TVA :'}</strong> </td> <td...

Prestashop Cart Summary : Custom code is disabled when quantities added

cart,prestashop-1.6
I modified the shopping-cart-product-line.tpl, so that it displays the product price with and without tax in the cart summary. With Tax : price=$product.price_wt Without Tax : price=$product.price <li class="price priceDark{if isset($product.is_discounted) && $product.is_discounted && isset($product.reduction_applies) && $product.reduction_applies} special-price{/if}">{convertPrice price=$product.price_wt} TTC</li> <li class="price{if isset($product.is_discounted) && $product.is_discounted...

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...

Update quantity from Prestashop Database

mysql,sql,sql-update,inner-join,prestashop-1.6
I have a little problem to UPDATE the Prestashop database. I try to update the quantity from ps_stock_available. I have 2 quantity to update. My INNER JOIN work. id_product id_product_attribute upc quantity 140 263 90100014017 665 but with the upc, I also need to get the id_product to update an...

Fill dropdown list from database elements in prestashop module

php,smarty,prestashop-1.6
Right now I'm developing a module for a prestashop website and I have a dropdown html select that I would like to fill from the database. How can I do that?...

Prestashop - Add multiple category trees with helper form

php,prestashop,prestashop-1.6
I'm creating a prestashop module which need to select 2 categories root. I tried to add 2 fields with type "categories", but on the second category tree, it has the same ID and the same NAME as the first tree. $fields_form[1]['form'] = array( 'legend' => array( 'title' => $this->l('Setting'), ),...

Prestashop 1.6 - Add custom field to category

php,prestashop,prestashop-1.6
I would like to know how I can add a custom field to a category and how I can edit in the back office (under the description field). the field I would like to add is name description_long The field type is TEXT I already have overwritten my Front office...

Split best seller and new arrivals in prestashop

css,prestashop,prestashop-1.6
I'll like to split best seller and new arrival blocks in two rows. So there is a title with "NUEVOS" with the new arrivals products then below a title again "LOS MAS VENDIDOS" with the best seller items (removing the "tabs", just titles) Thanks you very much...

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...

All Payment Modules in Prestasop Not Displaying

module,prestashop,payment,prestashop-1.6
please help me None of my payment modules are being displayed on the final checkout page . I have installed and configured the following modules correctly payment by cheque Bank Wire Cash on delivery. Payu (payment gateway like paypal ) All the above worked fine until past month when they...

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...

how can delivry price in prestashop 1.6 vary depending on weight

prestashop-1.6
I'm using prestashop 1.6 I want to know if prestashop allow me to display price of order that vary depending on weight or should I develop my own module to achieve my aim ?

Get url of current prestashop page using smarty

smarty,prestashop-1.6
I have two shops toorakcomputerservices.com.au and malverncomputerservices.com.au I am using multishop features. All the data seems fine but the cms pages that i have modified in .tpl are shared by these two sites. My copyright notice is Copyright © toorakcomputerservices.com.au 1997-2015 in /public_html/themes/default-bootstrap/modules/blockcms/blockcms.tpl but this is shared by both sites....

Prestashop 1.6 Module error: Notice on line 719 in file prestashop16\tools\smarty\sysplugins\smarty_internal_templatebase.php

php,smarty,e-commerce,prestashop,prestashop-1.6
I'm developing a module and extended AdminFeaturesController.php to display my custom field Add/Edit Feature Value, but it is showing following error in popup: Notice on line 719 in file D:\xampp\htdocs\prestashop16\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code [8] Undefined index: value I think it is due to I override the function initFormFeatureValue() in my...

How can I force module's install() function to copy files to override folder?

prestashop,prestashop-1.6
I'm creating a module which includes a new version of list_footer.tpl which exists in presta\admin1234\themes\default\template\helpers\list\list_footer.tpl So basically all I want from my module is to copy my list_footer.tpl to presta\override folder. Question is, how should I write the install() function for this purpose? I tried: public function install() { if...

Return to previous page and refresh it in php?

php,prestashop-1.6
I have a submit form and while submitting the form it will load a php for the process like insert to DB and all.For going back to the submit form I added header("location:javascript://history.go(-1)"); But how to reload the page (the submit form page so user can see the submitted form...

Native Mobile app for presta shop [closed]

php,android,e-commerce,prestashop-1.6
I want to develop a native android application for my PrestaShop store. I have been searching on Google for a while but all i found was third party applications that says they can create an application for mobile. The documentation doesn't provide a clear answer as well. Does prestashop provide...

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 -...

Filter employees by profile_id in back office Employees tab

sql,prestashop,prestashop-1.6
i try to apply a filter by profile on my tab "employees" in back-office, just need to list the employees with profile_id = 6. I found this part of code in AdminEmployeesController.php, line 175 to 184 : public function renderList() { $this->_select = 'pl.`name` AS profile '; $this->_join = 'LEFT...

Prestashop 1.6 display custom field in Feature Add/Edit form

php,smarty,e-commerce,prestashop,prestashop-1.6
I am able to display my custom field in Feature Value Add/Edit form by overriding AdminFeaturesController and overriding initFormFeatureValue() function. I want to do the same for Feature Add/Edit form but cannot find function to override. I tried renderForm() function but didn't work. Which file/class/controller/function should I look into to...