Jump to content

Recommended Posts

Got it, and it turns out it was pretty easy! Sometimes, you just have to step back, and take a fresh look at things B)

 

My code in post #48 above wasn't working for me, so I tried something else ... I added a new category, called 'Products'. I then put *all* of my Categories and Products *under* this category. Going back to the original code, everything is now working just like I want it :thumbsup:

 

@@gadlol    Two quick questions (if I may) ...

 

1) I have also adapted this plus/minus function to open and close other boxes (Information, Reports, etc). This is working, but the user can only click on the plus/minus sign to expand the menu. How can I include having the user being able to click on the box header or title to expand the menu?

 

 

(code snippet from my Information box module)

        $data  = '<div id="Information" class="panel panel-default no-border hidden-xs hidden-sm">' .
                 '  <div class="panel-body ContentBody">' .
                 '    <ul class="navMain nav-list">';

        $data .= '      <li> ' .
                 '        <div>Information' .
                 '          <a href="" class="switch">' .
                 '            <span class="glyphicon glyphicon-plus-sign '.($sm==1?'glyphicon-minus-sign':'').'">' .
                 '            </span>' .
                 '          </a>' .
                 '        </div>';

        $data .= '        <ul class="navMain nav-list collapse '.($sm==1?'in':'').' ">';

        $data .= '          <div>' .
                 '            <div class="panel-body ContentBody">' . tep_information_show_category(1) . '</div>' .
                 '          </div>';

        $data .= '        </ul>' .
                 '      </li>' .
                 '    </ul>' .
                 '  </div>' .
                 '</div>';

I tried including the 'Information' heading within the <a href> tag, but it doesn't work.

 

2) How can I replace the glyphicon plus and minus symbols with the plain ASCII plus and minus characters?

 

Thank you, everyone!

 

Malcolm

 

 

Hi Malcolm,

 

1) is not advisable because then you will lose the parent link category. Imaging having a category and a subcategory. If you click on the category then it will expand to show all the subcategories but it will not go to the category link. Thats why I used plus minus icons at the beginning. If you still want that feature post a reply so to start a look at it.

 

2)Perhaps if you used html special chars?


Check out the great Alternative Administration System addon for osCommerce!

Share this post


Link to post
Share on other sites

@@gadlol

 

Hi Malcolm,

 

1) is not advisable because then you will lose the parent link category. Imaging having a category and a subcategory. If you click on the category then it will expand to show all the subcategories but it will not go to the category link. Thats why I used plus minus icons at the beginning. If you still want that feature post a reply so to start a look at it.

 

2)Perhaps if you used html special chars?

 

1) Yes, please :)

 

Malcolm


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

Hi,

I am not programmer so no idea how to write my own code.
Installed 234.1 Edge (BS) with few addons.

I wonder this categories tree for front-end will be possible to show up in the admin side. When trying to modify the user.css in the admin side, it will be helpful if this categories tree folder can show up, and when click on the file selected then confirm if the template/skin has changed or not.... (ideally whole website file categories tree...)

Is it possible to do so?

Thanks!  Lyn

Share this post


Link to post
Share on other sites

In Phoenix -> bm_categories.php, I changed the level of $OSCOM_CategoryTree->setMaximumLevel() to 3. Now whenever I click on the parent category which contains subcategories, the subcat titles will show up on the tree. This works for me. Is this something that is not permissible?

Quote

    function execute() {
      global $oscTemplate, $cPath;

      $OSCOM_CategoryTree = new category_tree();
      $OSCOM_CategoryTree->setCategoryPath($cPath, '<strong>', '</strong>');
      $OSCOM_CategoryTree->setMaximumLevel(3);
      
      $OSCOM_CategoryTree->setParentGroupString('<div class="list-group list-group-flush">', '</div>', false);
      $OSCOM_CategoryTree->setChildString('', '');
      
      $category_tree = $OSCOM_CategoryTree->getTree();
      
      ob_start();
      include('includes/modules/boxes/templates/tpl_' . basename(__FILE__));
      $data = ob_get_clean();

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

 

Share this post


Link to post
Share on other sites

@kgtee

This solution works for me also.

Peter


PROUDLY PASSIONATE PHOENIX SUPPORTER

Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design.

Download the latest version of CE Phoenix from gitHub here

Join the Phoenix Club. Become a Phoenix Supporter.  Gain access to special codes and modules and help the project thrive. Read here

 

Share this post


Link to post
Share on other sites
5 hours ago, kgtee said:

This works for me. Is this something that is not permissible?

Sure it's the whole point of open source so you can do as you like, you can even add fetures to the cats.  Add the superfish js script to them and you can have them flyout.

https://superfish.joelbirch.design/examples/vertical/

you can see it working on this site frozen BS4 site

superfish cats

 

image.png.789c3b1028b8474103c720603d9c7de8.png

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×