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

#   How to display content of discount.discount\_code

##

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

Less More

- Posts: 7
- Thank you received: 0
-
-

6 years 11 months ago -  6 years 11 months ago [\#313220](#313220) by [Aqualon](/forum/user/57667-aqualon "View Aqualon's Profile")  *[How to display content of discount.discount\_code](/forum/17-serial-how-to/898699-how-to-display-content-of-discount-discount-code#313220 "Hi there, we are trying to display the content of the following database field &quot;discount.discount&#95;code&quot; on a coupon. We used &quot;Dynamic text and added the following code {discount.discount&#95;code} but this seems not to work. Any suggestions how to solve this?  Kind regards Alex")* was created by *[Aqualon](/forum/user/57667-aqualon "View Aqualon's Profile")*

Hi there,
we are trying to display the content of the following database field "discount.discount_code" on a coupon. We used "Dynamic text and added the following code {discount.discount_code} but this seems not to work. Any suggestions how to solve this?

Kind regards
Alex

Last edit: 6 years 11 months ago by [Aqualon](/forum/user/57667-aqualon "View Aqualon's Profile").

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

6 years 11 months ago [\#313232](#313232) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[How to display content of discount.discount\_code](/forum/17-serial-how-to/898699-how-to-display-content-of-discount-discount-code#313232 "Hi there, we are trying to display the content of the following database field &quot;discount.discount&#95;code&quot; on a coupon. We used &quot;Dynamic text and added the following code {discount.discount&#95;code} but this seems not to work. Any suggestions how to solve this?  Kind regards Alex")*

Hello,

If that code is coming from the serial, you can just use the serial data.
If you want to get the code frmo the order, you can use the "order_discount_code" value.
Don't hesitate to use the dropdowns at the bottom of the editor to help you to know which fields are available.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

Less More

- Posts: 7
- Thank you received: 0
-
-

6 years 11 months ago -  6 years 11 months ago [\#313255](#313255) by [Aqualon](/forum/user/57667-aqualon "View Aqualon's Profile")  Replied by *[Aqualon](/forum/user/57667-aqualon "View Aqualon's Profile")* on topic *[How to display content of discount.discount\_code](/forum/17-serial-how-to/898699-how-to-display-content-of-discount-discount-code#313255 "Hi there, we are trying to display the content of the following database field &quot;discount.discount&#95;code&quot; on a coupon. We used &quot;Dynamic text and added the following code {discount.discount&#95;code} but this seems not to work. Any suggestions how to solve this?  Kind regards Alex")*

Hi Jerome,
first of all thank you for your answer. I know the dropdown fields and we allready use them to display order and serial data. In this case this does not help.

We use a percentage discount on one product per month. We want and need to print this (discount info) on the coupon. In this case there is no order_discount_code in the order table of the db. This value (name of the discount) is stored in the discount table -&gt; discount_code. Any suggestions how to get this value on the coupon?

Kind regards
Alex

Last edit: 6 years 11 months ago by [Aqualon](/forum/user/57667-aqualon "View Aqualon's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vODk4Njk5LWhvdy10by1kaXNwbGF5LWNvbnRlbnQtb2YtZGlzY291bnQtZGlzY291bnQtY29kZT90bXBsPW1hcmtkb3du) 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: 86541
- Thank you received: 14304
-
-

6 years 11 months ago [\#313259](#313259) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to display content of discount.discount\_code](/forum/17-serial-how-to/898699-how-to-display-content-of-discount-discount-code#313259 "Hi there, we are trying to display the content of the following database field &quot;discount.discount&#95;code&quot; on a coupon. We used &quot;Dynamic text and added the following code {discount.discount&#95;code} but this seems not to work. Any suggestions how to solve this?  Kind regards Alex")*

Hi,

The information of which discount was used on which product of an order is not stored in the database.
So be able to do that would require to add new columns to the hikashop_order_product table and modify the code creating the order to add the information there.
If necessary, it could be done as a custom plugin if you need a developer to work on that for you.
Or we could also work on that for you and include that directly in HikaShop. If interested, you can use our contact form and request a quote: [ www.hikashop.com/support/contact-us.html](https://www.hikashop.com/support/contact-us.html)
Make sure you include a link to this thread in your message.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vODk4Njk5LWhvdy10by1kaXNwbGF5LWNvbnRlbnQtb2YtZGlzY291bnQtZGlzY291bnQtY29kZT90bXBsPW1hcmtkb3du) 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?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

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

Time to create page: 0.053 seconds

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