prestashop

How to get translation from other module in PrestaShop?

ぃ、小莉子 提交于 2019-12-02 16:21:24
问题 I have a "baseModule" PrestaShop module and a bunch of "baseExtensionModule[n]" modules. So, in order to avoid redundancy, I would like to reuse some translation from "baseModule" within the others. I have checked Translate::getModuleTranslation() and it looks like ModuleCore::l() does not offer the possibility to pass a module name and forward it to the first one. Any workaround you may know for this? I guess that getting the "baseModule" module instance would be another way to do it - using

Magento or Prestashop, which is better? [closed]

橙三吉。 提交于 2019-12-02 14:17:34
I want to find an ecommerce solution for my little shop. My friend tells me that Prestashop is very easy to use and develop modules for, but some say Magento is better. Can anybody tell me which is better for developing modules and why? Having looked under the covers of both of these beasts I can't say that I actually like either of them as they're both rather ugly when you pop the bonnet and something like OpenCart is actually a much nice and easier to work with solution. However, from a feature perspective OpenCart is nowhere near either Magento or PrestaShop and unlike PrestaShop it doesn't

Reconfiguring PHP Mail() Smarty Contact Form

时间秒杀一切 提交于 2019-12-02 12:11:43
I'm using Prestashop as my ecommerce shopping cart and CMS solution and was having problems receiving emails sent via the contact form. I asked around and found the problem to be due to the fact that I need to assign the 'from' address as something from my domain (e.g. do_not_reply@mydomain.com) and the email entered by user to be assigned a different variable (e.g. 'replyemail'). However, the Prestashop contact form is created with a PHP Smarty template engine, which has separate contact-form.php file and a separate contact-form.tpl which I am displaying below. Firstly contact-form.php:- <

Searching through multiple ng-repeats at once

五迷三道 提交于 2019-12-02 11:07:40
i'm currently working on an application that is build with AngularJS as a base, and that obtains data through the prestashop webservice . All data obtained are JSON strings sorted through multiple files. Now i'm trying to create a searchbox that filters through some objects the moment the user fills in the searchbox. The easy way is ofcourse by using the ng-model and filter: combination like below: angular.module('myApp', []).controller('namesCtrl', function($scope) { $scope.names = [ 'Jani', 'Carl', 'Margareth', 'Hege', 'Joe', 'Gustav', 'Birgit', 'Mary', 'Kai' ]; }); <script src="https://ajax

Add custom field in Prestashop 1.7.6 category with a module. How to save in database?

折月煮酒 提交于 2019-12-02 08:32:59
I'm creating a module in Prestashop 1.7.6 to add some custom fields in my categories administration page. Here is my code (from this source in French, new Symfony model used) : modules/categorycustomfields/categorycustomfields.php class Categorycustomfields extends Module { protected $config_form = false; public function __construct() { $this->name = 'categorycustomfields'; $this->tab = 'administration'; $this->version = '1.0.0'; $this->author = 'abc'; $this->need_instance = 0; $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('Category Custom Fields'); $this-

URL link for custom module in Prestashop 1.6

允我心安 提交于 2019-12-02 03:31:51
问题 I am currently developing a custom module. What I want is to have a nice URL, because right now it looks like this: domain.com/flower-deliveries?city=Hamburg&id_country=1&country=Germany I already added a new page to link to the custom module, the page name is flower-deliveries, but still I have the parameters that I have to "hide". Instead, of that link above I would like a URL like this: domain.com/flower-deliveries-1-Hamburg-Germany.html I tried 2 methods, but none of them worked.. The

Prestashop - set different prices according to payment method?

无人久伴 提交于 2019-12-02 01:08:23
问题 I'm using Prestashop 1.5.6 and I'd need to set a different total price for an order depending on the chosen method, some modules work intermediating with credit cards (like Mercado Pago module) and I'd need to increase the price in that case, is this possible to do it with the functionality of the shop itself, is there a module , a workaround or something? The module of the payment method I need to increase the price doesn't allow to be configured in that sense. 回答1: This feature is not

Prestashop - set different prices according to payment method?

假装没事ソ 提交于 2019-12-01 22:01:41
I'm using Prestashop 1.5.6 and I'd need to set a different total price for an order depending on the chosen method, some modules work intermediating with credit cards (like Mercado Pago module) and I'd need to increase the price in that case, is this possible to do it with the functionality of the shop itself, is there a module , a workaround or something? The module of the payment method I need to increase the price doesn't allow to be configured in that sense. This feature is not supported by PrestaShop up to 1.5.6. So far PrestaShop 1.6 will not support that either. You will need to search

Way to require an autoload in one file on a Prestashop module?

余生长醉 提交于 2019-12-01 13:22:13
I'm trying to use a set of libraries with Composer for a Prestashop module. My current approach is to include the vendor/autoload.php file on every file ( mymodule.php , controllers/front/foo.php , controllers/admin/bar.php , etc.) Doing the require only on top of the mymodule.php is not a solution, I don't see any hook to do the task. Is there a better approach than copy & paste the same snippet on top of every PHP file? Thank you! I've found the way to do it! The actionDispatcher hook was working for me with models, hooks, but not with controllers. Seems like there is a not documented hook

Edit Prestashop current orders view

为君一笑 提交于 2019-12-01 13:19:38
问题 I'm using Prestashop 1.6.0.9. I wish to edit the raw HTML for this part. Full size image link: http://i.stack.imgur.com/hazQp.png I wish to add an extra colum to the filters but I can't actually find the code for it... I have searched through the adminXXXX/themes/default/template/ directory. Specifically the orders files but they only seem to be relevant for the view you get when you actually click on one of the orders listed below. (Below meaning the orders below the filters that you can't