Sender Information shall be the customers

  • Posts: 108
  • Thank you received: 4
  • Hikashop Business
10 years 11 months ago #134970

-- url of the page with the problem -- : www.waffenmarti.ch/shop
-- HikaShop version -- : HikaShop [1308241414] /
-- Joomla version -- : 2.5.14
-- PHP version -- : 5.3.27
-- Browser(s) name and version -- : 31.0.1650.57 (Official Build 235101)
-- Error-message(debug-mod must be tuned on) -- : None

Hello there

I would like to change the Sender Information of the Contact Request EMail.
The problem is, that in Thunderbird, the "From" is always our own name (Marti Waffen AG 6340 Baar). In the EMail, there is the friendly name and the email from the customer. It would be nice, if there is not stand "Marti Waffen AG 6340 Baar" in the "From" Field, but the customers friendly Name an EMail Adress.

I tried to change the "Sender Information" under Hika-Shop Menu "System / EMails" but what can I write there so that the system places the customers information into that fields?

The customers address in the EMail-Body is nice, but not sufficient.

My boss is going crazy when he searches an EMail because he alsways see his own name and not the Customers Name.
Best regards
Mike

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 11 months ago #135058

Hi,

You can edit the mail "A contact request has been made", then in the "preload" part thanks to add the code:

$mail->from_name = $data->element->name;
$mail->from_email = $data->element->email;

The following user(s) said Thank You: mike

Please Log in or Create an account to join the conversation.

  • Posts: 108
  • Thank you received: 4
  • Hikashop Business
10 years 11 months ago #135064

Hello Xavier

Thank you very much for that input.

I think I'm using V. 2.2.1 (HikaShop [1308241414]) and I'm looking for the "preload" part. What is the "preload" part? Maybe the problem is, that i'm using the old version of hikashop?

Best regards
Mike

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 11 months ago #135200

For old versions of HikaShop, you can edit directly the main email file and add <?php and ?> tags around the code that you add.

Please Log in or Create an account to join the conversation.

  • Posts: 108
  • Thank you received: 4
  • Hikashop Business
10 years 11 months ago #135724

Hello Nicolas

I tried it out, but it seems that it will not work. I wrote into the Sender Information the following things (please see my-changes.jpg).

After i pressed "Save" my changes where gone.

Don't know what I did wrong.

Best regards
Mike

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 11 months ago #135758

Hi,
Can you try it by adding this code through the "HTML version" section ?

Please Log in or Create an account to join the conversation.

  • Posts: 108
  • Thank you received: 4
  • Hikashop Business
10 years 11 months ago #135763

Hmm, I don't know what you mean :(

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 11 months ago #135885

Hi,

Thanks to update your HikaShop version, and then make the changes in the preload part as previously asked.
Or put the code given between php tags in the HTML part, not in the input for the sender informations, but in the textarea which contains the email data.

Please Log in or Create an account to join the conversation.

  • Posts: 108
  • Thank you received: 4
  • Hikashop Business
10 years 6 months ago #154536

Hello there

It's a long time since last time but I managed to update our shop and I also managed it to get a little bit time to try out what you send me here as suggestion :)

I tried to add the code above into the preload section like this:

<?php
/**
 * @package  HikaShop for Joomla!
 * @version  2.3.0
 * @author  hikashop.com
 * @copyright  (C) 2010-2014 HIKARI SOFTWARE. All rights reserved.
 * @license  GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php

$mail->from_name = $data->element->name;
$mail->from_email = $data->element->email;

...

I also tried to add the code to the HTML-Section like this:
<?php
/**
 * @package  HikaShop for Joomla!
 * @version  2.3.0
 * @author  hikashop.com
 * @copyright  (C) 2010-2014 HIKARI SOFTWARE. All rights reserved.
 * @license  GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');

$mail->from_name = $data->element->name;
$mail->from_email = $data->element->email;

?><style type="text/css">
body.hikashop_mail { background-color:#ffffff; color:#575757; }
.ReadMsgBody{width:100%;}
.ExternalClass{width:100%;}
...

I also tried to write in the Tab "Sender Information" as:
"From Name" -> $data->element->name
"From Address" -> $data->element->email

I also tried to wrap that into a PHP-Section like this:
"From Name" -> <?php $data->element->name; ?>
"From Address" -> <?php $data->element->email; ?>

Nothing seems to work... The Sender Friendly Name and Address is still "MARTI Waffen AG" with it's email adress.

What do I do wrong? :(
Best regards
Mike

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 6 months ago #156575

Hi,

Could you summarize you problem ? :)
In which email you need to change the from name and email informations ?

Setting a value thanks to:

$mail->from_name = 'name';
$mail->from_email = 'email@email.com';
in the preload part of the email should work.

ps: 2.3.1 is available on our website.

Please Log in or Create an account to join the conversation.

  • Posts: 108
  • Thank you received: 4
  • Hikashop Business
10 years 6 months ago #156631

Hello Xavier

Okay, I'll try ;)
The main problem is, that in the EMail-Client all EMails that are sent via our product pages (Ask a question about this product) has as "sender name" our company EMail-Adress as you can see a screenshoot from Thunderbird here:
hikashop.com/media/kunena/attachments/8167/h561a80a.JPG the "From" is "MARTI Waffen AG 6340 Baar" which is our company.

What I would like todo is to have there in the "From"-Column in our EMail-Client NOT our own name. I want to have the customers Name and EMail-Address. This makes it a lot easier to SEARCH / LOOK for EMails.

All solutions in this Thread i tried without success and i don't know why :(
Best regards
Michael

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 6 months ago #156956

Hi,

As a temporary solution, thanks to edit the file "components/com_hikashop/controllers/product.php", function "send_email()", replace:

			$mail = $mailClass->get('contact_request',$infos);
			$mail->subject = $subject;
			$mail->from_email = $config->get('from_email');
			$mail->from_name = $config->get('from_name');
			$mail->reply_email = $element->email;
			$mail->dst_email = array($config->get('from_email'));
			$status = $mailClass->sendMail($mail);
By:
			$mail = $mailClass->get('contact_request',$infos);
			$mail->subject = $subject;
			$mail->from_email = $element->email;
			$mail->from_name = $element->name;
			$mail->reply_email = $element->email;
			$mail->dst_email = array($config->get('from_email'));
			$status = $mailClass->sendMail($mail);

Please Log in or Create an account to join the conversation.

Time to create page: 0.094 seconds
Powered by Kunena Forum