FAQ Database Discussion Community


Structure table of prestashop

prestashop
Do you know which table I can find users purchases (with its id) and the id of the producers? I'm trying but your help would speed my work....

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

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

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 Custom Module, how to update my sql value?

php,sql,prestashop
I wish to update my sql value for my custom module, but since this value is in a separated sql table, I stuck ... The first value, MY_TOPBAR, is updated correctly since she is updated in the ps_configuration table, but my second value, MY_HTML_DATA, isn't updated correctly in my table...

REST service from Cordova with WAMP (local)

cordova,rest,prestashop
I am trying to extract products in a web service (prepared by my PrestaShop website), using WAMP (in local so). My code : index.js var app = { initialize: function() { this.bindEvents(); }, bindEvents: function() { this.onDeviceReady(); }, onDeviceReady: function() { var password = ''; var key = 'F51Q7VWPRREG7TA25DEY8UIZT8V79E5V'; var...

prestashop CSS issue with in top menu

html,css,prestashop
I have modified top menu in order to make a dropdown submenu, I made it work, however I cannot reduce the height of the vertical items, although I have set to 15px (They have 60px in reallity) Here's my code (superfish-modified.css): /*** ESSENTIAL STYLES ***/ .sf-contener { clear: both; }...

prestashop next and previous image buttons on product page

javascript,jquery,prestashop,prestashop-1.5
I'd like to add next and previous buttons to the product image on product page, so that the user can look through all pictures with these buttons, exactly like when the image is opened to fancybox. How can I get the next and previous images in javascript? Im sure it's...

Add AJAX loader gif in prestashop

ajax,prestashop
I have two questions regarding prestashop. 1) How do I add an ajax loader image in prestashop for an ajax call? 2) Can I add an AJAX loader image to every ajax call in prestashop by placing some code in one place? I am new to prestashop, so pardon my...

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 Change description error on validation

prestashop
I want to change description this error: There is 1 error address1 is invalid. « Back I want to change from "is invalid" to "is invalid. Address field must not contain @, #, % and other" I searched file, whose show errors. (./themes/default-bootstrap/errors.tpl) {if isset($errors) && $errors} <div class="alert alert-danger">...

How to create a custom facebook like button?

javascript,php,smarty,prestashop
I need to create facebook like button in product list page in prestashop. I created the face book like button in below . <div class="fb-like" data-href="{$product.link|escape:'html':'UTF-8'}" data-width="78" data-height="32" data-layout="button" data-action="like" data-show-faces="false" data-share="false"></div> But I need to create facebook like using <a> tag. How to create facebook like button in custom...

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 - Unable to add the product (parsererror) when product has attributes

jquery,ajax,prestashop
I have a website using Prestashop 1.4.7.3 (and cannot upgrade it for now) and have trouble since 2 days when I try to add a product in ajax cart, this is the error message : TECHNICAL ERROR: unable to add the product. Details: Error thrown: [object XMLHttpRequest] Text status: parsererror...

Update product from a module in prestashop

php,mysql,prestashop
I have to update the price and quantity values of specific products in a database. As I understand, simply executing sql commands is not a great option since there are a lot of tables which have similar informations. I have read that Product() object should be created. How should I...

Prestashop remove the call us info header

templates,header,task-parallel-library,prestashop
In which module and tpl file I can delete the "call us" info and number phone that appear in the Header template I'm using? Using Prestashop 1.6...

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

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

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

How do I limit voucher's binding per transaction in Prestashop

bind,prestashop,cart
One of the prestashop's feature in cart pricing rules is the ability to bind different vouchers in one transaction. By default, you can bind 20 vouchers on a single transaction. The question is: How do I limit the vouchers per transaction as 10 vouchers only? Do I need to customize...

PRESTASHOP1.6 Display categories block on product.tpl page

php,prestashop
My category block appeared fine on the left column on category page. But when I clicked on single product page, the category block is gone. I tried many things the last 2 days, it still won't show up. I tried to transplant the module to displayLeftColumnProduct (I assumed this is...

prestashop a new product with features and images through a module

php,prestashop
Product information successfully added besides features and image. Here is my code: $product = new Product(); $image = new Image(); $langId = (int) (Configuration::get('PS_LANG_DEFAULT')); $name = Tools::getValue('pr_name'); $product->id_supplier = $arr['pr_supp'][0]; $product->id_manufacturer = Tools::getValue('pr_manuf'); $product->description_short = Tools::getValue('pr_short_desc'); $product->description = Tools::getValue('pr_desc'); $product->quantity = Tools::getValue('pr_cant'); $product->name = array($langId =>...

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

prestashop changing page icon doesn't work

php,prestashop
I am using Prestashop for the first time. I try to change icons in the default theme but the change doesn't reflect on the UI E.g: in block contact info, I have originally <li> <i class="icon-phone"></i>{l s='Call us now:' mod='blockcontactinfos'} <span>{$blockcontactinfos_phone|escape:'html':'UTF-8'}</span> </li> I want to remove <i class="icon-phone"></i> and add...

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'), ),...

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

prestashop: adding a product to cart, with custom fields

php,module,prestashop,cart
Good day all. I'm developing a module for prestashop, in which the user choose some settings, and then it is possible to save these settings and add a custom product to cart, using them as values for custom fields. I've added a new product, with 7 custom text fields. then...

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

Adding new table in rest api of prestashop webservice

php,web-services,rest,prestashop
I've been successful in creating an extra table in the prestashop products table throught rest api of webservice , however the api link http://127.0.0.1/prestashop/api/wb3d/1 wb3d is the new table which I have created in webservice . Which holds a path to an images directory somewhere on the web . This...

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?

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 1.6 extend max size of product feature value

prestashop
This is my first question on stackoverflow :) I need to import a csv file with product features values longer than 128 characters. How can I extend the maximum size of product features values in prestashop 1.6?

Prestashop on delivery select hide/show payment method

javascript,jquery,ajax,prestashop
I'm trying to figure out how to show/hide payment method on delivery method select. I tryed couple solutions but it didn't worked for me. One of them is this one: <script> $(document).ready(function(){ toggleFields(); $('.delivery_option_radio').on('change', function() { toggleFields(); }); }); function toggleFields() { if ($('#delivery_option_3_0').is(':checked')) { alert("Selected") } else { alert("Not...

Prestashop HelperFrom/List - messy layout

forms,list,prestashop,helpers
I'm new to prestashop and I worked the whole day on creating a back office interface that allows the user to write, edit, and delete articles. It is sort of a blog. I used Prestashop's Helpers (Form and List) and everything works great. I also added a new tab in...

Using translation with jquery in prestashop

javascript,jquery,smarty,prestashop
I'm trying to translate some terms when I'm using jQuery inside a smarty file. This is my jQuery code: else { $("#message").val("{l s='Please try to be clear.'}"); This phrase appears exactly as {l s='Please try to be clear.'} in my web page and doesn't take into consideration the translation mode....

Prestashop 1.6 product_list: get number of attached attribute combinations

php,e-commerce,prestashop
I'm building my first prestashop. I have a couple of products with attribute combinations that have an impact on the price. In list views, I would like to detect if a product has more than one combination attached to it, in order to display a 'from' before the price. I...

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

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

Prestashop changes to theme

prestashop
I am totally new to Prestashop, I have only just looked at the dashboard today for the first time. I have been tasked with making a small design change (CSS) to a Prestashop site that used an off the shelf theme. I know in WordPress you can make a child...

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

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

prestashop css vertical and horizontal centering [closed]

css,geometry,prestashop,centering
Hi i need help with centering few images on my prestashop webpage. I need help with 3 circles on bottom of the page (not with social icons) . I don't how center the images in circles. Please help...

How to disable module hooks for certain controllers in Prestashop?

php,prestashop
I'm writing my own module and the essential option is to control controller from the module options. I know how to control tpl and js via module options but I can't get the way to control Prestashop controller from the module php file. Simply I want to know the way...

Prestashop, in .tpl, how to use smarty variable in _r} but that's print both the...

Custom upload file on Prestashop page

php,file-upload,prestashop
I made a separate page (following this guide) so he can upload pdf files (certificates of their products). And another page to the customer's search according to the selected product. On the file upload page, the logic is as follows: In a form: Select the product (from a selector), and...

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

Using schema.org/Product image on a non image element

seo,prestashop,product,schema.org,microdata
I am editing a Prestashop installation and have a slightly odd situation. In PS when you add a colour attribute to a product it shows an <a> tag with a background colour to show the colour choices. In the shop I am building for an art supplier, we are having...

import image in Prestashop with a website URL

csv,prestashop
I have a website on which my all products are display and all product images are save on this website server. my new website making in prestashop on another server. I have a csv file which make according to prestashop. in this csv file images fill like : http://example.net/images/demo.jpg Like...

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

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

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

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

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

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

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