FAQ Database Discussion Community


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

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

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

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

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

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

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

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

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

prestashop search by category and quantity of products

prestashop
I only reached: $results = $db->executeS(' SELECT cp.`id_product` FROM `'._DB_PREFIX_.'category_product` cp '.(Group::isFeatureActive() ? 'INNER JOIN `'._DB_PREFIX_.'category_group` cg ON cp.`id_category` = cg.`id_category`' : '').' INNER JOIN `'._DB_PREFIX_.'category` c ON cp.`id_category` = c.`id_category` INNER JOIN `'._DB_PREFIX_.'product` p ON cp.`id_product` = p.`id_product` '.Shop::addSqlAssociation('product', 'p', false).' WHERE c.`active` = 1 AND product_shop.`active` = 1...

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

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

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

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

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

How to change list sequence field register in prestashop 1.6?

sequence,prestashop
i want to change list sequence of field register in prestashop 1.6 like country - state - city, i have tried edit in themes - default-bootsrap - address but cannot work

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

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

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

Smarty in prestashop .tpl, how to print only the value, not the full array

php,arrays,smarty,prestashop
I wish to print only the value "data" of this result : $ZC_HEALTHBAND_DATA Smarty_Variable Object (3) ->value = Array (1) 0 => Array (3) id => "3" option => "ZC_HEALTHBAND_DATA" data => "<table width="100%"><tr><td></td><td ..." ->nocache = false ->scope = "/..." I tried with {$ZC_HEALTHBAND_DATA|@print_r} but that's print both the...

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

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

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

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, in .tpl, how to use smarty variable in