Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2006
    Location
    Scotland
    Posts
    55
    Plugin Contributions
    0

    Default Option values error when using quotation marks

    Hi - I want to create an option value (read only) and include the following html within the text: <a class="myclass" href="etc">.

    You can save this option value OK, however when you come to assign it to a product you get the following error "Attribute Option and Option Value Do NOT Match - Attribute was not added" (option and option value DO match) because the option value displayed in the drop down list has got jumbled up because of the quotation marks used in the option value.

    I can get round this problem by inserting products/attributes directly into the database but obviously this isn't ideal.

    Any suggestions?

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Option values error when using quotation marks

    Have you tried escaping the quotation marks, i.e. placing a slash ("\") in front of them?
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Oct 2006
    Location
    Scotland
    Posts
    55
    Plugin Contributions
    0

    Default Re: Option values error when using quotation marks

    Yes I have but it doesn't make any difference. it seems to be a problem with the combination of an html tag and quotes.

  4. #4
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Option values error when using quotation marks

    Zen Cart sanitizes most things that go into the database for security reasons. In particular it usually strips out tags to avoid cross scripting attacks. I would be a little surprised at this being done for input via the Admin, but suspect that this may be the case for the options values. In which case you may need to push them directly into the database.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 

Similar Threads

  1. Error when adding new option values
    By rdhoke in forum Setting Up Categories, Products, Attributes
    Replies: 9
    Last Post: 28 Dec 2012, 10:21 PM
  2. Error Message when setting up Option Values
    By Printcess in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 11 Dec 2011, 03:51 PM
  3. Duplicate Quotation Marks
    By cajungirl in forum General Questions
    Replies: 2
    Last Post: 13 Jan 2010, 07:36 PM
  4. [DONE v1.3.9] Inch marks in Attribute Option Values
    By stride-r in forum Bug Reports
    Replies: 3
    Last Post: 5 Nov 2009, 12:57 AM
  5. Replies: 1
    Last Post: 18 Feb 2007, 02:30 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