Prestashop - Change template product list for custom mail - email

I'm started using Prestashop since few days and I would like to change the template product list in :
my_project -> mails -> _partials -> order_conf_product_list.tpl
I have created my own mail theme and I see in PaymentModule.php the getEmailTemplateContent() method who search the order_conf_product_list.tpl but I don't know how overwrite it.
I'm using Prestashop 1.7.7.1
Thanks

I'm late but you need to store order_conf_product_list.tpl on this path:
YOUR_THEME/mails/YOUR_LANGUAGE/order_conf_product_list.tpl

Related

Magento and mandrill smtp headers

I am using Mandrill as a SMTP.
It is successfully connected to Magento 2.
My question :
Is it possible to use Mandrill's custom header references through Magento Email Templates.
For example, I have created custom templates in Mandrill that can be called upon by a customized field in the email header.
Usually it can be added the same way as the reply-to field.
I want to use the following functionality below:
https://mandrill.zendesk.com/hc/en-us/articles/205582117-How-to-Use-SMTP-Headers-to-Customize-Your-M...
Can I add in the header template :
<?php
$headers = $this->getHeaders();
$headers->addTextHeader('X-MC-Template', 'template_name');
?>
Any guidance would be greatly appreciated.
Thanks
You can create your own plugin for Magento (as it was done in the mageplaza/magento-2-smtp extension, they have shared their experience here) that will help you to rewrite the send mail function sendMessage () through the aroundSendMessage () function. In this case you can write headers on your own depend on the message.
How to create a plugin for Magento 2 you can find at Magento official documentation: https://devdocs.magento.com/guides/v2.0/extension-dev-guide/plugins.html

Woocommerce Custom Email path in Plugin

I create a custom order status and the . also cerated a custom email that are fired manually when the status is changed to my new custom status.
It works 100% if my custom email template reside in plugins/woocommerce/
\plugins/woocommerce/templates/emails/logistics-eft-paid.php
But i need to add the custom email to my childtheme.
themes/ms-store/woocommerce/emails/logistics-eft-paid.php
I used this plugin, and I realise that woocommerce_get_template is outdated and replaced by wc_get_template, but is simply can't get it to work.
Even if I can hardcode the path to the email template, it will be a start.
Plugin used:
https://github.com/skyverge/woocommerce-expedited-order-email
Any help will be appreciated,
Thank you.

Add new category and custom page into Site Administration menu

I'm trying to add a new feature into site administration menu of moodle as part of a project that I am working on. Right now our customer only needs to integrate OnePay gateway into moodle. But in the future, they may require integration of other payment gateways (like PayPal) as well. So I need to create a category just for website administrators to input different types of payment. A new category should be somewhere in the "Advanced Features" menu (something like in the following screenshots)
Where to add new category
Example for onepay integration
With "Settings" page is a page that site administrator to input all necessary payment information (including customer's card number, access code, etc.). Right now I'm testing with using two of my testing pages for domestic and international payments.
Here is my code in file /lang/en/admin.php:
$string['payment'] = 'Payment';
$string['onepay'] = 'OnePay';
$string['test_onepay_domestic'] = 'Test Domestic Payment using OnePay';
$string['test_onepay_international'] = 'Test International Payment using OnePay';
In admin_custom directory, I created a path like this /payment/onepay/test/ and add 2 my testing pages into it. In folder /payment/, I added a file named menu.php. Here is my code in it.
<?php
$ADMIN->add('advancedfeatures', new admin_category('payment', get_string('payment', 'admin')));
$ADMIN->add('payment', new admin_category('payment', get_string('onepay', 'admin')));
//$domestic = new admin_settingpage('onepay', new lang_string('test_onepay_domestic', 'admin'), new moodle_url("/admin_custom/payment/onepay/test/domestic/index.php"));
//$international = new admin_settingpage('onepay', new lang_string('test_onepay_international', 'admin'), new moodle_url("/admin_custom/payment/onepay/test/international/index.php"));
$domestic = new admin_externalpage('test_onepay_domestic', get_string('test_onepay_domestic'), "$CFG->wwwroot/admin_custom/payment/onepay/test/domestic/index.php");
$international = new admin_externalpage('test_onepay_international', get_string('test_onepay_international'), "$CFG->wwwroot/admin_custom/payment/onepay/test/international/index.php");
$ADMIN->add('onepay', $domestic);
$ADMIN->add('onepay', $international);
I have attempted to include file menu.php in both files
/admin/settings/top.php
/admin/settings/server.php
But none of these works. Can anyone please tell me what should I do to get this works? Thank you very much. I really appreciate that.
Moodle doesn't have any sort of plugin type called 'payment', so by creating a hierarchy starting '/payment', you're already at odds with the way that Moodle works (as shown by needing to edit core files in order to add language strings and menu items).
I would recommend that you start again by creating an admin tool or a local plugin. Both of these types can have their own language strings and can add entries to the site admin menu (have a look at the settings.php inside any of the standard admin tool plugins or, for local plugins, an additional option is to create a local_MYPLUGIN_extend_settings_navigation() function). If you want to support multiple payment options, then your plugin could define a new subplugin type for each of the payment options.

I use magento 2, when submit contact form then issue on mail

I use magento 2, when submit contact form then issue on mail, when receive successfully but problem is apostrophe character.
Suppose any Customer write comment like: Can't able to login then in mail
display like: Can &#039 ; t able to login
I use 4-5 latest version all version this common issue,
Please help to resolve if you know
Go to this path "/vendor/magento/module-contact/view/adminhtml/email" and open "submitted_form.html" and replace 19th line code with the below-mentioned code
{{trans "Comment: %comment" comment=$data.comment|raw}}
Adding to the comment of Abhinav Kumar Singh, there's another way for those who are working with copies of the default e-mail templates in admin backend: MARKETING > COMMUNICATIONS > E-MAIL TEMPLATES.
No need to override original Magento files.
After you have imported the Contact-Form Template, you will find the same syntax in the Template Content field. Just add the "|raw" tag there.
{{trans "Comment: %comment" comment=$data.comment|raw}}
or
{{var data.comment|raw}}

SUGARCRM plugin - webservice client with setup

I have a task to develop plugin for SugarCRM. Plugin should be "hooked" to contacts, leads and/or targets.
After I add contact to SugarCRM plugin should send data (with some fileds) to specific webservice (method to insert new person into DB).
I did create logical hook to contacts and before save I send data to webservice.
My biggest problem are fields. SugarCRM admin should be able to make setup for plugin like this
Plugin gets list of fields from webservice
Admin maps fields from "SugarCRM contacts" to "webservice persons" fields
for example
SugarCRM contact | webservice person
"first_name" => "firstname"
"last_name" => "familyname"
"gender" => "mf"
....
So when contact is added to SugarCRM, plugin should be able to read this setup and match every field before sending to webservice.
Can someone give me tips how to start with this, is there something similar online?
Thanks
You could create a dropdown menu where the left value is the SugarCRM Field name and the right value is the Webservice field name. Then direct users/system administrator to modify this dropdown in the Dropdown Editor, which has a nice and easy interface.
The plugin can then access this menu as a key => value array with $GLOBALS['app_list_strings']['my_list_name']
Alternatively, you can create your own configuration page if you want to develop a custom interface for this. A starting point for that might be this article, although it was written with SugarCRM 6 in mind: http://www.profilingsolutions.com/archive/quick-configuration-pages/
The configuration page would write to the Configurator (stored in config_override.php), as Antonio Musarra pointed out.
Either way, a caveat you'll encounter is that users will mistype field names. You'll need some sort of validation in your webservice call to ensure that all fields actually exist within the web server and within SugarCRM.