Custom fields on discounts
- brainforge
-
Topic Author
- Offline
Less
More
15 years 2 months ago #20811
by brainforge
Custom fields on discounts was created by brainforge
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 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 or Create an account to join the conversation.
15 years 2 months ago #20822
by nicolas
Replied by nicolas on topic Re: Custom fields on discounts
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 or Create an account to join the conversation.
- brainforge
-
Topic Author
- Offline
15 years 2 months ago #20861
by brainforge
Replied by brainforge on topic Re: Custom fields on discounts
This would just be for custom processing:
So instead of writing:
could write:
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.
So instead of writing:
Code:
if ($discount->discount_code == 'DISC') dospecial(); else donormal();
Code:
if (@$discount->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 or Create an account to join the conversation.
15 years 2 months ago #20875
by nicolas
Replied by nicolas on topic Re: Custom fields on discounts
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.
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 or Create an account to join the conversation.
- brainforge
-
Topic Author
- Offline
15 years 2 months ago #20891
by brainforge
Replied by brainforge on topic Re: Custom fields on discounts
That's OK.
Please Log in or Create an account to join the conversation.
Time to create page: 0.149 seconds