Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Coupon Admin hidden from Navigation Bar in Admin

Coupon Admin hidden from Navigation Bar in Admin

Views: 1,044

Results 1 to 4 of 4
18 Jun 2014, 6:47 PM
#1
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Coupon Admin hidden from Navigation Bar in Admin

I'm currently using a mod that replaces ("extends ot_coupon") and needs me to disable the coupon module "ot_coupon". However when I do so, the coupon admin is removed from the menu in the admin panel. However, I can still access the admin module by directly accessing it via the URL. I checked my database and I can still see it listed in the table with the column "display_on_menu" on. But it's still not listed however.

Is there something I'm missing?

18 Jun 2014, 9:41 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Coupon Admin hidden from Navigation Bar in Admin

Not missing anything, except perhaps a slight update to your menu processing. Look in /YOUR_ADMIN/includes/functions/admin_access.php (a core file, BTW). Look for the function zen_get_admin_pages and, towards the bottom of its definition, this code fragment:

  // don't show Coupon Admin unless installed
  if (!defined('MODULE_ORDER_TOTAL_COUPON_STATUS') || MODULE_ORDER_TOTAL_COUPON_STATUS != 'true') {
    unset ($retVal['gv']['couponAdmin']);
  }

Assuming that your new coupon-extension order total uses a constant named MODULE_ORDER_TOTAL_COUPON_EXTENDED_STATUS to indicate that it's installed, make the following changes:

 // don't show Coupon Admin unless installed
  if ( !(defined('MODULE_ORDER_TOTAL_COUPON_STATUS') && MODULE_ORDER_TOTAL_COUPON_STATUS == 'true') || !(defined('MODULE_ORDER_TOTAL_COUPON_EXTENDED_STATUS') && MODULE_ORDER_TOTAL_COUPON_EXTENDED_STATUS == 'true') ) {
    unset ($retVal['gv']['couponAdmin']);
  }
18 Jun 2014, 10:22 PM
#3
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Coupon Admin hidden from Navigation Bar in Admin

Thanks for the change lat9. I'll assume that this isn't something that can be overwritten by using extra_functions?

19 Jun 2014, 1:03 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Coupon Admin hidden from Navigation Bar in Admin

retched, I don't see an override opportunity. That function is called and its output processed directly in /includes/header_navigation.php.