Jump to content

Recommended Posts

@@joe122joe

 

After my last post, I too looked for it. IIRC, the menu is formed in /includes/classes/catmenu.php.  I did not write this, nor do I completely understand it :- . Hopefully, @@Tsimi will jump in o:)

 

Malcolm


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

Share this post


Link to post
Share on other sites

@@joe122joe

 

Try to use

tep_image('images/' . $category['image']

Also realized that this addon needs to be updated to be used with osC BS EDGE.

Edited by Tsimi

Share this post


Link to post
Share on other sites

New version now available!

 

http://addons.oscommerce.com/info/9375

 

Change log:

- Updated for osC EDGE and PHP7 compatibility.
- Now you can on/off category images.
- Minor code cleaning

 

Depending on your category name length you might have to adjust this following css value inside the .../templates/catmenu.php file.

.menu_custom_width {
 min-width: 200px;
}

Enjoy!

Edited by Tsimi

Share this post


Link to post
Share on other sites

@@joe122joe

 

Hi Joe

 

Sure, you can send me an example via PM.

But I can tell you already to get what you want needs a complete rewrite of the current code.

Right now the addon uses <ul> <li> listing which gives you the result you have right now.

I am not really sure how to code it to be able to show a grid view, I would need to do some research first and see if it is even possible without hard coding everything.

Share this post


Link to post
Share on other sites

Another update to the addon!

 

http://addons.oscommerce.com/info/9375

 

Change log:

- Included the Categories Menu XS v1.0
- Updated Categories Menu XS v1.0 for osC EDGE and PHP7 compatibility.

 

No need to change any code anymore just install the Horizontal Menu first then the Categories XS menu if needed.

Share this post


Link to post
Share on other sites

@@joe122joe

 

This following is in experimental phase and needs testing.

It works only for 1 sub category, that means you have 4-5 main categories and under them the first sub-categories.

 

DVDs <-- main category

  Action <-- sub-category

  Drama <-- sub-category

  Horror <-- sub-category

 

This following won't work.

 

DVDs <-- main category

  Action <-- sub-category

  Drama <-- sub-category

  Horror <-- sub-category

  Kids <-- sub-main-category

    Disney <-- 2nd sub-category

    Pixar <-- 2nd sub-category

    Anime <-- 2nd sub-category

 

 

Download here: Horizontal Grid Menu v1.0.zip

 

 

Share this post


Link to post
Share on other sites

Thank you @@Tsimi  Categories Menu XS v1.0 work nicely. 

I have been trying to add some css in /ext/menu_xs/css/component.css

 position: fixed; /* Set the menu to fixed position */
    top: 0; /* Position the menu at the top of the page */

but its not working  Do you think that, If I move Categories XS menu to Navbar will work?

 

Omar

Share this post


Link to post
Share on other sites

@@Tsimi YOU ARE THE MASTER  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup: .

one last thing  where I have to put this code 

.menu_custom_width {
 min-width: 200px;
}

because category name they are  long. 

Thank you again

Joe

Share this post


Link to post
Share on other sites

@@joe122joe

 

Do you have a link to the store?

If yes send it via PM.

 

@@Omar_one

 

I see what you were trying, that won't work like this.

I never tried to put it inside the navbar. Not sure that can be done that easy though. I will have to give it a try once.

Share this post


Link to post
Share on other sites

@@joe122joe

 

open the file go to ext/grid_menu/css/component.css and search look for this code around line 31/32

	width: 90%;
	max-width: 69em;
	margin: 0 auto;
	padding: 0 1.875em;

replace that with this

	width: 98%;
	margin: 0 auto;
	padding: 0 1.875em;

That will move the main categories to the left.

Then if you want to have the sub-categories aligned to the left search within the same file around line 111

	text-align: center; /* for aligning the sub items */

and change that to

	text-align: left; /* for aligning the sub items */

or

	/*text-align: center; /* for aligning the sub items */

That's it.

Share this post


Link to post
Share on other sites

Another new version available! Version 1.3

 

http://addons.oscommerce.com/info/9375

 

(Please ignore the last 3 packages things got a bit mixed up here at my test store.)

 

Change log

 

- Code cleaning

- more code cleaning

- and more code cleaning

 

:D

Edited by Tsimi

Share this post


Link to post
Share on other sites

@@Omar_one

 

I think I found a possible solution.

 

Open your ../includes/classes/catmenu_xs.php file and search for this code.

<div id="catMenu" class="col-sm-12 tsimi-color">

add a class, in this example I used test, so that the code looks like this.

<div id="catMenu" class="col-sm-12 tsimi-color test">

Then open your user.css file and add this

.test {
  position: fixed;
  left: 0;
  top: 10px;
  z-index: 1030;
}

You could change the button text from Categories to something more shorter? Or maybe use a font awesome icon?

Also make sure that you have the brand navbar module deactivated.

The above numbers might need a bit more adjustig to match your store design.

Edited by Tsimi

Share this post


Link to post
Share on other sites

Works very great guys! Thanks Tsimi and G L Walker!

It works perfect on PHP7.1.1 and MySQL 5.7.

I use osc 2.3.4 Bootstrap-Responsive

Edited by burt
remove external link

  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Share this post


Link to post
Share on other sites

@@Tsimi

 

.

 

Open your ../includes/classes/catmenu_xs.php file and search for this code.

<div id="catMenu" class="col-sm-12 tsimi-color">

you mean open .../includes/modules/content/header/templates/catmenu_xs.php 

 

Omar

Share this post


Link to post
Share on other sites

If both menu (XS) and the horizonztal menu activate, there is a lot space between the breadcrumb and the menu. I recommand put the follow code in /catalog/user.css

#catMenu {
  margin-top: -15px;
}

#dl-menu {
  margin-top: 5px;
}


  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Share this post


Link to post
Share on other sites

First of all its a great addon. Thank you Tsimi !

 

I needed a HOME button, right on the very left and before the main categories. If eneyone else needs one, keep reading

 

In

catalog\include\modules\content\header\templates\catmenu.php

 

*******************

1)  find the code

 

<button type="button" class="btn btn-navbar navbar-toggle" data-toggle="collapse" data-target="#bs-navbar-collapse">

            <span class="sr-only">Toggle Navigation</span>

            <i class="fa fa-chevron-down"></i> <?php echo TEXT_COLLAPSE_MENU; ?>

        </button>

 

and just below, add

 

<a class="navbar-brand" href="#"> <?php echo TEXT_HOME; ?></a>

 

*********************

 

2) go to your active catalog languages and add thw following line ( this is for english.php )

 

define('TEXT_HOME', '<font size="3" color="#ffec80">HOME</font>');

 

 

The end !

@29gk

 

Hi George,

 

Thanks for the HOME button code details. If I like to have the 2nd layer drown down for the home button when hover down, (eg, about us, contact us...), how can I make it work, or can i say how can i make the other information box show up next to the categories drop down menu?

 

Thanks!

 

Lyn

Edited by ce7

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

×