[Skip to main content](#vessel-content)

#   Add expiry date to email

##

- **[mad-q](/forum/user/4784-mad-q "View mad-q's Profile")**
- [![mad-q's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4784-mad-q "View mad-q's Profile") Topic Author
- [ Offline](/forum/user/4784-mad-q)

Less More

- Posts: 234
- Thank you received: 4
-
-

10 years 10 months ago [\#228014](#228014) by [mad-q](/forum/user/4784-mad-q "View mad-q's Profile")  *[Add expiry date to email](/forum/27-checkout/881933-add-expiry-date-to-email#228014 "-- HikaShop version -- : 2.5.28 -- Joomla version -- : 2.5  Hello  How can I add the expiry date to the emails we receive when people place an order? I have tried the code echo &quot;&#92;r&#92;n&quot;.JText::&#95;('expiry&#95;date').' : '.$data-&gt;expiry&#95;date-&gt;expiry&#95;date;  but it hasn't worked.  Many thanks Iain")* was created by *[mad-q](/forum/user/4784-mad-q "View mad-q's Profile")*

-- HikaShop version -- : 2.5.28
-- Joomla version -- : 2.5

Hello

How can I add the expiry date to the emails we receive when people place an order? I have tried the code
echo "\r\n".JText::_('expiry_date').' : '.$data-&gt;expiry_date-&gt;expiry_date;

but it hasn't worked.

Many thanks
Iain

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4MTkzMy1hZGQtZXhwaXJ5LWRhdGUtdG8tZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

10 years 10 months ago [\#228020](#228020) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Add expiry date to email](/forum/27-checkout/881933-add-expiry-date-to-email#228020 "-- HikaShop version -- : 2.5.28 -- Joomla version -- : 2.5  Hello  How can I add the expiry date to the emails we receive when people place an order? I have tried the code echo &quot;&#92;r&#92;n&quot;.JText::&#95;('expiry&#95;date').' : '.$data-&gt;expiry&#95;date-&gt;expiry&#95;date;  but it hasn't worked.  Many thanks Iain")*

Hello Iain,
Firstly, can you tell me some screenshots of how you have configured your expiry date custom field via "Hikashop-&gt;Display-&gt;Custom Fields" ?
Thank you.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4MTkzMy1hZGQtZXhwaXJ5LWRhdGUtdG8tZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mad-q](/forum/user/4784-mad-q "View mad-q's Profile")**
- [![mad-q's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4784-mad-q "View mad-q's Profile") Topic Author
- [ Offline](/forum/user/4784-mad-q)

Less More

- Posts: 234
- Thank you received: 4
-
-

10 years 9 months ago [\#228124](#228124) by [mad-q](/forum/user/4784-mad-q "View mad-q's Profile")  Replied by *[mad-q](/forum/user/4784-mad-q "View mad-q's Profile")* on topic *[Add expiry date to email](/forum/27-checkout/881933-add-expiry-date-to-email#228124 "-- HikaShop version -- : 2.5.28 -- Joomla version -- : 2.5  Hello  How can I add the expiry date to the emails we receive when people place an order? I have tried the code echo &quot;&#92;r&#92;n&quot;.JText::&#95;('expiry&#95;date').' : '.$data-&gt;expiry&#95;date-&gt;expiry&#95;date;  but it hasn't worked.  Many thanks Iain")*

Morning

I haven't set it up in the Custom Fields, this is from the payment plug in and calling it within the System&gt;Emails section.

Cheers
Iain

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4MTkzMy1hZGQtZXhwaXJ5LWRhdGUtdG8tZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

10 years 9 months ago [\#228131](#228131) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Add expiry date to email](/forum/27-checkout/881933-add-expiry-date-to-email#228131 "-- HikaShop version -- : 2.5.28 -- Joomla version -- : 2.5  Hello  How can I add the expiry date to the emails we receive when people place an order? I have tried the code echo &quot;&#92;r&#92;n&quot;.JText::&#95;('expiry&#95;date').' : '.$data-&gt;expiry&#95;date-&gt;expiry&#95;date;  but it hasn't worked.  Many thanks Iain")*

Hi,

The $data PHP object contain only elements of the order, so it contains the payment methods.
In the preload part of the email we get all the payment method params, so if the expiry date is stored in the payment params you can get them from the PHP object $payment-&gt;payment_params.

But I am not sure that the expiry date will be stored there.

Else as Mohamed Thelji said, you can use a custom order field, set the expiry date there and that way you can display it in the email thanks to the code: $data-&gt;cart-&gt;customfield_name

So basically it require PHP knowledges and you have to know exactly how the expiry date is set.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4MTkzMy1hZGQtZXhwaXJ5LWRhdGUtdG8tZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mad-q](/forum/user/4784-mad-q "View mad-q's Profile")**
- [![mad-q's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4784-mad-q "View mad-q's Profile") Topic Author
- [ Offline](/forum/user/4784-mad-q)

Less More

- Posts: 234
- Thank you received: 4
-
-

10 years 9 months ago [\#228389](#228389) by [mad-q](/forum/user/4784-mad-q "View mad-q's Profile")  Replied by *[mad-q](/forum/user/4784-mad-q "View mad-q's Profile")* on topic *[Add expiry date to email](/forum/27-checkout/881933-add-expiry-date-to-email#228389 "-- HikaShop version -- : 2.5.28 -- Joomla version -- : 2.5  Hello  How can I add the expiry date to the emails we receive when people place an order? I have tried the code echo &quot;&#92;r&#92;n&quot;.JText::&#95;('expiry&#95;date').' : '.$data-&gt;expiry&#95;date-&gt;expiry&#95;date;  but it hasn't worked.  Many thanks Iain")*

Hello
Thank you for your reply. I don't fully understand. I do not want to create a custom field as this will not be within the credit card plugin? Unless you can help me create one. I have managed to get the title to show within the email "Expiry Date :" however it doesn't actually display the date.

Xavier, when you say i can get the payment params from $payment-&gt;payment_params. Can you please explain how to do that. What would be great would be to have a list of commands and what they returned so that I could add / remove ones without troubling you guys.

Once again, many thanks
Iain

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4MTkzMy1hZGQtZXhwaXJ5LWRhdGUtdG8tZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

10 years 9 months ago [\#228408](#228408) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add expiry date to email](/forum/27-checkout/881933-add-expiry-date-to-email#228408 "-- HikaShop version -- : 2.5.28 -- Joomla version -- : 2.5  Hello  How can I add the expiry date to the emails we receive when people place an order? I have tried the code echo &quot;&#92;r&#92;n&quot;.JText::&#95;('expiry&#95;date').' : '.$data-&gt;expiry&#95;date-&gt;expiry&#95;date;  but it hasn't worked.  Many thanks Iain")*

Hi,

What I can see here is that both Xavier and you don't understand what the other is talking about.

Xavier thinks that you're talking about a payment gateway which would return the credit card data after the payment and so you would have to modify the code of the plugin to store the credit card data in order to then display it in the email.

From what I understand, it seems that you're actually not using a payment gateway but the "credit card" collect payment plugin which stores half of the credit card data in the order and send the other half in the order administrator notification email.
In that case, it's quite easy to add the date of the credit card in the email.
Just add such code in the HTML version:
&lt;?php echo $data-&gt;credit_card_info-&gt;cc_year.'/'.$data-&gt;credit_card_info-&gt;cc_month; ?&gt;

PS: make sure that you specify what you're talking about precisely in your messages (with screenshots if possible). That way, we can directly answer you with the answer you're looking for.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4MTkzMy1hZGQtZXhwaXJ5LWRhdGUtdG8tZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mad-q](/forum/user/4784-mad-q "View mad-q's Profile")**
- [![mad-q's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4784-mad-q "View mad-q's Profile") Topic Author
- [ Offline](/forum/user/4784-mad-q)

Less More

- Posts: 234
- Thank you received: 4
-
-

10 years 9 months ago [\#228514](#228514) by [mad-q](/forum/user/4784-mad-q "View mad-q's Profile")  Replied by *[mad-q](/forum/user/4784-mad-q "View mad-q's Profile")* on topic *[Add expiry date to email](/forum/27-checkout/881933-add-expiry-date-to-email#228514 "-- HikaShop version -- : 2.5.28 -- Joomla version -- : 2.5  Hello  How can I add the expiry date to the emails we receive when people place an order? I have tried the code echo &quot;&#92;r&#92;n&quot;.JText::&#95;('expiry&#95;date').' : '.$data-&gt;expiry&#95;date-&gt;expiry&#95;date;  but it hasn't worked.  Many thanks Iain")*

Hi Guys

Thanks for that, I am using the "Credit Card" payment plugin and with a bit of adjustment I have the expiry date. Here is the code I used

echo "&lt;br/&gt;".JText::_('EXPIRY_DATE').' : '; echo $data-&gt;credit_card_info-&gt;cc_year.'/'.$data-&gt;credit_card_info-&gt;cc_month;

Once again, many thanks
Iain

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4MTkzMy1hZGQtZXhwaXJ5LWRhdGUtdG8tZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.063 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
