Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2014
    Location
    Indiana
    Posts
    105
    Plugin Contributions
    0

    Default Add URL link to an information Attribute?

    It is possible to create a clickable weblink within the option value of a Read-only attribute?

    For a certain group of products, I would like to display a comment referring the customer to an information page. Yes, I can probably add it into each product description but applying an attribute to a category seems more efficient, so thought I would throw the question out there.

    And sorry if this is already posted somewhere. I did search first.

    Thank you.

    Matt

  2. #2
    Join Date
    Jul 2012
    Posts
    16,797
    Plugin Contributions
    17

    Default Re: Add URL link to an information Attribute?

    Quote Originally Posted by apollowilcox View Post
    It is possible to create a clickable weblink within the option value of a Read-only attribute?

    For a certain group of products, I would like to display a comment referring the customer to an information page. Yes, I can probably add it into each product description but applying an attribute to a category seems more efficient, so thought I would throw the question out there.

    And sorry if this is already posted somewhere. I did search first.

    Thank you.

    Matt
    What has been tried?
    What has been the result of your attempts?

    Generally speaking, I would **think** that an html link could be written into the read-only attribute, but I'm not sure what admin sanitization is in place to know if/how it may get modified in making the save...

    This post doesn't answer your question but hopefully through prompting you'll come back and educate others on what you found, whether successful or having more questions.

    If something has already been tried but has been unsuccessful, giving that info up front really helps to get you helped...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Sep 2014
    Location
    Indiana
    Posts
    105
    Plugin Contributions
    0

    Default Re: Add URL link to an information Attribute?

    You bet. I am not a high-level programmer but can usually read/ understand other coding and re-apply it. I added into this particular attribute text the <a href=... </a> sequence. All the public page displayed was that exact text without any link.

    The fact that no loading error or error message/log was created suggested to me that it was not unhappy with my code, just ignoring it. I figured that, unlike the Rich Text editing available within product descriptions, the attributes value field is Plain Text and cannot display as html.

    Then I made this post hoping someone might tell me it was possible.

  4. #4
    Join Date
    Jul 2012
    Posts
    16,797
    Plugin Contributions
    17

    Default Re: Add URL link to an information Attribute?

    Not sure when I'll have a chance to try to reproduce or review the applicable code section, but might suggest also looking at the html code (source code) on that area to see if it is like:
    [nopase]%lt=[/noparse]

    Otherwise, maybe someone else can come in to help further.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,264
    Plugin Contributions
    3

    Default Re: Add URL link to an information Attribute?

    I've put hyperlinks into read-only rext attributes.
    (SEE AN EXAMPLE) https://tagmakers.co.uk/numbered-pla...white-on-black
    With the "For Custom Sizes" attribute.
    In my example:
    OPTION NAME: For Custom Sizes
    OPTION VALUE: <a href="http://tagmakers.co.uk/forms/view.php?id=10596">GO HERE</a>
    -------------
    MC12345678 mentions the possibility of SANITIZING... This is when input HTML is "sanitised" and instead of remaining code, renders as text.

    I have bypassed sanitization by going into the database (via phpMyAdmin) and adding the Option Value to the relevant option name in the database.
    Unless you know what you are doing in database editing, don't try this! Messing the database can (and usually does) cause big problems.
    20 years a Zencart User

  6. #6
    Join Date
    Sep 2014
    Location
    Indiana
    Posts
    105
    Plugin Contributions
    0

    Default Re: Add URL link to an information Attribute?

    Thank you schoolboy. This gives me hope that it will work and i simply had the code wrong - although my code was nearly identical to yours. I'll try it again! Thanks for taking the time to reply. Best regards,

 

 

Similar Threads

  1. More Information Sidebox Add A Link
    By snarfy in forum Basic Configuration
    Replies: 1
    Last Post: 14 Feb 2010, 02:50 AM
  2. Attribute add to cart url
    By Endre in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 26 Oct 2009, 03:16 PM
  3. add a link button to information section
    By andy-c1 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 6 Jan 2008, 05:56 PM
  4. add link to Information sidebox
    By earmsby in forum Basic Configuration
    Replies: 1
    Last Post: 14 Dec 2006, 10:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR