How to add another option to Discount Type?

  • Posts: 66
  • Thank you received: 0
10 years 1 month ago #175518

-- url of the page with the problem -- : www.pponlinestore.com/administrator/inde...kashop&ctrl=discount
-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.3.2
-- PHP version -- : 5.5.15
-- Browser(s) name and version -- : Chrome

Hello,

I am using business edition of hikashop. In the hikashop configuration -> Order->Discounts there are only two options when I create new i.e. 1) Discount & 2) Coupons

Please refer the attached screenshot. I want to add new options after the 'Coupons' and customize the fields according to new type.

Due to some customization requirements I need to add another few options after the coupon. How to do that? If I am to edit some php file, please also guide where to find it and what section to edit as I am not a programmer.

Thanks in Advance

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 1 month ago #175536

Hi,

To add an option here it require to edit core files, so changes are lost when updating unless you do class overrides.
The file to edit is "administrator/components/com_hikashop/types/discount.php", in that file you can add the entry as a new 'select.option', then you will have to edit/add javascript to change the displayed fields.
To add fields, the view to edit is "discount / form" in backend template.

Could you give us more details about what you want to add ? Because it will require a lot of other modifications if you want a new discount type...

In your case the best solution will maybe to use a plugin based on custom fields or on a specific action.
Here is documentation about plugins:
hikashop.com/support/support/documentati...r-documentation.html

In all cases, it require good PHP knowledges.

Please Log in or Create an account to join the conversation.

Time to create page: 0.065 seconds
Powered by Kunena Forum