fields available in emails

  • Posts: 33
  • Thank you received: 0
10 years 11 months ago #23980

Busy with customizing the email reply's.

Managed to change it radically but missing a few fields I would like to use.

- payment methods. For shipping all is available in the $cart array but for payment methods it is not.

- groups the user is belonging to so it is possible to create a message on the email about that. I understand that is Joomla itself, but is there an easy way to get that in the emails somehow?

thx again!

Last edit: 10 years 11 months ago by hko.

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

  • Posts: 76147
  • Thank you received: 11919
  • MODERATOR
10 years 11 months ago #23994

Payment method should also be available in $cart like shipping in the attribute order_payment_method

The groups of a user (in joomla >=1.6) ca be retrieved like that:
$my =& JFactory::getUser($id);
JAccess::getGroupsByUser($my->id, false);

Note that this will give only the ids.

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

  • Posts: 33
  • Thank you received: 0
10 years 11 months ago #24009

Hi Nicolas, thx for the fast reply again!

I double checked again on the $data->cart for payment info but can just find two entries in there ($data->order_payment_id and $data->order_payment_method) where as the shipping info is far more complete.

I would like to use the payment_name like there is the shipping_name (which is in $data->cart->shipping, but there is no $data->cart->payment).
Is that correct or do I simply overlook something here?

thx in advance!

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

  • Posts: 76147
  • Thank you received: 11919
  • MODERATOR
10 years 11 months ago #24020

You can get the payment_name information like that:
$paymentClass = hikashop::get('class.payment');
$payment = $paymentClass->get($data->order_payment_id);

echo $payment->payment_name;

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

  • Posts: 33
  • Thank you received: 0
10 years 11 months ago #24032

Fantastic, just what I was looking for!

is there an overview of the available hikashop::Get classes somewhere? That would save you a couple of emails I guess... would be nice if that was added to the developer page section or so.

thx again.

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

  • Posts: 76147
  • Thank you received: 11919
  • MODERATOR
10 years 11 months ago #24034

The classes are all in the folder administrator/components/com_hikashop/classes
There is no documentation for it. The classes will continue to change while we add more features in HikaShop so you shouldn't rely too much on them. The only things which won't change are the things that we publish in the developer's documentation.

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

Time to create page: 0.070 seconds
Powered by Kunena Forum