Unwanted text in email confirmation

  • Posts: 9
  • Thank you received: 0
13 years 11 months ago #2498

When testing my site I noticed that the first line of the confirmation email, below the customer's name, includes a URL which is surely not necessary.

For example:

We are pleased to confirm the creation of your order No. B2F8 ( thulutess.com/index.php?option=com_hikas...=order&task=show&cid []=28 ) at thulutess.com/ on the 28 November 2010 at 18:18


Can this be removed?

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
13 years 11 months ago #2499

Yes. You can go in the configuration under the languages tab and edit your translation file. There, you will be able to change that text to your liking.

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

  • Posts: 9
  • Thank you received: 0
13 years 11 months ago #2567

It's not quite so straightforward. The entire string

B2F8 ( thulutess.com/index.php?option=com_hikas...=order&task=show&cid []=32 )

is shown as %s. There are several occurrences of

%s

:

We are pleased to confirm the creation of your order No. %s at %s on the %s at %s


It's beginning to look like one needs to be an expert at PHP to customize this component? It is a really nice component and it shows a lot of promise, but it is evidently not for those who don't want to hack code.

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
13 years 11 months ago #2570

Customization is always a trade off. Sure, if you want to do customize something precisely to your needs you might have to change one or two lines of php here and there. But HikaShop already allows you to customize a lot of things without having to see a line of PHP. And for the rest we provide an interface for it which will keep your modifications after updates, unlike other cart where you will loose your modifications each time you update.

The order number and the link to the order is indeed displayed by the same %s variable in the translation. If you want to remove just the link, you will have to edit the email file. That can be done in the menu System->Emails. There, by editing the order creation notification email you will be able to change the code

$url = $data->order_number.' ( '.$data->order_url.' )';
to
$url = $data->order_number;
Emails customization is only available with the Business version of HikaShop.

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

  • Posts: 392
  • Thank you received: 0
13 years 3 months ago #24061

Hi Nicolas,

Does this work for all the links in all the emails? My email confirmations are showing https and I would like them to show http instead.

Is there an easy way to just change the website url?

Thanks! :)

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
13 years 3 months ago #24071

You can add that line after the first <?php tag of your emails:

$data->order_url = str_replace('https://','http://',$data->order_url);

Last edit: 13 years 3 months ago by nicolas.

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

  • Posts: 392
  • Thank you received: 0
13 years 3 months ago #24075

Thanks Nicolas :)

Is it after the pink one, or the blue one?

<?php
/**
* @package HikaShop for Joomla!
* @version 1.5.3
* @author hikashop.com
* @copyright (C) 2010-2011 HIKARI SOFTWARE. All rights reserved.
* @license www.hikashop.com/commercial_license.php
*/
defined('_JEXEC') or die('Restricted access');
?>
<div style="background-color: #ffffff; font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px; color: #000000; width: 100%;">
<table style="margin: auto;font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td>
<?php echo JText::sprintf('HI_CUSTOMER',@$data->customer->name);?>
<br/>
<br/>
<?php
$url = $data->order_number;
$config =& hikashop_config();
if($config->get('simplified_registration',0)!=2){
$url .= ' ( '.$data->order_url.' )';

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
13 years 3 months ago #24093

It doesn't matter.

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

  • Posts: 392
  • Thank you received: 0
13 years 3 months ago #24141

Hi Nicolas,

I have tried placing the code in a few different spots, and it doesn't seem to be making any changes...

Thanks :)

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
13 years 3 months ago #24142

Mmm. The code didn't display properly because of the forum parsing screwed it. I've fixed it.

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

  • Posts: 392
  • Thank you received: 0
13 years 3 months ago #24145

Yeah it worked! :woohoo:

SSL redirect to the rescue :)

Last edit: 13 years 3 months ago by Bugger101.

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

Time to create page: 0.095 seconds
Powered by Kunena Forum