- Posts: 34
- Thank you received: 0
How would I have Custom fields containing HTML
- davcraiguk
-
Topic Author
- Offline
Less
More
15 years 5 months ago #14197
by davcraiguk
David Craig
Hikashop 1.5.0 Business edition
www.charitycanvasprints.com
How would I have Custom fields containing HTML was created by davcraiguk
I tried this and single quotes get a double quote put in front of it and truncates my code (a fairly long 'a href' entry). I tried text and text area types.
Better still can a custom field be a text editor entry i.e JCE?
Better still can a custom field be a text editor entry i.e JCE?
David Craig
Hikashop 1.5.0 Business edition
www.charitycanvasprints.com
Please Log in or Create an account to join the conversation.
- davcraiguk
-
Topic Author
- Offline
Less
More
- Posts: 34
- Thank you received: 0
15 years 5 months ago #14200
by davcraiguk
David Craig
Hikashop 1.5.0 Business edition
www.charitycanvasprints.com
Replied by davcraiguk on topic Re: How would I have Custom fields containing HTML
Sorry wrong sub forum, I meant to post it in 'How To?' Can you please move it or delete it and I will re-enter it?
David Craig
Hikashop 1.5.0 Business edition
www.charitycanvasprints.com
Please Log in or Create an account to join the conversation.
15 years 5 months ago #14203
by nicolas
Replied by nicolas on topic Re: How would I have Custom fields containing HTML
What kind of custom field field are you using and where do you have your HTML cut . On the front end or the back end ?
Which version of HikaShop are you using ?
Which version of HikaShop are you using ?
Please Log in or Create an account to join the conversation.
- davcraiguk
-
Topic Author
- Offline
Less
More
- Posts: 34
- Thank you received: 0
15 years 5 months ago #14208
by davcraiguk
David Craig
Hikashop 1.5.0 Business edition
www.charitycanvasprints.com
Replied by davcraiguk on topic Re: How would I have Custom fields containing HTML
Tried using Text and Text Area Custom Field types
Purpose is to enter it in a custom field the products back-end page and display in the frontend. (Its a piece of HTML to display CC licence info and links to the licience and the author)
Version 1.4.8 business
Purpose is to enter it in a custom field the products back-end page and display in the frontend. (Its a piece of HTML to display CC licence info and links to the licience and the author)
Version 1.4.8 business
David Craig
Hikashop 1.5.0 Business edition
www.charitycanvasprints.com
Please Log in or Create an account to join the conversation.
15 years 5 months ago #14210
by nicolas
Replied by nicolas on topic Re: How would I have Custom fields containing HTML
Before version 1.4.9 you could not insert HTML in custom fields. You should get the 1.4.9 version and install in over your current version to be able to do that.
Please Log in or Create an account to join the conversation.
- davcraiguk
-
Topic Author
- Offline
Less
More
- Posts: 34
- Thank you received: 0
15 years 5 months ago #14217
by davcraiguk
David Craig
Hikashop 1.5.0 Business edition
www.charitycanvasprints.com
Replied by davcraiguk on topic Re: How would I have Custom fields containing HTML
The back-end told me the 1.4.8 was the current stable version. I then went to your site and my order and downloaded and installed the latest, which was 1.4.9 even tho the software itself showed 1.4.8 was the current version.
I deleted my previous custom fields and created new ones.
It does not interpret single quotes correctly. If I have all double quotes in the HTML code then it is fine.
Another limit is that it only allows for VARCHAR i.e. 255 characters, very small for any HTML snipit
I deleted my previous custom fields and created new ones.
It does not interpret single quotes correctly. If I have all double quotes in the HTML code then it is fine.
Another limit is that it only allows for VARCHAR i.e. 255 characters, very small for any HTML snipit
David Craig
Hikashop 1.5.0 Business edition
www.charitycanvasprints.com
Please Log in or Create an account to join the conversation.
- davcraiguk
-
Topic Author
- Offline
Less
More
- Posts: 34
- Thank you received: 0
15 years 5 months ago #14218
by davcraiguk
David Craig
Hikashop 1.5.0 Business edition
www.charitycanvasprints.com
Replied by davcraiguk on topic Re: How would I have Custom fields containing HTML
Example of single quotes not being written out correctly.
Code as entered:
After a save the code looks like this:
I manually increased the field size VARCHAR custom field in the Db table and the code seems to handle the bigger size OK.
Code as entered:
Code:
<a href='http://creativecommons.org/licenses/by/2.0/' target='_blank'><img src='http://i.creativecommons.org/l/by/2.0/80x15.png' alt='Creative Commons Attribution 2.0 Generic License' title='Creative Commons Attribution 2.0 Generic License' border='0' align='left'></a>
After a save the code looks like this:
Code:
<a href="http://creativecommons.org/licenses/by/2.0/" target="_blank"><img src="http://i.creativecommons.org/l/by/2.0/80x15.png" alt="'Creative" Commons="Commons" Attribution="Attribution" 2.0="2.0" Generic="Generic" License'="License'" title="'Creative" Commons="Commons" Attribution="Attribution" 2.0="2.0" Generic="Generic" License'="License'" border="0" align="left" /></a>
I manually increased the field size VARCHAR custom field in the Db table and the code seems to handle the bigger size OK.
David Craig
Hikashop 1.5.0 Business edition
www.charitycanvasprints.com
Please Log in or Create an account to join the conversation.
15 years 5 months ago #14231
by nicolas
Replied by nicolas on topic Re: How would I have Custom fields containing HTML
In next version, we will change the creation of custom fields to have them as TEXT field instead of VARCHAR. That will allow more than 255 characters.
For the quotes in the HMTL, that's normal. When you add HTML in a custom field, the code is checked for XSS threats so that no one on your website will be able to mess with them. We use the filtering library of joomla for that and it has that behavior when checking the HTML.
For the quotes in the HMTL, that's normal. When you add HTML in a custom field, the code is checked for XSS threats so that no one on your website will be able to mess with them. We use the filtering library of joomla for that and it has that behavior when checking the HTML.
Please Log in or Create an account to join the conversation.
- davcraiguk
-
Topic Author
- Offline
Less
More
- Posts: 34
- Thank you received: 0
15 years 5 months ago #14235
by davcraiguk
David Craig
Hikashop 1.5.0 Business edition
www.charitycanvasprints.com
Replied by davcraiguk on topic Re: How would I have Custom fields containing HTML
Thanks for that.
When doing your code change it would be good that if no custom fields were filled in for a particular product that the 'Specification' heading would also not show.
Sorry for posting in the wrong sub-forum as its not really a bug
When doing your code change it would be good that if no custom fields were filled in for a particular product that the 'Specification' heading would also not show.
Sorry for posting in the wrong sub-forum as its not really a bug
David Craig
Hikashop 1.5.0 Business edition
www.charitycanvasprints.com
Please Log in or Create an account to join the conversation.
15 years 5 months ago #14248
by nicolas
Replied by nicolas on topic Re: How would I have Custom fields containing HTML
We'll look at doing that.
Don't worry. We have a lot of users posting bug reports which aren't
Don't worry. We have a lot of users posting bug reports which aren't
Please Log in or Create an account to join the conversation.
Time to create page: 0.279 seconds