Username & Password in Order notification email

  • Posts: 171
  • Thank you received: 9
10 years 7 months ago #150020

Hi!

I wanna add the user's username and password to the Order notification email. Also it's not a problem if it's shown to the vendor as well.
Tried to use the "User account" email's php lines, but do not shows data.

Any help would be appriciated!
Thanks,
PePe

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

  • Posts: 82726
  • Thank you received: 13342
  • MODERATOR
10 years 7 months ago #150023

You can add such code:
<?php echo $data->cart->customer->username; ?>
<?php echo $data->cart->customer->password; ?>

in the emails that you can edit via the menu System>Emails.

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

  • Posts: 171
  • Thank you received: 9
10 years 7 months ago #150094

Seems OK, but password is shown - I think - encoded.

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

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
10 years 7 months ago #150125

Hi,

Yes the passwords are encoded, it is the Joomla stuff.

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: 171
  • Thank you received: 9
10 years 6 months ago #153468

OK,clear.

What about with vendors in Hikamarket?
Do we able to add the vendor's username in market.order_status_notification email ?

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

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
10 years 6 months ago #153474

Hi,

In HikaMarket 1.4.0 it will be easier to do that.
www.hikashop.com/support/documentation/1...arket-changelog.html

The email "vendor order status notification" now give you the vendor data in the template part.

So you will be able to use " {VAR:vendor.vendor_name} " in the email to display the vendor name.

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.
Last edit: 10 years 6 months ago by Jerome. Reason: fix {Var:...}

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

  • Posts: 171
  • Thank you received: 9
10 years 6 months ago #153522

It's gonna be great.

Till release, is there a way to translate it, maybe via email's php lines?

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

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
10 years 6 months ago #153589

Hi,

In the HikaMarket "order_status_notification preload", you have to add the "vendor" in the vars.

$vars = array(
	'LIVE_SITE' => HIKASHOP_LIVE,
	'URL' => $order_url,
	'ORDER_PRODUCT_CODE' => (bool)$shopConfig->get('show_product_code', false),
	'order' => $data->cart,
	'billing_address' => @$data->cart->billing_address,
	'shipping_address' => @$data->cart->shipping_address,
	'vendor' => $data->vendor
);
So you will be able to use the VAR in the template part : {VAR:vendor.vendor_name}

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: 171
  • Thank you received: 9
10 years 3 months ago #163643

Jerome wrote: Hi,

In the HikaMarket "order_status_notification preload", you have to add the "vendor" in the vars.

$vars = array(
	'LIVE_SITE' => HIKASHOP_LIVE,
	'URL' => $order_url,
	'ORDER_PRODUCT_CODE' => (bool)$shopConfig->get('show_product_code', false),
	'order' => $data->cart,
	'billing_address' => @$data->cart->billing_address,
	'shipping_address' => @$data->cart->shipping_address,
	'vendor' => $data->vendor
);
So you will be able to use the VAR in the template part : {VAR:vendor.vendor_name}

Regards,


As I see from database, just vendor's name can be shown in that format, but I need vendor's username. Is there any way to do that?

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

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
10 years 3 months ago #163647

Hi,

The vendor does not have a username. The users have.
If you want to display the username of the administrator of the vendor, you will have to load the admin.

$userClass = hikamarket::get('shop.class.user');
$admin = $userClass->get( $vendor->vendor_admin_id );

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.
The following user(s) said Thank You: pepecortez

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

  • Posts: 171
  • Thank you received: 9
10 years 3 months ago #164294

Jerome wrote: Hi,

The vendor does not have a username. The users have.
If you want to display the username of the administrator of the vendor, you will have to load the admin.

$userClass = hikamarket::get('shop.class.user');
$admin = $userClass->get( $vendor->vendor_admin_id );

Regards,


Thanks, with this I've loaded the admin. OK.
But how to display the vendor admin's username with your code exactly, as my tries were unfortunately not successfull...

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

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
10 years 3 months ago #164297

Hi,

You have to add the $admin in the variables in the preload (like the vendor, order, shipping_address...)
Then in the email you can display an element of the object, using : {admin.username}

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: 171
  • Thank you received: 9
10 years 3 months ago #164358

Jerome wrote: Hi,

You have to add the $admin in the variables in the preload (like the vendor, order, shipping_address...)
Then in the email you can display an element of the object, using : {admin.username}

Regards,


OK, I finally found the problem. The correct use is:
$userClass = hikamarket::get('shop.class.user');
$admin = $userClass->get($data->vendor->vendor_admin_id);

then in vars add this plus:
$vars = array(
    'admin' => $admin
);

Finally you can call the vendor's admin username in HTML part by this:
{VAR:admin.username}

The following user(s) said Thank You: Jerome

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

Time to create page: 0.065 seconds
Powered by Kunena Forum