FAQ Database Discussion Community


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

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

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

How to create a page in a prestashop module such that the output is not wrapped in the site's template html AND using translation?

module,controller,prestashop
What I know to do: 1) Create a module controller that allows translation. I can declare texts to translate either in the controller itself or in the template: /modules/mymodule/controllers/front/list.php class myModuleListModuleFrontController extends ModuleFrontController { public function initContent() { parent::initContent(); $this->l('Some text to translater'); $this->setTemplate('list.tpl'); } } /modules/mymodule/views/templates/front/list.tpl {l s='Some other...

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

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

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

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

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

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

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

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 [email protected]_r} but that's print both the...

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

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

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

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

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

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

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

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

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

Prestashop, in .tpl, how to use smarty variable in