Newest prestashop Questions

Q&A for professional and enthusiast programmers

Module prestashop

I am currently developing a module for prestashop but I can not find information regarding the registration of data in database. Do you have any idea how to do this? I started by creating my form in ...

Is there a way to override any of /js/*.js files?

I know there are the ways to override module's js/css/tpl and other files, but I cant find a way to override, for example, the /js/validate.js file. I've tried to place my own file to /themes/my-theme/...

prestashop 1.6 - check if user is in group

in PS 1.6 I am trying to check if user is in group with id 6 using this: controller: 'hisGroup' => ($this->context->customer->logged AND (Customer::getDefaultGroupId((int)$this->...

Prestashop - upload multiple files ERROR Unexpected token < in JSON at position 0

I'm developing a module in Prestashop 1.6. At the moment I have developed a form to send an email with multiple files to the selected client. My problem is that when I develop the code just for a file ...

how to override template breadcrumb.tpl in prestashop module

I need to use my own breadcrumb.tpl file in prestashop template only if module active. I know about displayOverrideTemplate hook, but i need to override non-controller tpl file - breadcrumb.tpl

Cannot select any valid SQL engine on Ec2 for Prestashop

Hosted Prestashop on AWS EC2 and imported database on AWS RDS and configured app/config/parameters.php file with the RDS credentials still getting the error ... Did chmod -R 777 /var/www/html/...

Prestashop edit one column in the controller field list

I developped a my own module. Module have one column, and this column is write category names. Name is the category name. I need to write inside name column like this: Parent Name > Name For ...

Log / Debug Process CSV Import Product - Prestashop 1.7

I am doing tests with the importer of products in CSV and for several days it worked well, but today I added 10 new products and I get this error when importing: Where can I see a log with the exact ...

Prestashop Unexpected token < in JSON at position 0

I am developing a module that among other functions I want to send me an email to the client that I selected and with the files they attach. When I upload files through code: $ Fields_form = array ( ...

PrestaShop, Class not found in ModuleAdminController::getController

i'm trying to develop a PrestaShop module with controllers i placed, for example in: /modules/mymodule/controllers/admin/myControlController.php class MyControlController extends ...

Call a prestashop module with ajax

I have a PrestaShop module called 'MyMenu' and I want call this menu with an AJAX call. My module is displayed in the hookFooter() method: public function hookFooter() { $display = $this->...

Load multicurrency by csv Prestashop

I want to add products by csv files with prices in hryvnas(ukrainian currency) and euros. My main currency is hryvna. So euro prices should be converted to hryvnas. I know that it is a standard ...

Should I use a script from CodeCanyon, or develop from scratch with Magento? [on hold]

I need to develop an e-commerce website for a company that does food delivery. We found a script on CodeCanyon that does the job perfectly, almost everything we need is there. But I'm not sure it's a ...

Mail::Send not work for multiple attachment

My problem is that I need to add more than file in the email attachment, but I can not, I can upload the two attachments but I can not send it by email. My code is as follows: if(!isset($_FILES) or !(...

Is there a way to make Prestashop's Layared Filter Module to use query parameters instead of anchors (hashes)?

Is there any way to make the standart PrestaShop's Layered filters module to use URL parameters instead of anchors (the part after hash)? I ment that I want the layered filter generate and accept the ...

Prestashop discount price for subscribe products

I have product subscription for some products, I want to show two different prices options in product page, (5% discount) with subscription, and Original price without subscription, I want to show ...

Prestashop 1.7 translation duplicate entry

Adding more than one translation field to the same theme and same module would create a duplication error. This is the errror: app.ERROR: An exception occurred while executing 'INSERT INTO ...

Prestashop CMS page view counter

I'm struggling with CMS page view counter. I'm add new function to classes/controller/FrontController.php like below public static function getCMSViewed($id_cms){ $viewcms = Db::getInstance()-&...

Prestashop How to display product combinations in admin product lists seperated by comma

Prestashop I want to display the product all combinations seperated by comma in admin product list, like (id, image, name, combinations) How to I get all combination and products list in One query I ...

Prestashop 1.7 starter theme, assets in theme.yml is not working

I'm using the starter theme for Prestashop 1.7 https://github.com/PrestaShop/StarterTheme Reading the documentation I found that I can add a js/css file for specific templates editing the theme.yml ...

Prestashop - Sort by price filter doesn't take into account discounted prices

I have a custom Prestashop theme, running on Prestashop 1.6.1.9 and the product sort (Sort by Lowest Price first) doesn't take into account the specific prices (discounts). It uses the Retail price ...

Access to a sub tag in jquery

I want to change the opacity of my div in jQuery. This code does not work: $(document).ready(function() { $('a.menu-hdr-a).css('height', 'auto'); $('#mymenu_wrapper').css('opacity', ...

Want to restore the cart with the order id and details in Prestashop?

I got struck with this question is there is any way through which I will restore the cart with the help of order details and order id.I want to do same as reorder function in Prestashop.In Magento ...

prestashop parsing PDF (CustomizationFields)

In Prestashop, I have added 2 fields for uploads of PDF for the customers in each data sheet. I would like to know the page number of the PDF document that the client sends. How can I do that?

download a product manual from the prestashop website access denied and request has expired error

There is an error happening when someone is trying to download a product manual from the prestashop website. I am attaching the error. <error> <code>Access denied</code> <...

Prestashop megamenu

I purchased a prestashop template but struggling to get the navigation drop down how i need it, i've asked there support and they don't seem to understand hopefully someone here will be able to help. ...

Prestashop CustomizationField Add PDF

I have a problem when adding and deleting pdf or image document Here is my code protected function pictureUpload() { if (!$field_ids = $this->product->getCustomizationFieldIds()) { ...

Prestashop: add product with my custom price to cart

in prestashop (1.6.1.5) on product detail page I have my custom price for the current product. Now when I click on "add to cart" the standard product is added to the cart with standard price. I will ...

Worry in the backoffice of my module undefined index prestashop

I developed a prestashop module, when I am in the backoffice of my module, I have many with errors: Notice à la ligne 30 du fichier C:\xampp2\htdocs\projet_presta\app\cache\dev\smarty\compile\86\...

Type file Prestashop customizationFields

I would like to see replace the file type to upload to prestashop and replace it with PDFs instead of PNG, JPG, ... with the customizationFieldsField. Do you know how to do this?

Prestashop function are disable

All function on Prestashop are disable. I made a website in Prestashop back in 2015 and it was working fine for some years. Then it stop working and all the fuctions got disable. The error it giving ...

Custom Helper Class not found in Prestashop module

I created a helper class in prestashop 1.6 module, in the override directory. I included the file in main module file but the class is not found in tpl files. I need it there to call one static method ...

How do not show module in specific hook?

In product.tpl I have two hooks for example: Hook showing product price: {hook h="displayProductPriceBlock" product=$product type="price"} and Hook showing accesories price: {hook h="...

Prestashop: How to filter in HelperList

Hello I try to filter a List in the Backoffice. It shows the filter, it also saves it after clicking on search, but nothing is happening. Same with pagination. $schueler = $this->...

Prestashop Module from Git

I am trying to get a copy of ps_cleaner to clear the dummy data from my 1.7 version of Prestashop and I can't download straight to my prestashop version so I have gone to the Git location to take a ...

Prestashop: How i can to develop website without effect the online store

Did i can to develop my website without effect the online Prestashop store? Because i want to make change on the template store like ".tpl" files and css and javascript but i don't want this change ...

module prestashop can not run file_get_contents

I create module and using file_get_content function but can not success. function openURL($url, $use_include_path = false, $stream_context = null, $curl_timeout = 500) { if ($stream_context == ...

http + ip versus https + ip

Weirdest thing. I'm porting a web app (Prestashop) and I want to access the old installation through IP before changing the DNS. This is a shared IP. Ping gives me the IP. http://78.142.63.38/~...

How to override .js file in strange structure

I am working on prestashop 1.6. I have a .js file here: \modules\my_module\views\js\custom.js And I want to override it in theme. I've tried for example: \themes\my_theme\modules\my_module\views\js\...

Hide / Show prices of some products in Prestashop 1.5

A client wants to hide/show prices for some products (not all), I don't find such option in prestashop 1.5.5.0, Is there a module to install, or a way to fix this problem? Thanks,

Count page PDF with Imagick (Prestashop)

I use Imagick to count the number of pages in my PDF which is uploaded by the client except that my var_dump does not return any results. Here is my prestashop code from my ProductController.php ...

Prestashop 1.5 how to save custom form using hook while processing order address form

I have added custom form on order address form. While saving order address I want to save custom form also, but it saves order address only. Can anyone help me please?

Prestashop 1.7 Brand page doesn't include the sidebar

I'm working on my installation of Prestashop 1.7 and I just realized that the brand/manufacturer page doesn't include the left sidebar with all the navigation filters. Is it a bug? How can be fixed? ...

Prestashop 1.7 unable to display custom module

I'm trying prestashop 1.7 and I have an issue with the creation of custom modules. I have created a folder "mymodule" inside the "modules" folder, and, as it is indicate in the documentation I've ...

Prestashop 1.6 Product Showing wrong price combination when using custome group discount

Prestashop 1.6.1.10 When creating a product with combination and a customer group discount, the product page display the price without the discount. But when you add the product to cart the discount ...

Upgrade Prestashop from 1.6.0.11 to 1.7 (latest version)

I want to upgrade prestashop from 1.6.0.11 to 1.7 (latest version). First, I have tried 1-click upgrade but did not worked for me. See these screenshots http://prntscr.com/ek46kr, http://prntscr.com/...

Prestashop 1.6 gamification module always adding and editing files

I am developing a custom Prestashop 1.6 module. I added all the website to git in order to track my changes. I created the .gitignore file using gitignore.io. The problem is there are always new ...

How to increase the order reference length as our wish in prestashop

We want to modify the order reference logic in prestashop and for that, we implemented the logic. Logic is fine. Working great but we are getting one error [PrestaShopException] Property ...

Import CSV - Escape of the characteristics colon

I would like to import products on the prestashop backoffice using the CSV import, but, I have some difficulties with the characteristics of the products. In the documentation it's explained that it'...

Get language in a tpl file

I want to write a code in different languages ​​using an if (language = en || lenguage=es) {// code } (For example) in a tpl file. How can I know what language the user is using? Thanks!
Translating... 0%