Jump to content
NemoPS

[FREE TUTORIAL] Displaying Prestashop manufacturers in alphabetical groups

Recommended Posts

Hey everybody! I just wrote a short tutorial about turning the default manufacturers/suppliers display to something split by letter/number.

Here is the tutorial link: http://nemops.com/al...-manufacturers/

Here is the final result: and here is the final result:

manufacturers_styling.png

 

Hope you like it!

 

Cheers! :)

Edited by Nemo1 (see edit history)
  • Like 6

Share this post


Link to post
Share on other sites

Good work!!! its perfect ,thank you..

 

I have a question about it , how we can have a horizontal alphabetical bar in Top of thehome page , for example under the top menu , to do the same work as manufacture page with your changes ?

Share this post


Link to post
Share on other sites

Me2 Looking for the same.

 

Any help?

 

So far i created a new field in DB which has the first letter of the manufacturer.

 

But how can i group based on that when it's clicked?

  • Like 1

Share this post


Link to post
Share on other sites

im installed this but not show in list Modules

you must download the file and replace it with your manufacturer-list.tpl in your theme. and see the changes on manufacturers page.not manufacturer Module.

Share this post


Link to post
Share on other sites

Me2 Looking for the same.

 

Any help?

 

So far i created a new field in DB which has the first letter of the manufacturer.

 

But how can i group based on that when it's clicked?

 

please insert an screen shot of your module situation that we can see the changes you made..

Share this post


Link to post
Share on other sites

any body hasn't any idea about alphabetical bar ? like the attached image?

i want to index manufacturers by alphabetical chars in home page , so when users click on specified chars i direct theme to manufacturers that start with specifed chars.

in other words i want to filter manufacturers by their start letter.

 

i created an special topic for this subject but i havent any post on that topic yet!!!

post-453141-0-76128600-1360246008_thumb.jpg

Share this post


Link to post
Share on other sites

Hi there,

Well, you can create something like this:

foreach letter add a link to the manufacturers page, and append something like "#letter_k".

In the manufacturers list, add id="letter_k" the the K letter title, and when the user clicks there, the browser loads the page and skips to that id.

 

it should work ;) If you want something cleaner and smooth, you should use the onhashchange event of html5 with some JS ;)

Share this post


Link to post
Share on other sites

I have inserted a test brand called 'Fritz Hansen', that is sorted under 0-9, when it should be under the letter F - please see here.

Anyone else having this problem or can tell me how to fix it?

 

Thanks in advance

Andreas Jakobsen

Edited by Andreasjj (see edit history)

Share this post


Link to post
Share on other sites

No Idea really, as I said in the PMs you should try and debug the variable

Share this post


Link to post
Share on other sites

I have tried this in the newest version 1.6.09 and I am having issues getting this to work. In the newest version, are we still using the same file manufacturer-list.tpl? Once, I add the code, do I need to clear cache or recompile somehow. When I add the code, I looked at the DOM to see if I can view the class <li class="alphabetical"> and it does not appear.

Edited by kdmonk1 (see edit history)

Share this post


Link to post
Share on other sites

It depends, if you are not compiling templates as preference option, yes, you need to clear the cache. As far as I know it's the same file

Share this post


Link to post
Share on other sites

It depends, if you are not compiling templates as preference option, yes, you need to clear the cache. As far as I know it's the same file

Hi Nemo1, I just tried again and this time I change the settings to force compilation and clear cache. Still does not work. So I deleted the contents of theme/default-bootstrap/manufacturer-list.tpl, loaded it back up and the manufacturer list is still working. Apparently this is not the same file. Has anyone figured out where the new file is for 1.6?

Share this post


Link to post
Share on other sites

It's that one

		if (Validate::isLoadedObject($this->manufacturer) && $this->manufacturer->active && $this->manufacturer->isAssociatedToShop())
		{
			$this->productSort();
			$this->assignOne();
			$this->setTemplate(_PS_THEME_DIR_.'manufacturer.tpl');
		}
		else
		{
			$this->assignAll();
			$this->setTemplate(_PS_THEME_DIR_.'manufacturer-list.tpl');
		}

I know it sounds strange but are you sure you are editing the correct template?

Share this post


Link to post
Share on other sites

It's that one

		if (Validate::isLoadedObject($this->manufacturer) && $this->manufacturer->active && $this->manufacturer->isAssociatedToShop())
		{
			$this->productSort();
			$this->assignOne();
			$this->setTemplate(_PS_THEME_DIR_.'manufacturer.tpl');
		}
		else
		{
			$this->assignAll();
			$this->setTemplate(_PS_THEME_DIR_.'manufacturer-list.tpl');
		}

I know it sounds strange but are you sure you are editing the correct template?

Hi Nemo1, I sent you a private link with the url. The file I loaded out has the changes that I took from your example. Its crazy that I deleted everything inside the file and the list still works. Any thoughts on why this change is not happening? What file are you looking at in the example above? Maybe my file is showing something different.

Share this post


Link to post
Share on other sites

That snippet is taken from the manufacturercontroller. I know it sounds strange but you should consider the hypothesis you are editing the wrong template. If you open that controller and write some garbage in like

 

 

34235434cxvxc

 

 

Just to break it, does the manufacturer page break?

Share this post


Link to post
Share on other sites

Yeah you have to use the bootstrap classes for each element, like col-xs-3 or col-xs-4
Just use either on each element 

Share this post


Link to post
Share on other sites

In ps 1.6? how here

Hi,

 

Ron Morales, can you give me a link for download manufacturer-list.tpl for prestashop v1.6 ?

 

Thanks

Share this post


Link to post
Share on other sites

Hi,

 

Ron Morales, can you give me a link for download manufacturer-list.tpl for prestashop v1.6 ?

 

Thanks

take this archive

Share this post


Link to post
Share on other sites

PS 1.6

Everything works fine now on my PC, thanks to Ron Morales and NemoPS but on my Mobile it is a mess. How to solve this in Responsive theme?

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More