Adding custom field to emails

  • Posts: 24
  • Thank you received: 0
9 years 9 months ago #190226

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 2.5.22
-- PHP version -- : 4.3
-- Browser(s) name and version -- : chorome- 40.0.2214.111 m

Hi,
I need to show all user information on "Adding custom order field to emails
$data->address_company
$data->address_firstname
$data->address_lastname
$data->address_lastname
$data->address_city
$data->address_street
$data->address_telephone
but it's doesn't worked. I read all conversation in forum about this problems but i'm missing some thing or somebody delete solution from forum )).
by the way i need your help.
best regards.

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
9 years 9 months ago #190250

Hi,

It been several months (and several release) that we are using tags for the emails.
It will be easier for you, specially when you want to display an address custom fields, knowing that you have one billing and one shipping address ; so you need to indicate from which one you want to display your field !

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 24
  • Thank you received: 0
9 years 9 months ago #190267

Hi,
can you tell me what part of custom field i indicate? and to where?
can you give me an example ?

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

  • Posts: 24
  • Thank you received: 0
9 years 9 months ago #190344

Hi!
I think problem is hikashop registration form doesn't sync with joomla user profile.
i m using admin approval puling, confirmation mail sending from puling not hikashop.
admin approval puling use data from joomla user profile, so joomla user profil show only three details username and email.
I need to sync hikashop custom fields with joomla user profile.
Do you know any solution for this?

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
9 years 9 months ago #190320

Hi,

Edit the file address_template for both your frontend and backend template via the menu Display>Views and make sure that you have the tag of all the custom fields you want in there.

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

  • Posts: 24
  • Thank you received: 0
9 years 9 months ago #190421

Hi, Nicolas!
all tag in both adress_template files.What part of adress_template file i need to edite?

<?php
/**
* @package HikaShop for Joomla!
* @version 2.3.5
* @author hikashop.com
* @copyright (C) 2010-2015 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>{address_company}
{address_title} {address_firstname} {address_lastname}
{address_street}
{address_post_code} {address_city} {address_state}
{address_country}
<?php echo JText::sprintf('TELEPHONE_IN_ADDRESS','{address_telephone}');?>

and there is mail .php file wich i would like to see custom fields from hikashop registration form.
this mail sending to admin with approval link to approve user. But in this mail only name, e-mail adress and user name.
But i need to see more details about new users to confirm them accounts.
I hope to be able to tell you my promblem,
best regards.

<?php
defined('_JEXEC') or die('Restricted access');
?>

Hello Admin,<br/><br/>

A new user have been registered at your site.<br/>

He/She needs your approval to activate His/her account.<br/><br/>

His/her details are:<br/>
<?php foreach($vars as $key => $val):?>
<?php echo "$key : $val"."<br/>"; ?>
<?php endforeach;?>

<br/>You can approve user by clicking on Approval Link: <?php echo $vars?><br/>

(You are not required to login in website)
<?php

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
9 years 9 months ago #190507

Hi,

Ah ok, we didn't understand that you wanted to display the address data in the user account email. We thought that you wanted to add new address fields data in the address display of the order notifications emails sent after an order is made.

In that case, you'll have to add such code in the email code:

<?php foreach(get_object_vars($data->address_data) as $key => $val):?>
<?php echo "$key : $val"."<br/>"; ?>
<?php endforeach;?>

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

  • Posts: 24
  • Thank you received: 0
9 years 9 months ago #190713

Hi Nicolas,
Thanks for helping but it doesn't for for me.
because admin approval use joomla user profile. After registration user i see all custom fields clearly showing on ''hikashop user''
but the user manager joomla only showing user name and user name and e-mail.
So i think hikashop users and joomla user profile don't sync all details, only user name and name and e-mail.
İf i done sync allchikashop custom fields on joomla user profile i think it clearly work for me.
thank for help.

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
9 years 9 months ago #190727

Hi,

This modification in the HikaShop user account email is of course only for when you use the HikaShop registration form page, not the Joomla registration form page which uses its own system of fields and its own email. We cannot help in customizing this email.
But instead, I can give you an easy alternative:
Enable the plugin called "Redirect Joomla registration to HikaShop plugin" via the Joomla plugins manager so that the HikaShop registration form is used instead of the Joomla registration form. Then, there is no need to synchronize the Joomla fields with the HikaShop fields since you'll only use the HikaShop fields.

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

Time to create page: 0.075 seconds
Powered by Kunena Forum