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

#   Custom fields on discounts

##

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 3 months ago [\#20811](#20811) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  *[Custom fields on discounts](/forum/2-general-talk-about-hikashop/20811-custom-fields-on-discounts#20811 "In discussions I might have a potential use for a custom field on the discounts table.  Could this be added to the wishlist please.  Might be worth considering where else custom fields could be added - shipping, payments, tax, taxation - not that I have a use at the moment.")* was created by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")*

In discussions I might have a potential use for a custom field on the discounts table.

Could this be added to the wishlist please.

Might be worth considering where else custom fields could be added - shipping, payments, tax, taxation - not that I have a use at the moment.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzIwODExLWN1c3RvbS1maWVsZHMtb24tZGlzY291bnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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: 86322
- Thank you received: 14281
-
-

15 years 3 months ago [\#20822](#20822) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Custom fields on discounts](/forum/2-general-talk-about-hikashop/20811-custom-fields-on-discounts#20822 "In discussions I might have a potential use for a custom field on the discounts table.  Could this be added to the wishlist please.  Might be worth considering where else custom fields could be added - shipping, payments, tax, taxation - not that I have a use at the moment.")*

Could you explain how that could be useful ? The discounts information is not displayed anywhere on the front end so I don't see how custom fields on them would be useful.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzIwODExLWN1c3RvbS1maWVsZHMtb24tZGlzY291bnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 3 months ago [\#20861](#20861) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Re: Custom fields on discounts](/forum/2-general-talk-about-hikashop/20811-custom-fields-on-discounts#20861 "In discussions I might have a potential use for a custom field on the discounts table.  Could this be added to the wishlist please.  Might be worth considering where else custom fields could be added - shipping, payments, tax, taxation - not that I have a use at the moment.")*

This would just be for custom processing:

So instead of writing: Code:

if ($discount-&gt;discount_code == 'DISC') dospecial(); else donormal();

could write: Code:

if (@$discount-&gt;discount_isspecial) dospecial(); else donormal();

Another use just occurred to me - could use it to add a custom field containing text.
If field populated then it could be displayed in the custom views at checkout / in emails.

No immediate requirement for this, just an idea which came up in discussion.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzIwODExLWN1c3RvbS1maWVsZHMtb24tZGlzY291bnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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: 86322
- Thank you received: 14281
-
-

15 years 3 months ago [\#20875](#20875) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Custom fields on discounts](/forum/2-general-talk-about-hikashop/20811-custom-fields-on-discounts#20875 "In discussions I might have a potential use for a custom field on the discounts table.  Could this be added to the wishlist please.  Might be worth considering where else custom fields could be added - shipping, payments, tax, taxation - not that I have a use at the moment.")*

If it's just for custom coding, I would prefer to not include it by default. As a coder, you could just create a new field in the table yourself and modify the file "form" of the view "discount" of the backend in order to add an input for the field. Then you could do what you want.
If you're a coder, that it quite trivial to do, and on our end it avoids cluttering HikaShop with stuff that almost no one uses.

You can already add custom fields of the type "custom text" in order to display text on the custom fields forms.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzIwODExLWN1c3RvbS1maWVsZHMtb24tZGlzY291bnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 3 months ago [\#20891](#20891) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Re: Custom fields on discounts](/forum/2-general-talk-about-hikashop/20811-custom-fields-on-discounts#20891 "In discussions I might have a potential use for a custom field on the discounts table.  Could this be added to the wishlist please.  Might be worth considering where else custom fields could be added - shipping, payments, tax, taxation - not that I have a use at the moment.")*

That's OK.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzIwODExLWN1c3RvbS1maWVsZHMtb24tZGlzY291bnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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.087 seconds

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