Hi,
1. I indeed think you want to directly run a MySQL query to the hikashop_discount table in order to adapt it to your needs.
Loading of the coupons data is done in the file administrator/components/com_hikashop/classes/discount.php
In there, the load function loads the data of a coupon, and the check function checks that a coupon is allowed to be used.
2. Yes, you want to customize the disocuntmarket / show.php view file to add the HTML for the extra option.
However, you'll also need to implement the onBeforeDiscountCreate and onBeforeDiscountUpdate events in a plugin of the group "hikashop" in order to add the selection done by the user in that setting to the discount object being saved.
And yes, you'll also need to add the appropriate column to the hikashop_discount table.
Finally, in your plugin, you also need to implement the onBeforeCouponCheck event to check the extra setting in order to make sure the coupon can be used. If not, you want to set the $do variable to false and the text of the error message to be displayed to the customer in the $error_message variable.
You can read more about all of these events here:
www.hikashop.com/support/documentation/6...entation.html#coupon