Jump to content
Daresh

[Free module / widget] Additional second category description

Recommended Posts

This is a free module that adds an additional field to the category form, allowing you to enter additional description.

It may be usefull for SEO purposes.

For PS 1.6:

To use the module you need to install it and then add {hook h='displayCategorySecondDescription'} to category.tpl in a place where you want to display the description, you may also add this hook to some other place, letf column, footer, it should work everywhere as long as you are on a category page. 

For PS 1.7

Install the module and then add {widget name='gmcatseconddesc'} to templates/catalog/listing/product-list.tpl just before the {else} tag or in any other place that you like. You can also attach this module to any hook, where you would like the description to show.

Note: The description won't show for pagination pages, where the ?p parameter is greater that 1.

gmcatseconddesc_16.zip

 

gmcatseconddesc_17.zip

Detailed implementation description: http://greenmousestudio.com/en/cat-desc

Edited by Daresh (see edit history)
  • Like 3
  • Thanks 5

Share this post


Link to post
Share on other sites

Outstanding! Thank you so much.. can you pls confirm the code is clean as dont have the skill to check for links/malware. I will make a small donation to your account listed in the module once you respond

Share this post


Link to post
Share on other sites

Yes it's clean, there is a link to my site, but no tracking, connecting to any external resources etc.

  • Thanks 3

Share this post


Link to post
Share on other sites

Hello.

I install your module and put the texte in category.tpl. But when i make a text in second description (BO), the text don't stay in memory, and disappear.

What can i do ?

Best regards

 

Share this post


Link to post
Share on other sites
On 12/13/2018 at 10:16 AM, creaclaire said:

Hello.

I install your module and put the texte in category.tpl. But when i make a text in second description (BO), the text don't stay in memory, and disappear.

What can i do ?

Best regards

 

Hello,
I have the same problem.
Have you found a solution?

Share this post


Link to post
Share on other sites

Thanks guys for you input, indeed there was a small bug in the module, please download it again, it should be fine now.

Share this post


Link to post
Share on other sites

Hard to tell what it may be, I would need to see the shop. If you want we can take a look, contact me with some more details.

Share this post


Link to post
Share on other sites

Thank you for your sharing.

I have the same problem with the second description :

When I press "Save" in the BO, the second description is not saved.

PS version : 1.6.1.3

Share this post


Link to post
Share on other sites

It may be related to the general problem of older version of prestashop when saving data in backoffice in various browsers.

If you can update the core - update it.

If not - try this: take the "admin" folder from prestashop 1.6.1.23, upload it on your server as a new folder on the side of the current one, log in through it and check if the error is still there.

Share this post


Link to post
Share on other sites

Hi Daresh,

Thank you for your time.

I did some tests and it seems that :

  • The module works when I write my text directly in the BO field but .
  • The module doesn't work when I COPY/PASTE some text from an external source (even if the text is clean => weird)
  • I have to clean cache after saving my description text in order to see it on FO page.

I don't understand why copy/paste doesn't work. I check the source code of my text when I pasted it in BO field and it's clean so it should not be a problem for saving it.

EDIT : BO -> performances settings : I checked Force compilation on smarty and now my description is showing.

Edited by Alain D. (see edit history)

Share this post


Link to post
Share on other sites

Weird, but still - it may be a coincidence. The errors that I mentioned occur this way. Once it's saved, another time it's not saved.

Edited by Daresh (see edit history)

Share this post


Link to post
Share on other sites

Ok I'll try your manipulation

Quote

try this: take the "admin" folder from prestashop 1.6.1.23, upload it on your server as a new folder on the side of the current one, log in through it and check if the error is still there.

I'll come back to post my result ASAP.

Edit : I tried, but the problem is still the same.

Edited by Alain D. (see edit history)

Share this post


Link to post
Share on other sites

Essentially this is a great module that does help a lot for our customers and SEO, thanks!

Sadly I am having the same problems. It's really weird: I have tried several things but it is just not clear when the given text will be saved, and when not.  (I'm working in a multistore setup, on 1.6.1.17)

Share this post


Link to post
Share on other sites

I believe you, but still can't recreate this situation on my setup. So if any of you have some dev shop where this occurs and could give me access so I can make some tests that would be great! :)

Share this post


Link to post
Share on other sites
7 hours ago, elmoxx said:

Essentially this is a great module that does help a lot for our customers and SEO, thanks!

Sadly I am having the same problems. It's really weird: I have tried several things but it is just not clear when the given text will be saved, and when not.  (I'm working in a multistore setup, on 1.6.1.17)

Well, I thought it was the Deprecation] of Synchronous XMLHttpRequest but if the problem persist on a 1.6.1.17 version it might be something else.

Just to be sure, elmoxx, if you open the console of your browser when you are in the BO category page, do you see something like this ?

Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

 

Since prestashop 1.6.1.9 the [Deprecation] of Synchronous XMLHttpRequest is supposed to be fixed so it sshould not be present in your Ps version.

Share this post


Link to post
Share on other sites
Posted (edited)

The module, no. But do you know if prestashop use Ajax during the saving process ?

I thought it could be a part of the main problem. Well now I'm out of idea.

I'll try to update Ps version to the last 1.6 and check if the problem persists.

Edited by Alain D. (see edit history)

Share this post


Link to post
Share on other sites
Posted (edited)

hi.. i test the module but i have the same problem of the other.. When i try to save a long html text this is deleted.. Nobody solve it? I use prestashop 1.7

Edited by Idroclic (see edit history)

Share this post


Link to post
Share on other sites
33 minutes ago, Idroclic said:

hi.. i test the module but i have the same problem of the other.. When i try to save a long html text this is deleted.. Nobody solve it? I use prestashop 1.7

Hi, did you write the text directly in the BO page or did you copy/paste it from an external document ?

 @Idroclic

Share this post


Link to post
Share on other sites
9 minutes ago, Alain D. said:

Hi, did you write the text directly in the BO page or did you copy/paste it from an external document ?

 @Idroclic

Hi, i use copy and paste 

Share this post


Link to post
Share on other sites
Posted (edited)
32 minutes ago, Alain D. said:

Hi, did you write the text directly in the BO page or did you copy/paste it from an external document ?

 @Idroclic


I find the problem!

The charater  '  make problems with the save of the description.. I replace it with the ′ and the save function working..

I hope to help someone with this suggestion!

Edited by Idroclic (see edit history)

Share this post


Link to post
Share on other sites
On 3/8/2019 at 3:23 PM, Idroclic said:


I find the problem!

The charater  '  make problems with the save of the description.. I replace it with the ′ and the save function working..

I hope to help someone with this suggestion!

Hey ! Sorry I've been very busy this last days.
thank you for your contribution I will check this ASAP.

  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (edited)
3 minutes ago, Alain D. said:

Hey ! Sorry I've been very busy this last days.
thank you for your contribution I will check this ASAP.

Welcome! 

Edited by Idroclic
Error to see author (see edit history)

Share this post


Link to post
Share on other sites
1 minute ago, Idroclic said:

Tnx to you for make this great module!

I wait for your update!

I am not the owner of the module, just a user like you 😃

Share this post


Link to post
Share on other sites

Thanks for the clue, I will check out that ' sign issue

Share this post


Link to post
Share on other sites
Just now, Alain D. said:

I am not the owner of the module, just a user like you 😃

Yep, sorry! I wrong to see the username! 😋

Share this post


Link to post
Share on other sites
Just now, Daresh said:

Thanks for the clue, I will check out that ' sign issue

Tnx to you for this very useful module!

I wait for your update :)

Share this post


Link to post
Share on other sites

I just updated the modules in the first post, please test it out :)

  • Thanks 1

Share this post


Link to post
Share on other sites
15 minutes ago, Daresh said:

I just updated the modules in the first post, please test it out :)

Tnx a lot! I test it and now working perfectly!

  • Thanks 1

Share this post


Link to post
Share on other sites
On 3/14/2019 at 9:51 AM, Daresh said:

I just updated the modules in the first post, please test it out :)

Hi Daresh, 

 

i have another problem.. if i insert html tag (<h1>,<p style:..>,..) when i save the text disappear after the save!

You can help me?

 

Tnx a lot!

Share this post


Link to post
Share on other sites

Yes, it's caused by that function added to make the ' sign work :) I'll take a look how to solve it.

Share this post


Link to post
Share on other sites
4 minutes ago, Daresh said:

Yes, it's caused by that function added to make the ' sign work :) I'll take a look how to solve it.

Tnx! For now i installed a older version ant it's ok!

I wait for u!

Share this post


Link to post
Share on other sites
25 minutes ago, Daresh said:

Updated, please test.

Ok, i tested it and now all it's ok! This module it's great for my SEO study..

Very tnx!

Share this post


Link to post
Share on other sites

Hi! I am trying to cut Second Description in mobile with a "read more" link, do you know how I can do it?

Thanks a lot!!

Share this post


Link to post
Share on other sites

That requires some scripting and styling, and also depends on how your theme looks, so I think it's a task for some frontend developer.

Share this post


Link to post
Share on other sites
Hello,

Bizare, I installed the module for prestashop 1.7 and added
{widget name = 'gmcatseconddesc'} in product-list.php
but the added text is not displayed?
Can you help me?

 

Share this post


Link to post
Share on other sites

Maybe your cache needs to be cleared?

Share this post


Link to post
Share on other sites

you are fast :)
yes cache is cleared

that's the way?
themes\classic\templates\catalog\listing/product-list.php

Share this post


Link to post
Share on other sites

so it's the right place, try to put some static text there, like "test" and see will it appear

Share this post


Link to post
Share on other sites

it's not a hook, in ps 1.7 we have a new widget functionality

Share this post


Link to post
Share on other sites

But if you entered a static text in your tpl file and still don't see any change you must be doing it  in a wrong place.

Share this post


Link to post
Share on other sites

ok it works, I added test and the text box appeared

merci Daresh

  • Like 1

Share this post


Link to post
Share on other sites

The module does not work in 1.7.6.0. Is there a fix for this new version? :) Awesome module btw.

Share this post


Link to post
Share on other sites

I did not test it yet on 1.7.6.0.

Share this post


Link to post
Share on other sites

I'll be looking when it's officially released.

Share this post


Link to post
Share on other sites

I don't think so, it's about products importer.

Share this post


Link to post
Share on other sites

That was a fast reply. I just tested it, and you are right it is not related to that PR. I deleted my post before I saw your post.

Share this post


Link to post
Share on other sites
37 minutes ago, Daresh said:

I'll be looking when it's officially released.

Okay I look forward for a fix :)

Share this post


Link to post
Share on other sites

I just installed 1.7.6. I see that category page got rewritten to Symfony and hook that the module used is not there any more so this method won't work, some totally new method of adding second category description would be required here.

Share this post


Link to post
Share on other sites

That's some idea, but may require much more work as for a free module.

  • Thanks 1

Share this post


Link to post
Share on other sites

I just updated the module to work with prestashop 1.7.6. Please test and let me know.

  • Like 1

Share this post


Link to post
Share on other sites

Hi @Daresh,

 

would you consider to join the Friends of PrestaShop organization ? This is an organization to share modules and resources for the PrestaShop developers => https://github.com/friends-of-presta

Feel free to join the Community Slack too, dm me so I can give you an invitation link.

Mickaël

Share this post


Link to post
Share on other sites

Hi! Thanks but I don't think I'm that fluent in the new architecture of prestashop to create resources for others :)

Share this post


Link to post
Share on other sites

You're already creating useful resources for others :)

The proposition is still open: we accept every developer that like PrestaShop ^^

Have a nice day !

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.

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