Jump to content

[Solved]How to add link to the navigation header


Recommended Posts

go to modules > then search for "top horizontal menu" click on configure button

 

 

1) top horizontal menu, click on configure button

SmijJIZ.png

 

2) in the right hand side box you can see items that you've got in the menu. select item you want to remove (1). then click on remove (2). save changes (3)

K73UVvN.png

Link to comment
Share on other sites

Thanks Vekia and Pualito

 

is it possible to add whole manufacturer or a whole category to the top horizontal menu ? Because when i tried to configure only allow me to add 1 by 1. For eg under Manufacturer i have Company ABC and Company DEF. The configure doesnt allow me to add the whole manufacturer but only allow me to add individual company.

Link to comment
Share on other sites

Hi All, I just build a new option to choose from in the 'available items' menu in the top horizontal menu - configuration page

It's called '-- All manufacturers --'

When choosing this item, you'll get a nice menu Manufacturers in the top Horizontal menu, with all manufacturers hanging in it's submenu. I think this is what you're looking for, renjii.

 

I will make it into a new module, as it makes changes into the blocktopmenu.php file (as Vekia mentioned), and for some reason, we still can't override those files (PrestaTeam!)

 

I'll post a link later. For now, have a quick look at the images and see if that's what you want. Let me know.

 

pascal

post-455771-0-01488200-1377010624_thumb.jpg

post-455771-0-27420500-1377010634_thumb.jpg

  • Like 1
Link to comment
Share on other sites

Sure: (blocktopmenu.php code of Prestashop 1.5.4.1)

 

I'll shortly show what changes are needed:

 

Edit file modules/blocktopmenu/blocktopmenu.php

find function:

public function getContent()

 

and scroll down until you see: (Add red text)

// BEGIN Manufacturer

$this->_html .= '<optgroup label="'.$this->l('Manufacturer').'">';

 

// add option 'All Manufacturers' in Available Items-List to get menu with all manufacturers

$this->_html .= '<option value="ALL_MAN1">'.$spacer.$this->l('-- All Manufacturers --').'</option>';

 

$manufacturers = Manufacturer::getManufacturers(false, $id_lang);

foreach ($manufacturers as $manufacturer)

$this->_html .= '<option value="MAN'.$manufacturer['id_manufacturer'].'">'.$spacer.$manufacturer['name'].'</option>';

$this->_html .= '</optgroup>';

 

Then go to function:

private function makeMenuOption()

 

and find this:(Add red text) (This code adds the 'All manufacturers' line to the selected items-list)

case 'CMS_CAT':

$category = new CMSCategory((int)$id, (int)$id_lang);

if (Validate::isLoadedObject($category))

$this->_html .= '<option value="CMS_CAT'.$id.'">'.$category->name.'</option>'.PHP_EOL;

break;

 

case 'ALL_MAN':

$this->_html .= '<option value="ALL_MAN1">'.$this->l('-- All Manufacturers --').

'</option>'.PHP_EOL;

break;

 

case 'MAN':

$manufacturer = new Manufacturer((int)$id, (int)$id_lang);

if (Validate::isLoadedObject($manufacturer))

$this->_html .= '<option value="MAN'.$id.'">'.$manufacturer->name.'</option>'.PHP_EOL;

break;

 

Finally, go to function:

private function makeMenu()

 

and find this: (Add red text)

 

case 'CMS_CAT':

$category = new CMSCategory((int)$id, (int)$id_lang);

if (count($category))

{

$this->_menu .= '<li><a href="'.$category->getLink().'">'.$category->name.'</a>';

$this->getCMSMenuItems($category->id);

$this->_menu .= '</li>'.PHP_EOL;

}

break;

 

case 'ALL_MAN':

// Add Top menu item 'manufacturers'. Put real manufacturers in submenu...

$this->_menu .= '<li class="sfHover" ID="top_menu_manufacturers">'.

'<a href="manufacturers">'.$this->l('Manufacturers').'</a> <UL>';

 

$manufacturers = Manufacturer::getManufacturers(false, $id_lang);

foreach ($manufacturers as $tmpmanufacturer)

{

$manufacturer = new Manufacturer((int)$tmpmanufacturer['id_manufacturer'],

(int)$id_lang);

 

if (!is_null($manufacturer->id))

{

if (intval(Configuration::get('PS_REWRITING_SETTINGS')))

$manufacturer->link_rewrite =Tools::link_rewrite(

$manufacturer->name, false);

else

$manufacturer->link_rewrite = 0;

 

$selected = ($this->page_name == 'manufacturer' &&

(Tools::getValue('id_manufacturer') ==

$manufacturer->id)) ? ' class="sfHover"' : '';

 

$link = new Link;

 

$this->_menu .= '<li'.$selected.'><a href="'.

$link->getManufacturerLink((int)$manufacturer->id,

$manufacturer->link_rewrite).'">'.

$manufacturer->name.'</a></li>'.PHP_EOL;

}

}

$this->_menu .= '</UL></li>'.PHP_EOL; // close main menu 'Manufacturers'

break;

 

case 'MAN':

$selected = ($this->page_name == 'manufacturer' && (Tools::getValue('id_manufacturer') == $id)) ? ' class="sfHover"' : '';

 

 

That's about it. As said, it changes the blocktopmenu.php so unfortunately no override possible. Will see if I can make a module out of it.

(Vekia, is there any manual how to make an official installation-zip for a module? Do I need to add a script or so?)

 

pascal.

Edited by PascalVG (see edit history)
  • Like 2
Link to comment
Share on other sites

OK, I made a module out of it, called blocktopmenu_ext (extended version, that is ;-) )

In it, the option to add an item 'Manufacturers' as a main menu option to the top menu, with all the manufacturers as a submenu attached to it (see sample picture Front and back office in post #6, description of changes in post #8).

Similar to this, I quickly added the 'All suppliers' menu, just in case someone needs it. Works as the All manufacturers option. If anyone needs the code for this, please ask (although it's almost the same as manufacturers changes)

 

To install:

Unzip the file in the /modules folder of your shop. You should get a folder named blocktopmenu_ext, with in it a couple of files/subfolders. 99% is a copy of the blocktopmenu. A few small changes to make it a new module, and of course the changes to add the manufacturers menu and Suppliers menu.

 

Please disable/detach the original Prestashop blocktopmenu, and just replace with this extended version. Configure and check front office if everything works for you. Please let me know.

 

Thanks goes to the PrestaShop team, for doing the first 99% of this module!

 

Anyone who downloads the module: Please leave a reply here with some feedback.

 

Thanks!

pascal

 

P.S. original Prestashop blocktopmenu that I modified is from Prestashop 1.5.4.1. For newer versions, see the changes I made in post #8 and just add to the new blocktopmenu, or ask for an update of this module.

blocktopmenu_ext.zip

Edited by PascalVG (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Hello,

 

I wonder if anyone can shed some light on a problem I seem to be having with this modification?

 

Everything seems to be working fine apart from the actual link for the 'manufacturers' page. When I check the link it has an address of '/website/manufacturers' when it should be '/website/index.php?controller=manufacturer'.

 

I can find the code that controls this link at:

 

case 'ALL_MAN':
// Add Top menu item 'manufacturers'. Put real manufacturers in submenu...
$this->_menu .= '<li class="sfHover" ID="top_menu_manufacturers">'.
'<a href="manufacturers">'.$this->l('Manufacturers').'</a> <UL>';

 

The only fix I can find is by replacing the code with:

 

case 'ALL_MAN':
// Add Top menu item 'manufacturers'. Put real manufacturers in submenu...
$this->_menu .= '<li class="sfHover" ID="top_menu_manufacturers">'.
'<a href="
/website/index.php?controller=manufacturer">'.$this->l('Manufacturers').'</a> <UL>';

 

This works, but is no way ideal as I'm currently working on a testing server, and it will need updating to reflect any changes in server address. i.e. moving to a live site.

 

Does anyone have a clue what the correct method may be?

 

Many thanks in advance,

 

Philip.

Edited by Philip Anderton (see edit history)
Link to comment
Share on other sites

Philip,

If you turn on Friendly URL's (Which you normally would want to do, as it's much more SEO friendly, giving your a better ranking), your URL's change from

 

website/index.php?controller=manufacturer

to

 website/manufacturers

 

Is here a reason you don't want Friendly URL's on? (Turn on/off in Preferneces->SEO & URL's  (scroll down a little and you'll see it))

 

 

N.B. If really needed to do without FriendlyURL's, you might try to add only:

 <a href="/index.php?controller=manufacturer">

 

(Not fully sure if that works, but give it a try)

pascal.

Link to comment
Share on other sites

Thanks Pascal,

 

Ahhhhh, Friendly URL! It didn't even cross my mind. I've now turned it on and it works great. Fantastic!

 

We currently use 'Friendly URL' on our 1.4 theme and will, of course, be using it again for our new 1.5 theme (build in progress). I had just forgotten to turn it on. Feel like a moron.

 

Thank you so much,

 

Philip.

Edited by Philip Anderton (see edit history)
Link to comment
Share on other sites

Hi Pascal,

 

It's exactly what i was looking for but it has problem with CSS and the other modules of homepage.
I'm using PS 1.5.5.0, do you have any idea how to fix it ?
I attach 2 pictures ( the original one and the ext version )

Thank you

 

Amar,

 

ORIGINAL VERSION

tomenu-horizontal-original.jpg

 

EXTENDED MENU

tomenu-horizontal-extended.jpg

 

Thank you

Amar,

Link to comment
Share on other sites

Hi Pascal,

 

It's exactly what i was looking for but it has problem with CSS and the other modules of homepage.
I'm using PS 1.5.5.0, do you have any idea how to fix it ?
I attach 2 pictures ( the original one and the ext version )

Thank you

 

Amar,

 

ORIGINAL VERSION

tomenu-horizontal-original.jpg

 

EXTENDED MENU

tomenu-horizontal-extended.jpg

 

Thank you

Amar,

can you share url to your website please?

Link to comment
Share on other sites

sry for late reply i was offline, i'm back now. ok, i compared both stylesheet files, there are some differencies

now you can turn on new module

 

sorry for bothering, but unfortunately it is necessary :)


send me PM when it will be turned on, i will check it then :)

Link to comment
Share on other sites

1) first solution

to superfish-modified.css copy these styles: http://pastebin.com/zjttim2c

it will be also necessary to upload images from your original module to new one.

 

 

2) second solution

from your new module copy two files: blocktopmenu.php & menutoplinks.class.php  to your old one.

before you will do this make sure that you've got backup of old module (just in case)

Link to comment
Share on other sites

Hi Vekia,

 

I'm sorry but i need to bother you again.

I've test both the solutions but i've problem with both ( i've moved the module in the right position ).

 

With first solution, modified css, there is a problem with the modules under the topmenu_ext ( home text editor go under the slider ) and there is not the hover image :

 

.sf-menu li:Hover {

    background: url("../img/smenu.jpg") repeat-x scroll left top transparent; }
 
The search box is not a problem i've modified it and i'm able to do it again.
 
With the second solution blocktopmenu.php ( blocktopmenu_ext.php ) & menutoplinks.class.php ( menutoplinks_ext.class.php ) from the new module copied to old module gave a blank homepage.
 
Amar,
Link to comment
Share on other sites

This is brilliant work thank you. All working fine.

One question - I would like the main 'manufacturers' link to read 'brands' instead. I have changed this sitewide in my translations area but for this menu it still reads 'manufacturers'.

Is there any way to change the actual trigger link?

Many thanks

Pete

Link to comment
Share on other sites

Hi amar, here a blocktopmenu.php with all manfacturers menu for 1.5.5.0. (backup the old one if there's any and) overwrite in /modules/blocktopmenu/blocktopmenu.php

blocktopmenu1550_With_all_manufacturers.php.zip

 

 

Will soon update the blocktopmenu_ext module with native 1.5.5.0. code (i.e. all other files than this one). For now, just override the blocktopmenu module.

 

Hope this helps,

pascal

Edited by PascalVG
Sorry, wrong path first... (see edit history)
Link to comment
Share on other sites

Pete,

go to localization->translations

installed modules translation, and select your theme. Then translations-flag of choice (USA if just other English, as you probably want here)

 

Then search for -- all man

(in module blocktopmenu)

here you can translate.

"-- all manufacturers --" is used in back office; at the end there's another one 'Manufacturers' which is the one in the front office)

 

pascal

Edited by PascalVG
added some explanation (see edit history)
Link to comment
Share on other sites

 

Hi Vekia,

 

I'm sorry but i need to bother you again.

I've test both the solutions but i've problem with both ( i've moved the module in the right position ).

 

With first solution, modified css, there is a problem with the modules under the topmenu_ext ( home text editor go under the slider ) and there is not the hover image :

 

.sf-menu li:Hover {

    background: url("../img/smenu.jpg") repeat-x scroll left top transparent; }
 
 

 

that's why i said that you will have to copy also images

Link to comment
Share on other sites

Hi amar,

the file I uploaded, just copy over the original blocktopmenu.php in /module/blocktopmenu/   (make backup first!)

That should do the trick. If you have any css changes for it, my changes in the php file are not interfering with that. It's just another option in the configuration menu that you can choose to show. Furthermore it just adapts itself to your general css rules, colours etc. that you made for the menu.

 

Hope this helps.

pascal

Link to comment
Share on other sites

Hi Pascal

 

I'm going breaking bad :)
Last chance, can you send me the code to modified the original php files in blocktopmenu.
The problem obviously is my template but if you can give me the code you  implemented in the original files ( i think : blocktopmenu.php and menutoplinks.class.php ) i go through it step by step.
 
Thank you,
Amar,
Link to comment
Share on other sites

Amar,

Not sure what to give you more. Original changes are shown in post number 8:

http://www.prestashop.com/forums/topic/268662-solvedhow-to-add-link-to-the-navigation-header/?view=findpost&p=1346160

 

I built a module out of it, posted in post12:

http://www.prestashop.com/forums/topic/268662-solvedhow-to-add-link-to-the-navigation-header/?view=findpost&p=1347386

 

But this gives you a black menu, which you don't want, so therefore I changed for 1.5.5.0 the php file, where I included the changes of post number 8, and posted the file in post number:

http://www.prestashop.com/forums/topic/268662-solvedhow-to-add-link-to-the-navigation-header/?view=findpost&p=1403703

 

This file, copy over your original 1.5.5.0.  /modules/blocktopmenu/blocktopmenu.php file (make backup of original one first)

This file only changes the functionality, not the css/layout, so it should not affect the colour if your menu or so. EDIT: This is the only place where I made changes to add the manufacturers menu. No other file is modified for this.

 

Last possible problem is if you use a different theme with and already modified blocktopmenu.php file. Then just add the changes as given in post number 8, referenced above.

 

Not sure what to tell you more. Can you describe in detail what exactly is the problem you encounter? Is the css of the topblockmenu wrong, the location of part on your page move to a wrong place, or something else??

 

pascal

Edited by PascalVG (see edit history)
Link to comment
Share on other sites

Amar,

if everything fails, tell exactly what goes wrong and allow me into your files with FTP or entrance to your cPanel. Then I can try to make it work on your site. Please then send me a PRIVATE message (PM) with login details, ftp host etc.

 

Also then add an employee with superAdmin rights to your back office (Administration->Employees) and give me a Private Message (PM) where you send me the URL of your back office login page, the employee login name and password.

 

pascal

Link to comment
Share on other sites

Good Morning,

 

As it is not possible to change names appearing on the menu (I did not find anything in the translation module), would it be possible to do the same for All Categories? I have tried to copy the code of all manufacturers and amended it for all categories but it does not work! I think I make a mistake somewhere but I do not have enough knowledge to find the wrong code.

 

Thank you for your help !

Link to comment
Share on other sites

Hi Vir21,

I'm a little confused. I believe you already can add all categories to the menu. Just add the home category, and its 'tree' will be put underneath it.

 

What do you mean exactly with 'names' in the menu that you want to change? Categories are just the names you give yourself, as are the manufactures, suppliers, etc.

Please elaborate a little

 

Pascal

Link to comment
Share on other sites

Hi Pascal,

 

The matter is that if I add the default categories menu, it will appear under the name Home, and I wish it to have the name "categories".

I wish my menu to appear like this : Home (with no subcategories) - Categories - Manufacturers - 

 

I think it is also a unfortunate that it is not possible to choose which pages will appear in the sub-menus. For example, if I want that only the legal notice appear under my home sub-menu this is not possible !

 

I hope I am clear ! Thanks !

Link to comment
Share on other sites

The matter is that if I add the default categories menu, it will appear under the name Home, and I wish it to have the name "categories".

I wish my menu to appear like this : Home (with no subcategories) - Categories - Manufacturers - 

Oops ! just found the answer for the categories problem :

http://www.prestashop.com/forums/topic/263245-edit-root-name-under-categories/?hl=%2Bname+%2Btopmenu

but any idea for the second question ? Thanks :)

Link to comment
Share on other sites

Thanks to PascalIVG and Vekia i've solved the problem, now i can see the manufacturer on top menu.

It was a problem concerned the new version of prestashop that i've solved with the modified blocktopmenu.php made by Pascal and some CSS problems in my theme ( developed for PS v1.5.4 ).

 


One last thing, how can i disable the link of top menù voice "MANUFACTURER", i like the customers can only click on single manufacturers no the main category.

I Think it's relate to the linee 565/566 :



// Add Top menu item 'manufacturers'. Put real manufacturers in submenu...

$this->_menu .= '<li class="sfHover" id="top_menu_manufacturers">'.

'<a href="manufacturers">'.$this->l('Manufacturers').'</a> <ul>';


 

I've others mall issues but i can try to solve by myself.

 

Amar,

Edited by amar.prestashop (see edit history)
Link to comment
Share on other sites

Hi Pascal,

 

I need your help to solve 2 small issues that i'm not able to manage :

- I Like to disable the link of top menù voice "MANUFACTURER", i want customers to only click on single manufacturer name, not on the main category.

- How can i change the Menu Voice from Manufacturer to Designers without using the back-office ( because i can't change max_input_vars.e from my hosting provider ).

 

Thank you

Amar,

Link to comment
Share on other sites

Hi Amar,

Edit the file blocktopmenu.php I gave you for ps1550.

 

go to function: private function makeMenu()

scroll down a little and find :
case 'ALL_MAN':
// Add Top menu item 'manufacturers'. Put real manufacturers in submenu...
$this->_menu .= '<li class="sfHover" ID="top_menu_manufacturers">'.
'<a >'.$this->l('Designers').'</a> <UL>';
 
$manufacturers = Manufacturer::getManufacturers(false, $id_lang);
foreach ($manufacturers as $tmpmanufacturer)
 

Change into the red code

pascal

  • Like 1
Link to comment
Share on other sites

Amar,

great! 

 

BigD,

do you use PrestaShop 1.5.5.0? Then in Advanced Parameters -> Performance, there is a button to clear the Smarty Cache easily.

 

 

For manual cache clear you need to access your Prestashop installation directory and delete the content of the following folders:

  1. /cache/smarty/compile (But DON'T Delete Index.php)
  2. /cache/smarty/cache (But DON'T Delete Index.php)
  3. /img/tmp

So, delete all the files and subfolders in the two folders, except of index.php.

 

pascal

Link to comment
Share on other sites

OK, I made a module out of it, called blocktopmenu_ext (extended version, that is ;-) )

In it, the option to add an item 'Manufacturers' as a main menu option to the top menu, with all the manufacturers as a submenu attached to it (see sample picture Front and back office in post #6, description of changes in post #8).

Similar to this, I quickly added the 'All suppliers' menu, just in case someone needs it. Works as the All manufacturers option. If anyone needs the code for this, please ask (although it's almost the same as manufacturers changes)

 

To install:

Unzip the file in the /modules folder of your shop. You should get a folder named blocktopmenu_ext, with in it a couple of files/subfolders. 99% is a copy of the blocktopmenu. A few small changes to make it a new module, and of course the changes to add the manufacturers menu and Suppliers menu.

 

Please disable/detach the original Prestashop blocktopmenu, and just replace with this extended version. Configure and check front office if everything works for you. Please let me know.

 

Thanks goes to the PrestaShop team, for doing the first 99% of this module!

 

Anyone who downloads the module: Please leave a reply here with some feedback.

 

Thanks!

pascal

 

P.S. original Prestashop blocktopmenu that I modified is from Prestashop 1.5.4.1. For newer versions, see the changes I made in post #8 and just add to the new blocktopmenu, or ask for an update of this module.

 

Hi Pascal,

 

great job, well done!

 

Would it be possible to add a Products link listing all Categories, to the top menu?

 

Thanks :)

Ciao

Valeria

Link to comment
Share on other sites

Hi Valeria,

Can you elaborate a little? What do you exactly mean with "Add a products link listing all categories"??

 

Thanks,

Pasc

 

Hi Pascal,

 

please have a look at this screenshot of my homepage http://i44.tinypic.com/dczh48.jpg

 

There, in the top menu, you can see item "Produttori" (Manufacturers) with a drop down list of a few manufacturers.

 

It would be great if I could manage to have an item "Prodotti" (Products) with a drop down list of the Categories in the top menu.

 

Is it more clear now?

Hope so :) If not please let me know.

 

Thanks!

Valeria

Link to comment
Share on other sites

Valeria,

Not fully clear (to me) yet: The categories you want to show, are they related to a specific product (like the product you see on that page or so), or always just the whole list of categories? Also, the categories, should they be in a tree structure (if you built your category list like a tree, that is) or one long list

 

You already can add the whole category list, in a tree structure, to the menu. Just add the Home category to your menu list on the right

(Modules->Modules, find Top Horizontal menu (Or my extended version, if you installed that one) and press config:

post-455771-0-77729100-1381292107_thumb.jpg

 

save and reload your front page. You sill see this:

post-455771-0-30853300-1381292141_thumb.jpg

 

If this is not what you want, please tell me exactly which categories you want to show, and on which page(s) this should appear

 

pascal

Link to comment
Share on other sites

Hi Robe55son,

 

did you install my module ( http://www.prestashop.com/forums/topic/268662-solvedhow-to-add-link-to-the-navigation-header/?view=findpost&p=1347386 )

and used this one instead of the default Top Horizontal menu? (Disable the default Top Horizontal menu, and install the Top Horizontal Menu Extended instead. Then go to configure and in the Manufacturers part, select --ALL MANUFACTURERS -- and add it to the right column. Save and reload the front page.

 

pascal

Link to comment
Share on other sites

Valeria,

Not fully clear (to me) yet: The categories you want to show, are they related to a specific product (like the product you see on that page or so), or always just the whole list of categories? Also, the categories, should they be in a tree structure (if you built your category list like a tree, that is) or one long list

 

You already can add the whole category list, in a tree structure, to the menu. Just add the Home category to your menu list on the right

(Modules->Modules, find Top Horizontal menu (Or my extended version, if you installed that one) and press config:

attachicon.gifmenu add categories.jpg

 

save and reload your front page. You sill see this:

attachicon.giffront menu with all categories.jpg

 

If this is not what you want, please tell me exactly which categories you want to show, and on which page(s) this should appear

 

pascal

 

Hi Pascal, 

 

yes, I mean the whole list of categories, just like the Home category.

I have already tested adding the Home category on the top menu. This is actually what I'd like to have on top menu.

 

Ho can I change title "Home" in "Product"?

 

If this is possible, then I'm done :)

 

Thank you very much for your help!

Ciao

Valeria

Link to comment
Share on other sites

Hi Valeria,

To translate Home of Categories menu, do this:

 

Go to Catalog->Categories.

Then press the EDIT menu in top right of your window:

post-455771-0-04958100-1381329315_thumb.jpg

 

You will enter the "edit the Home category" page, where you can change the Home-name for any language you have installed.

 

Hope this helps,

pascal.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hi PascalIVG,

 

Thanks for this great mod, I think Prestashop really miss this feature !

 

But I have a problem with it: When I go to a category page, the manufacturer (called "Créateurs on my website) dropdown is actually deployed.

Here's the link to my website, when looking at a category (here it's "Sacs" wich means "Bags") : http://helenwil.fr/13-sacs

 

Thanks again for your great work, I hope we can find what's the problem here !

Link to comment
Share on other sites

Hi, sorry about my last message, I solved it by removing the "sfHover" class from your code, and it seems to work.

I'm a newbie to prestashop..and to php so I don't really understand what I doing here, if you could tell me if I'm doing something wrong that would be great !

 

And, thanks again !

Link to comment
Share on other sites

Hi Valeria,

To translate Home of Categories menu, do this:

 

Go to Catalog->Categories.

Then press the EDIT menu in top right of your window:

attachicon.gifedit Home category name.jpg

 

You will enter the "edit the Home category" page, where you can change the Home-name for any language you have installed.

 

Hope this helps,

pascal.

 

Hi Pascal,

 

excuse my late reply. Very busy times.

 

Many thanks for your help & your module!

 

Ciao

valeria

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Hi Pascal, first of all thanks very much for sharing the module. Since I work in 1.5.3.1 I have changed the code according to your post nr 8. It worked. However, now I would like to change manufacturer to supplier in the php file, but when I replace ALL (with CTRL F) cases of 'manufacturer' to 'supplier' (60 in total), and I refresh, my shop is not visible anymore. Can you explain from and to which lines I should do the replacement?

 

Thanks!

Michiel

Link to comment
Share on other sites

Hi Pascal, I found out how to change it to 'all suppliers', great. The last issue I am facing now is when clicking on the 'all supplier' button itself I get a 404 error. I guess this href is creating the issue.

 

<a class="sf-with-ul" href="suppliers"> … </a>

 

There is no suppliers page it can link to. Any ideas how to solve this in a smart way?

Link to comment
Share on other sites

Hi there

 

As my manufacturers list is long (36 atm) displaying it like that makes it very unreadable. What to add to that modyfication to make manufacturers breaking into columns? That solution doesn`t work http://www.prestashop.com/forums/topic/286053-multiple-columns-in-drop-down-menu/

 

Thanks

Edited by emvoo (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Amar,

great! 

 

BigD,

do you use PrestaShop 1.5.5.0? Then in Advanced Parameters -> Performance, there is a button to clear the Smarty Cache easily.

 

 

For manual cache clear you need to access your Prestashop installation directory and delete the content of the following folders:

  1. /cache/smarty/compile (But DON'T Delete Index.php)
  2. /cache/smarty/cache (But DON'T Delete Index.php)
  3. /img/tmp

So, delete all the files and subfolders in the two folders, except of index.php.

 

pascal

 

 

Bravo Pascal,

 

Du travail impeccable et un beau sens du partage !

 

Merci !!!!

 

 

Ivan

Link to comment
Share on other sites

Hi Pascal! Your module its great. Thank u for this work!

But is it possible to add manufacturers logo to your module? (not in drop down menu)

I solve it by myself, but its not so good solution:

 

in blocktopmenu_ext.php need to find this "$this->_menu .= '<li'.$selected.'><a href="'.$link->getManufacturerLink((int)$id, $manufacturer->link_rewrite).'">"

after just add this "<img src="'.$img_manu_dir.'img/m/'.$manufacturer->id.'-medium_default.jpg"/>"

Sorry for my English.

Link to comment
Share on other sites

  • 2 weeks later...

I installed this extension and it changed some of my custom edits I made to my header. Is it possible to enable this extension and keep what I had? I just want to add the manufacturing block to the drop down in the navigation header. I tried to install it and replace some of the css files, but that didn't seem to work... Here is an image of what it does... Thanks

 

Capture8.png

Link to comment
Share on other sites

hello

you have to change position of .sf-menu block

i suppose so, it looks like problem with margin-top or top param.

anyway, i checked your website but there is no manufacturers, so i suppose that you just removed i, and i cant check and give correct solution

Link to comment
Share on other sites

I was able to get everything back to normal with enabling the extension version... Except I just noticed one problem. When clicking on "Products" it does not direct to the products page. Also, when clicking on the "Brands" (which was renamed from Manufacturer block) it directs to /manufacturers when it needs to direct to /brands. My site is http://tinyurl.com/n5pfy52. Anyone able to help?

 

Thank you!

Edited by generalexperts (see edit history)
Link to comment
Share on other sites

  • 5 months later...

Hi

Wonder if anyone can help.......

Links to main manufacturers page works fine from home page and other pages but when web address has a folder suffix it does now work. e.g. on pages like this:

www.domain.com/content/4-services

Can anyone help?

Many thanks

Pete

 

Exactly same issue here.

Link to comment
Share on other sites

I'm also still looking for help. When doing to my site. And clicking on "brands" on the menu (which was renamed from manufacturer) it directs to a 404. www.mysite.com/products/brands. after clicking on it a few times it eventually goes to the correct URL www.mysite.com/brands and it works. Also is there a product page where it just shows every product I have for sale? Because when I click on the Products on the navigation header it goes to the home page. Thanks in advance for your help!

 

My site is http://tinyurl.com/n5pfy52

Link to comment
Share on other sites

Yeah I get the same thing for brands, but for some reason it would redirect to a different url. Glad to see that's what you see. As far as clicking on products. Is there a page that would just show all products? If so I'd like that to be the link. Because I already have a home link to the left the 'products' link.

 

Thanks!

Link to comment
Share on other sites

  • 3 months later...
Thank you Pascal for the great module!
 
Although I experienced two little problems with the link of the "Manufacturers" and "Suppliers" main menu item:
If you do down in your store for more that 2 level deep (so the URL is like etc. www.example.com/categoryname/productname) the above mentioned two menu items stoop to work, because the URL turns like this: www.example.com/categoryname/manufacturers (same with suppliers).
If you use a multilanguage shop and you changed (translated) the page links under the SEO & URLs menu and you are not on the English language in the front office, the links doesn't change like they are defined there. Instead they stay like this: www.example.com/"otherlangisocode"/manufacturers and www.example.com/"otherlangisocode"/supplier. Both of these kind of links will give a 404 error, because in the other languages the links of the Manufacturers and Suppliers page are changed.
 
I've changed the code a little to solve both of these problems in blocktopmenu_ext.php in the 573th line to this:
'<a href="'.__PS_BASE_URI__."".$this->l('en/manufacturers').'">'.$this->l('Manufacturers').'</a> <UL>';
and in the 622th to this:
'<a href="'.__PS_BASE_URI__."".$this->l('en/supplier').'">'.$this->l('Suppliers').'</a> <UL>';

With these code, the "en/manufacturers" and "en/supplier" parts can be translated to your language(s) in the module's translations for example like this: "fr/fabricants"

 

Of course, these codes only work if the SEF URLs are enabled.

 

Hope this helps someone!

 

Regards:
tUb26

Edited by tUb26 (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...