Magento 1.9: Extensión Wishlist admin email, traducir a español y arreglar precios

Puede que nos interese conocer qué productos han añadido nuestros clientes a su wishlist. Para ello, existe una extensión (gratuita) que funciona con Magento 1.9, llamada Wishlist Admin Email.

Esta extensión funciona muy bien, pero tiene dos pegas:
1) Cuando envía el email de la wishlist, el precio que muestra en los productos es el precio SIN IMPUESTOS. Para corregirlo y que muestre el precio con impuestos, debemos editar el fichero app/design/frontend/base/default/template/me/wlae/email/items.phtml y modificar el cálculo del precio.


<?php echo $coreHelper->formatPrice($_product->getFinalPrice()); ?>


<!-- modifico para que salga el precio con impuestos -->
<!--<?php echo $coreHelper->formatPrice($_product->getFinalPrice()); ?>-->
$_priceIncludingTax = Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice());
echo $_priceIncludingTax;

2) El email se envía en inglés. Aunque no es muy trascendente, puesto que solo el administrador recibe estos emails (y NO los reciben clientes) es interesante saber cómo traducir la plantilla.

Para añadir el fichero de traducciones, vamos a app/locale/es_ES y subimos el fichero con las traducciones (Me_Wlae.csv) con el siguiente contenido:

"Wishlist Admin Email","Wishlist Admin Email"
"Enable Extension","Habilitar extension"
"Enable Extension.","Deshabilitar extension."
"Email Options","Opciones de email"
"Email Wishlist Items","Enviar items de wishlist"
"Send Only Newly Added","Enviar solo los nuevos"
"Send Entire Wishlist","Enviar wishlist completa"
"Please select to send only the recently added item, or the whole wishlist. In the second option the newly added item will be marked.","Por favor seleccione si enviar solo los items nuevos o la wishlist completa. En la segunda opcion se marcaran los productos nuevos."
"Send Emails To","Enviar emails a"
"Please enter the email address where notification will be sent.","Introduzca la direccion de email a la que llegaran las notificaciones."
"Send BCC Emails To","Enviar BCC a"
"Please enter the bcc copy email address where notification will be also sent.","Por favor introduce la direccion de email a la que se enviara copia de la notificacion."
"Email Sender","Email Sender"
"Please select the email sender from store email addresses.","Por favor, seleccione un sender de la lista de emails."
"Email Template","Plantilla Email"
"Please select the custom email template or use the default.","Por favor seleccione la plantilla custom de email o utilice la defecto."
"Email Items Setting","Ajustes basicos de email"
"Email Basic Setting","Ajuste basico email"

Asi nos quedaría, ya traducido, el panel de Admin del módulo (System > Config > Admin Wishlist Email)

magevolve-wishlist admin email traducido

Además hay que modificar el fichero app/locale/es_ES/template/email/me_wlae_notification.html y ponerle éste contenido:

<!--@subject {{var store.getFrontendName()}}: Wishlist Admin Notification @-->
{"store url=\"\"":"Store Url",
"var logo_url":"Email Logo Image Url",
"var logo_alt":"Email Logo Image Alt",
"var customer_name":"Customer Name",
"var customer_email":"Customer Email",
"var items":"Items",
"var store.getFrontendName()":"Store Name"}
body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
<body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
<div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
    <table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
            <td align="center" valign="top" style="padding:20px 0 20px 0">
                <!-- [ header starts here] -->
                <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
                        <td valign="top"><a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
                    <!-- [ middle starts here] -->
                        <td valign="top">
                            <h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;">Notificación de wishlist</h1>
                            <p style="font-size:12px; line-height:16px; margin:0 0 16px 0;">Nuevo producto en wishlist...</p>
                            <p style="font-size:12px; line-height:16px; margin:0 0 16px 0;">
                                <strong>Detalles:</strong><br /><br />
                                Nombre cliente: {{var customer_name}}<br />
                                Email cliente: {{var customer_email}}
                            {{var items}}
                        <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;"><strong>{{var store.getFrontendName()}}</strong></p></center></td>

Después vaciamos la cache y ¡listo!

Asi quedaría el email que recibe el admin…
magevolve admin wishlist email including taxes

Translate “Contact form” module Drupal [SOLVED]

The crappy way

Delete the “additional information” text in admin/build/contact/settings

The easy way

Just download tContact module, and add these lines to your settings.php file.

$conf['i18n_variables'][] = 'contact_form_information';
$conf['i18n_variables'][] = 'contactforms_information';

The hard way

After hours of research, I’ve finally come up with a default core solution that I’d like to share with everyone on how to translate the Contact form module that comes with Drupal in Drupal 6.x.

Basic Instructions:

Make sure your Contact form module is enabled first, of course.

Go to drupal\modules\contact and open the file
Go to line 41.

Replace the code…

$form[‘contact_information’] = array(‘#value’ => filter_xss_admin(variable_get(‘contact_form_information’, t(‘You can leave a message using the contact form below.’))));


$form[‘contact_information’] = array(‘#value’ => t(filter_xss_admin(variable_get(‘contact_form_information’, ‘You can leave a message using the contact form below.’))));

Once replaced, save the page.
Next, install the module String Overrides.
Once installed, go to the String Overrides main page on your Drupal site under admin/settings/stringoverrides and click on the preferred language you would like to translate your contact form text to.
Make sure you originally replace “Contact” with the appropriate translation for “Contact” under your preferred language, and also for the text “You can leave a message using the contact form below.” Keep in mind that if you have changed that text, then you should translate the text that you changed it to instead.

After all this has been done, you’ll have a sweet translated contact form.

Refer to this link and this other for further details.

CDS Invenio: translate interface with po and gmo libraries

The steps you must follow in order to translate the CDS Invenio interface are:

1. Go to where the sources of CDS were unziped. In my case:

cd /home/cdsadmin/cds-invenio-0.99.1/po

2. We want to add a few words to the spanish translation. So search for the es.po file and the word you want to translate. You must also DELETE the fuzzy comment.
For instance, this is what we found in es.po:

#: modules/websearch/lib/
#, fuzzy
msgid “Discussion”
msgstr “”/

And here is the changed es.po:

#: modules/websearch/lib/
msgid “Discussion”
msgstr “Discusión”/

3. Compile with:

make; make install

4. Update invenio files and restart apache:

inveniocfg --update-all; /etc/init.d/httpd restart