How to add Register custom fields forms to display

  • Posts: 13
  • Thank you received: 0
9 years 5 days ago #221114

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.6.13
-- Browser(s) name and version -- : Chrome

How to add Register custom fields forms to display on User account administrator notification email
so we can tell the difference between a wholesaler register and a RRP user.
i have tried your forums but cannot seem to get the right code for it to happen.
i want it to display: I want to become a reseller on the email notification..
with additional information that i have on the custom fields. Your help would be much appreciated.

Last edit: 9 years 5 days ago by snpspandc.

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

  • Posts: 13
  • Thank you received: 0
9 years 5 days ago #221133

Anyone.. :dry:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 5 days ago #221117

Hi,

Please provide a screenshot of the settings of your custom field.
Based on its settings the code to use will be different.

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

  • Posts: 13
  • Thank you received: 0
9 years 3 days ago #221403

Hi Nicolas, Thank You for your quick response please find the attached.
Could you please provide an example?

Attachments:
Last edit: 9 years 3 days ago by snpspandc.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 2 days ago #221446

Hi,

Please provide a screenshot of the settings of your custom field.
Based on its settings the code to use will be different.

I don't see any screenshot for your custom field setting ; but hopefully, your second screenshot gave enough details.
Next time, please provide the exact information that we're asking you ; nothing more, nothing less.

To display the address custom field with the column name "business_details", you can use that code :
$data->address_data->business_details

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: 25
  • Thank you received: 1
8 years 9 months ago #229304

Hello as I can do to make the data in this field is added to the notice of the administrator?
Capture Fronted
Capture backend
Capture Notification to the administrator user account

Last edit: 8 years 9 months ago by liontv.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 9 months ago #229313

Hi,

The tags in the email can only be used with you have a corresponding "preload" in your email.
That "preload" will initialize the variables so you can then use them in the "HTML" or "Text" part.
Because the "user_account_admin_notification" do not have any preload, you can't use tags.

Please use instead some PHP

<?php
echo $data->user->codigopostal;
?>

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: 25
  • Thank you received: 1
8 years 9 months ago #229385

forgives not control much of php, I need only add that field to know where they come from my users before they buy.

I wrote as it as you coment, but it doens´t do not work your code.
I have to add something else?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 9 months ago #229390

Hi,

Try like this instead:
<?php
echo $data->codigopostal;
?>

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

  • Posts: 25
  • Thank you received: 1
8 years 9 months ago #229494

hi thanks for your time
The code does not work.

<?php
/**
* @package HikaShop for Joomla!
* @version 2.6.0
* @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');
?>


<?php
echo $data->codigopostal;
?>


<?php
echo JText::sprintf(
'HIKA_USER_ACCOUNT_ADMIN_NOTIFICATION_BODY',
$data->name,
$data->username,
$data->user->codigopostal,
HIKASHOP_LIVE
);

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 9 months ago #229507

Hi,

Sorry, try like that:
<?php
echo $data->user_data->codigopostal;
?>

The following user(s) said Thank You: liontv

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

  • Posts: 25
  • Thank you received: 1
8 years 9 months ago #229555

Thank you very much @Nicolas. Your solve small dose of happiness. :silly: :woohoo:

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

  • Posts: 964
  • Thank you received: 11
  • Hikashop Business
6 years 3 months ago #296752

This listing is over two years old now - just want to know if it still works in the most recent copy of Hikashowp and if the below is the correct format for city and the country?

<?php
echo str_replace('<br/>',"\n",JText::sprintf(
'HIKA_USER_ACCOUNT_ADMIN_NOTIFICATION_BODY',
$data->name,
$data->username,
$data->user_data->city;
$data->user_data->country;
HIKASHOP_LIVE
));

Thanks!

Last edit: 6 years 3 months ago by MyWorld.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 3 months ago #296754

Hello,

No, "codigopostal" is a user custom field in the other website.
You have to use your own user custom field (or address custom fields).

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.

Time to create page: 0.096 seconds
Powered by Kunena Forum