Jump to content

Custom HTML under category descripton


Recommended Posts

Hello,
 
I'm trying to get a combobox under category-Description field. I have used this code as an example (as it works) but when trying to save on prestashop it gives me an error: "Description field is invalid" It's translated from PT so it may not be accurate
 
code I'm trying to use:
<select onchange="window.location=this.options[this.selectedIndex].value">
<option value="">Go to page...</option>
<option value="http://stackoverflow.com/">stackoverflow</option>
<option value="http://facebook.com/">facebook</option>
<option value="http://twitter.com/">twitter</option>
</select>
 
I know the above code works as I tried it under Brackets but it might have some code not allowed by prestahop?
 
What I'm trying to achieve (visually) is this:

post-988975-0-30003900-1429219357_thumb.post-988975-0-30003900-1429219357_thumb.png

post-988975-0-87780700-1429219364_thumb.post-988975-0-87780700-1429219364_thumb.png

 

Any hints?

 

thanks

Tiago

Link to comment
Share on other sites

So I did found that the issue of not accepting the onchange was solved with this article from Milosz Myszczuk http://mypresta.eu/en/art/prestashop-16/extended-rich-text-editor.html

 

however even if it accepts the code (and displays the combobox) when I select an option nothing happens.

 

Is there anything in prestashop code that prevents this kind of script to work under category->description?

 

can someone help me on this?

Link to comment
Share on other sites

so, after much messing around I did manage to do it disabling Preferences->General->HTMLPurifier. (saw this one on an unrelated subject by Vekia)

 

Now I do have the combobox with links working under categories->description with the code from post #1

 

I also tried an iframe pointing to an x.html with the code inside but no luck with the links. Seems prestashop disables links under iframe (or at least I was missing something else).

 

hope it helps someone else.

Link to comment
Share on other sites

  • 1 year later...

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
×
×
  • Create New...