Variables for customer mails

  • Posts: 3
  • Thank you received: 0
10 years 4 months ago #185937

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.36
-- Browser(s) name and version -- : All

Hi,

I'm customizing (coding) all the customer mails (order creation, order confirmation etc) and need the variables for order date and payment methode.

For the payment I have tried this code, but with no success:

<?php
$paymentClass = hikashop::get('class.payment');
$payment = $paymentClass->get($data->order_payment_id);

echo $payment->payment_name; ?><

Can you deliver the variables for ORDER DATE and PAYMENT METHOD?


Regards,
Michael Sønderup Nielsen
web: www.joomlakonsulenten.dk

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

  • Posts: 83832
  • Thank you received: 13572
  • MODERATOR
10 years 4 months ago #185945

Hi,

Sometimes the data is in $data->cart instead of $data so try like that:

<?php
$paymentClass = hikashop::get('class.payment');
$payment = $paymentClass->get($data->cart->order_payment_id);

echo $payment->payment_name; ?>
Because the rest of the code looks good to me.
For the date, it's like this:
<?php echo hikashop_getDate($data->cart->order_created); ?>

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

  • Posts: 3
  • Thank you received: 0
10 years 4 months ago #186038

Hi Nicolas,

The date I got right.

But the payment method is stil missing in the mail?


Regards,
Michael Sønderup Nielsen
web: www.joomlakonsulenten.dk

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

  • Posts: 83832
  • Thank you received: 13572
  • MODERATOR
10 years 4 months ago #186041

Hi,

I checked your website and I can see that you removed the name of the payment method for two of your payment methods:
take.ms/J4SDw
That probably explains why you don't see anything...It works but there is just nothing to display.

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

  • Posts: 3
  • Thank you received: 0
10 years 4 months ago #186154

DOH!!! :blush:

Thanks for pointing that out. :)


Regards,
Michael Sønderup Nielsen
web: www.joomlakonsulenten.dk

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

Time to create page: 0.061 seconds
Powered by Kunena Forum