Hi,
In the file "administrator/components/com_hikashop/classes/currency.php" please replace
if(!is_array($discount->discount_category_id)) $discount->discount_category_id = explode(',',$discount->discount_category_id));
By
if(!is_array($discount->discount_category_id))
$discount->discount_category_id = explode(',',trim($discount->discount_category_id, ','));
It will fix the issue
And you also replace in the file "adminstrator/components/com_hikashop/views/discount/tmpl/form_restrictions.php"
explode(',',@$this->element->discount_category_id),
By
explode(',', trim(@$this->element->discount_category_id, ',')),
It will fix the display of the categories while editing the discount.
Regards,