Newest prestashop Questions

Q&A for professional and enthusiast programmers

Facebook pixel for Prestashop

How in Prestashop get total to pay value on order-confirmation.tpl page. i have this <script> {literal} fbq('track', 'Purchase', {value: ????, currency: 'Eu'}); </script>{/...

Prestahop can't acces modules

I wanted to access the modules in my prestashop but then it showed me this error: Can someone tell me how to fix this error so that I can again acess the modules? Thanks in advance

Prestashop: Add a single product attribute on the product list / product page

I'm working on a shoe store. Each shoe has some a product attributes: the brand, size, model,... However each shoe always only has 1 brand. So i want to display the brand attribute beneath the ...

Form HTML type date prestashop

I would change when registering as a new client on prestashop the birthday form which this presents this way by default: I would like to be able to display it in this way:

I can't change my theme on prestashop

There's a theme selected but whenever I click on "activate theme" or something like that, it loads for a while and says that the theme had been successfully installed but afterwards, it didn't change ...

Fancybox 3 API - Uncaught TypeError: cannot read property 'open' of undefined

i'm trying to load fancybox 3 to my prestashop product images using javascript from an external JS file, but i get this error in my console : Uncaught TypeError: cannot read property 'open' of ...

How do i call php static method using jquery ajax in prestashop?

In tpl smarty file, I usually call the php method like follows {assign var='all_categories' value=SpecificPrice::getByProductId($product.id_product)} {foreach from=$...

Prestashop saving invoices mannualy and automatically

My invoices are saving to my server automatically when I press "view invoice" button from admin panel. The automatic saving works, but when I try to save invoice manually.. It will save it and when I ...

Prestashop: HelperForm with multilang field

where I use Helperform. I want to make some fields translatable. I added the following form: $fields_form = array( 'form' => array( 'legend' => array( ...

Prestashop - iframe in product description

I want to insert iframe with external page into product description, but I gets only blank iframe. With pages in the same domain it works perfect, but for external urls it shows only empty iframe. Any ...

prestashop get product information on category list

I have many product categories in my store and some of them don't have products. I would like to erase the link on them, so the user can see them but wouldn't lose time exploring categories without ...

Prestadhop 1.6 superfish menu hover to click

Hello i'm working with presta 1.6 and i want change the hover of sub menu to click and still hovering in the menu(mother menu) but i try many time with any success result the problem in superfish-...

Is there a way to register hook NOT creating the module in PrestaShop?

I'm working on my own store, and I want to add some custom functionality. But this functionality is not something standalone, so I'd prefer to completely implemented via overriding controllers/classes ...

Load dynamic content using jquery

I'm trying to load dynamic images in my prestashop product page using jquery. Is it possible to load {$product.cover.bySize.large_default.url} using src in jquery file?

How to remove extra option in prestashop?

I am trying to add new field in prestashop product backoffice. For this I try many solution for this and I successfully added new fields . But I don't know how to a extra option showing . Now I want ...

PrestaShop Theme Bug

I have freshly installed PrestaShop 1.6.12 and I install PTS Basic Theme from there: PrestaBrain (developer says it's working on 1.6.X versions). I installed all modules and switched for this theme. ...

Prestashop 1.6 - edit site in code

I am using PRESTASHOP 1.6 and i am trying to edit some page content like class in header. I try edit or delete all TPL files in directory /themes/default-bootstrap and no one make changes on my web ...

Prestashop: how to display messages in the cart

i'm working in a quota module for PrestaShop 1.6 and in one of the features is that a need to display a message in the cart's page and in that modal that opens when you add an item to the cart from ...

prestashop latest version of Firefox issue

I am using a Prestashop theme that I purchased from TemplateMonster based upon 1.6.0.9 of Prestashop.....everything has been working fine since going live some 3 years ago. I have recently found any ...

Prestashop custome module image upload

I am new to Pretashop and I am trying to make a custom carousel, the problem is that I am not sure on how to save the image I upload in the backoffice any help with this? I have this input on the ....

How to add Mobile_Detect.php in prestashop 1.7?

I need to add Mobile_Detect.php in prestashop 1.7. I tried to override FrontController.php according to this post https://www.prestashop.com/forums/topic/224983-need-help-including-class-to-detect-...

How to display the reference all the time in product page with prestashop 1.7

When I add a reference to my product, it doesn't show in the product-details of the product page. But if there is a combination with the product, the reference just show! How can I make all the ...

PrestaShop strange behavior, mobile detection true/false back and forth

I'm using prestashop's mobile device detection value on the homepage of my site Specifically, within the homeslider module to serve specific slides to mobile users. $this->context->smarty->...

change form with button radio

I would like to be able to change form according to the check box my first form: <form action="{$link->getPageLink('authentication', true)|escape:'html':'UTF-8'}" method="post" id=...

Prestashop, display information in function of product ID

I use Prestashop 1.4 (for requirements of a client) but I need to use a css class in function of the ID of a product. I try this : <header class="header {if $page_name == 'index' || $page_name ==...

Open new tab usin “bulk_actions” prestashop?

I have another problem in my module in prestashop 1.6, I have a listing where the user can select more than one line in this listing (image 1)image 1 and when I click on "Select ..." I wanted to ...

Redirect images from one folder in Prestashop

I've tried turn on SSL in prestashop and everything is fine, except of images which are in images/cms. They are still sending by http. I've tried redirect them by htaccess, how also I have connected ...

how to insert pre-set filter in renderList in prestashop?

As I was able to select the previous problem with a lot of help from @TheDrot, now with this came another when I renitialize the filtering it does not return with the standard filter I need some help ...

Tpl direct print html in prestashop?

I craete a custom module for add textarea in product backoffice . When I print this textarea in tpl file in print direct html link this I use this to print in tpl {if isset($belvg_textarea)} &...

Prestashop 1.6 action hook debugging

I'm writing a Prestashop module that outputs data to an external webhook. I'm trying to find the params for the action hook I'm using (actionPaymentConfirmation), but I can't find any documentation on ...

specific price image prestashop

I want that every product with a specific price has a specific image for this price. In the specific price table of the database is no column for adding an image. Is there any way to manage this?

Retrofit with authentication returns empty data

I'm making an Android app using Retrofit 2.2.0 I make a connection to an JSON API to receive data that requires authentication but only returns me empty data: This is my JSON structure { "product":...

How to add new field tab in prestashop product backoffice?

I want to add new field in prestashop product backoffice . This tab is same description tab.Please find attached screenshot what I need . Thanks

Disabling Prestashop module breaks product page

Product page is not displaying correctly after disabling module productscategory in Prestashop. Only part of the comment form inside div#TabId5 is displayed. Do you have any ideas why it could happen?

How to change mobile menu respond width?

In prestashop 1.7 moble menu is active from 768 screen size . I need to change this size to 991 . How to change this ? Also there is anyway to know viewport size in tpl.

Prestashop - update special price by api

I want to update a product discount $opt2 = array( 'resource' =>'specific_prices', 'display' => 'full', //[id,reduction] 'filter[id_product]' => (int)$...

Prestashop: send a 2nd confirmation email to a 2nd email address

I need to add an option in Prestashop(for instance by ticking a box) to send the confirmation order email to another email address, if it's a gift for instance. I added an email field to my addresses ...

Fatal error: Call to a member function assign() on null If I set the site in another language in prestashop

If I set the site in another language, english spanish or french, the header menu and cart doesn't work, but once i reload that page error will be hide and display page perfectly. classes\module\...

How to get a product with its combination via webservice using the minimum number of web service call in prestashop?

I'm developing web service client for prestashop web store. The products of store has lots of combination(about 24*24 combination for each product). I need to get each product via prestashop ...

Filter products by attribute in PrestaShop in php

I am more than novice in php, I understand parts of the code but most do not understand. I'm modifying a module that exports PrestaShop products to a PDF based on the selected category. Now, I want ...

Prestashop, Generating invoice(pdf) automatically

So I'm looking for a solution to save invoice automatically into my server folder, when I press view invoice as the generated URL occurs (http://www.example.com/admin11111/index.php?controller=...

Put unavailable products on list bottom

I wish you can answer to my question, my question is do you know how to put unavailable products on list bottom? Thanks.

Prestashop, wget invoice

I'm trying to download invoice with bash script(wget), because I need to save invoices to my server automatically when order is made. I looked for other solutions but that didnt work, like downloading ...

Prestashop WS : HTTP XML response is not parsable

I try to create an order on Prestashop 1.6.1.12. It work on a test website, but get an error on a production website (same settings, same hosting). And have problem to understand what's wrong ? `...

PrestaShop: how to get the IDs of the select categories in a Category Treeview?

I'm making a module in Prestashop 1.6 where the admin will be able to set quotas dive groups and categories. Tables below: CREATE TABLE quota ( id_quota INT PRIMARY KEY AUTO_INCREMENT, ...

Prestashop 1.6xx Export all the orders with discounted products and discount code from database

i need to export in a CSV file, all the orders with a discount code and discounted products. I've done this query: SELECT * FROM `ps_orders` WHERE `date_add` BETWEEN '2017-01-01 00:00:00' and '2017-...

Configure prestashop through theme configuration

I am wondering if it possible to configure some of the shop’s options when enabling a theme. Let me explain, I am already generating a config.xml in the root of the theme zip to enable/disable some ...

Get Products URLs in prestashop using API

I am currently developing a ChatBot with .NET using Microsoft bot Framework i created list of products available and display the list in carousel using a Herocard and put a button BUY when the client ...

Why is $product null on modules/productcomments/tab.tpl

I'm trying to show the product name on my-theme/modules/productcomments/tab.tpl but it works sometimes. I don't know why but some products page show them and not others. The code is simple. I have ...

Consuming Prestashop Webservice API using c#

Hello i am trying to build a bot for Prestashop but i had a problem consuming REST API using System; using System.Collections.Generic; using System.Net; using System.Net.Http; using System.Net.Http....
Translating... 0%