How to display coupons only in front-end

  • Posts: 231
  • Thank you received: 28
  • Hikashop Business
2 years 9 months ago #339197

-- HikaShop version -- : 4.4.5
-- HikaMarket version -- : 3.0.0
-- Joomla version -- : 3.10.5

Hi guys,
I know that I have an old version of Hikamarket, but hei... :silly:
What I try to achieve is to have a menu in the front-end where some specific users (like managers) have access to this menu and they will be able to unpublish coupons only.
I want want to change the front-end like so:
1) To remove / hide the 3 dropdown filters (all discounts, all statuses, all vendors). - I know how to do this, I will edit the view.
2) I want that view to display by default only published coupons - This is wat I don't know how to do it
Thank you!

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 9 months ago #339238

Hello,

Having an old version is not problematic but it cannot guarantee that it will be compatible with the latests version of Joomla.
Joomla 4 introduced major modifications and HikaMarket 3.0.0, published 3 years ago, cannot be compatible with.
CF : www.hikashop.com/support/documentation/1...arket-changelog.html

You can customize and override HikaMarket views.
Unfortunately, since your HikaMarket subscription expired 3 years ago, the support team won't be able to help you with that task.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 231
  • Thank you received: 28
  • Hikashop Business
2 years 9 months ago #339299

Hi
i'm back with Hikamarket 4.1.0 :woohoo:
What can I do now to display by default only published coupons in front-end?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 9 months ago #339313

Hello,

We can add a trigger if you want to have a custom plugin which would override the default values.
With the current version, the easier would be to edit the "components/com_hikamarket/views/discountmarket/view.html.php" and change the lines

	if(!empty($pageInfo->filter->type) && in_array($pageInfo->filter->type, array('discount', 'coupon'))) {
		$filters['discount_type'] = 'discount.discount_type = ' . $db->Quote($pageInfo->filter->type);
	}
	if($pageInfo->filter->published >= 0) {
		$filters['published'] = 'discount.discount_published = ' . ($pageInfo->filter->published ? '1' : '0');
	}
You can force the values to always load the published coupons.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 231
  • Thank you received: 28
  • Hikashop Business
2 years 9 months ago #339373

"We can add a trigger if you want to have a custom plugin which would override the default values."
This it will be great!

The following user(s) said Thank You: Jerome

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

Moderators: Obsidev
Time to create page: 0.071 seconds
Powered by Kunena Forum