Navbar Categories Supporters addon problem

Open to all! Ask other shopowners for help.
Post Reply
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 13 times
Been thanked: 11 times

Navbar Categories Supporters addon problem

Post by mhsuffolk »

This is an addon that we received in the early days of supporters addon which works in my 1.0.7.0 live shop but 1.0.8.0 breaks it with,

Fatal error: Uncaught Error: Call to undefined method category_tree::setCategoryPath() in D:\Phoenix_1_0_8_0\htdocs\includes\modules\navbar\nb_navbar_categories.php:53 Stack trace: #0 D:\Phoenix_1_0_8_0\htdocs\includes\modules\content\navigation\cm_navbar.php(60): nb_navbar_categories->getOutput() #1 D:\Phoenix_1_0_8_0\htdocs\includes\system\versioned\1.0.7.9\osc_template.php(106): cm_navbar->execute() #2 D:\Phoenix_1_0_8_0\htdocs\templates\default\includes\components\template_top.php(46): oscTemplate->getContent('navigation') #3 D:\Phoenix_1_0_8_0\htdocs\templates\default\includes\pages\index.php(13): require('D:\\Phoenix_1_0_...') #4 D:\Phoenix_1_0_8_0\htdocs\index.php(17): require('D:\\Phoenix_1_0_...') #5 {main} thrown in D:\Phoenix_1_0_8_0\htdocs\includes\modules\navbar\nb_navbar_categories.php on line 53

Here is some of the code. Lines 49 to 67

Code: Select all

    function getOutput() {
      global $oscTemplate;
      
      $NB_CategoryTree = new category_tree();
      $NB_CategoryTree->setCategoryPath($cPath, '<strong>', '</strong>');
      $NB_CategoryTree->setMaximumLevel(1);
      $NB_CategoryTree->setParentGroupString('<ul class="dropdown-menu">', '</ul>', true);
      $NB_category_tree = $NB_CategoryTree->getTree();
      
      ob_start();
      require('includes/modules/navbar_modules/templates/tpl_' . basename(__FILE__));
      $data = ob_get_clean();

      $oscTemplate->addBlock($data, $this->group);
    }

    function isEnabled() {
      return $this->enabled;
    }


Join The Code Co-op to get access to your library in the Code Co-op Forum
Fiber
Contributor
Posts: 173
Joined: Mon Oct 26, 2020 12:16 pm
Phoenix Version: v1.1.0.6
Has thanked: 17 times
Been thanked: 27 times

Re: Navbar Categories Supporters addon problem

Post by Fiber »

mhsuffolk wrote: Thu May 20, 2021 10:54 am This is an addon that we received in the early days of supporters addon which works in my 1.0.7.0 live shop but 1.0.8.0 breaks it
I dont believe that was a supportsaddon, but i can get it wrong...
Deinstall the navbar module and install this (link removed by Admin) tested with 1.0.8.0 and 1.0.8.3 and seems to work..
Turn up the Max
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Navbar Categories Supporters addon problem

Post by ecartz »

Code: Select all

      $NB_CategoryTree = new category_tree();
to

Code: Select all

      $NB_CategoryTree = new tree_display(Guarantor::ensure_global('category_tree');
And I'm pretty sure that there is a Supporters code: S3/s03e09
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 13 times
Been thanked: 11 times

Re: Navbar Categories Supporters addon problem

Post by mhsuffolk »

Fiber wrote: Thu May 20, 2021 11:40 am
Deinstall the navbar module and install this (link removed by Admin), tested with 1.0.8.0 and 1.0.8.3 and seems to work..
Thank you for the heads up which works fine.
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 13 times
Been thanked: 11 times

Re: Navbar Categories Supporters addon problem

Post by mhsuffolk »

ecartz wrote: Thu May 20, 2021 11:55 am

Code: Select all

      $NB_CategoryTree = new category_tree();
to

Code: Select all

      $NB_CategoryTree = new tree_display(Guarantor::ensure_global('category_tree');
And I'm pretty sure that there is a Supporters code: S3/s03e09
Thanks for your help, the alternative addon suggested by @Fiber works on 1.0.8.0
Fiber
Contributor
Posts: 173
Joined: Mon Oct 26, 2020 12:16 pm
Phoenix Version: v1.1.0.6
Has thanked: 17 times
Been thanked: 27 times

Re: Navbar Categories Supporters addon problem

Post by Fiber »

ecartz wrote: Thu May 20, 2021 11:55 am And I'm pretty sure that there is a Supporters code: S3/s03e09
s03e09 - Hori Menu in my log and it was first S3d30 - Hori Menu
Checked again but no navbar cat addon
Turn up the Max
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 13 times
Been thanked: 11 times

Re: Navbar Categories Supporters addon problem

Post by mhsuffolk »

In the code is this

Code: Select all

$this->api_version = '28d 2018, v1.12 &copy; G Burton';
Fiber
Contributor
Posts: 173
Joined: Mon Oct 26, 2020 12:16 pm
Phoenix Version: v1.1.0.6
Has thanked: 17 times
Been thanked: 27 times

Re: Navbar Categories Supporters addon problem

Post by Fiber »

mhsuffolk wrote: Thu May 20, 2021 12:11 pm In the code is this

Code: Select all

$this->api_version = '28d 2018, v1.12 &copy; G Burton';
Oh okay fixed that were the 28dg addons, so not in the addon with seasons supporters ... thought though i'm crazy now? :-)
Turn up the Max


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply