Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2008
    Location
    Washington State
    Posts
    236
    Plugin Contributions
    0

    Default Required stop working

    attribute used to be txt_1 and now is labeled as TEXT_PREFIX1 in the source code of the product page.

    Issue:
    No form validation for the attribute field that is setup with REQUIRED.

    I found this link to another person's forum post asking the same question back in Dec. 2007 with no reply: http://www.zen-cart.com/forum/showpo...44&postcount=1

    Any help would be great as my store no longer checks to make sure there is a needed value present.

    Now looks like this: (no Required action)
    Code:
    <input type="text" name="id[TEXT_PREFIX1]" size="32" maxlength="32" value="" id="attrib-1-0" />
    Was this: (Required action)
    Code:
    <input type="text" name="id[txt_1]" size="32" maxlength="32" value="" id="attrib-1-0" />
    Please assist as I can't locate an answer. Thank you
    ~ jasmel : My Store Using Contributions: Wallet Theme | Simple Google | Quantity Discounts | Godaddy | FAQ's | Confirm Email Address Entry | Admin login as customer | Newsletter Subscribe | CampaingMonitor

  2. #2
    Join Date
    Feb 2008
    Location
    Washington State
    Posts
    236
    Plugin Contributions
    0

    Default Re: Required stop working

    So my Required attribute died...

    I put together some javascript to run when the "Add to Cart" button is pressed:

    Thanks to w3school:
    Code:
    <script type="text/javascript">
    function validate_required(field,alerttxt)
    {
    with (field)
      {
      if (value==null||value=="")
        {
        alert(alerttxt);return false;
        }
      else
        {
        return true;
        }
      }
    }
    
    function validate_form(thisform)
    {
    with (thisform)
      {
    	if(validate_required(document.getElementById("attrib-1-0"),"Please click child's name from list.")==false)
      {options.focus();return false;}
      }
    }
    </script>
    however, I can't seem to find the correct page in zen-cart to place the onSubmit for the image. Can anybody help locate this page? I tried the dev tool in admin but maybe I am searching incorrectly.

    onSubmit or onClick

    Summary... I want my validate_form(thisform) to run either by submitting the form or when Add to Cart button is pressed.

    Thank you
    ~ jasmel : My Store Using Contributions: Wallet Theme | Simple Google | Quantity Discounts | Godaddy | FAQ's | Confirm Email Address Entry | Admin login as customer | Newsletter Subscribe | CampaingMonitor

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Required stop working

    Did you check this post to see if you are having similar problems?
    http://www.zen-cart.com/forum/showthread.php?t=69217
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Feb 2008
    Location
    Washington State
    Posts
    236
    Plugin Contributions
    0

    Default Re: Required stop working

    Quote Originally Posted by Ajeh View Post
    Did you check this post to see if you are having similar problems?
    http://www.zen-cart.com/forum/showthread.php?t=69217
    Quote Originally Posted by Ajeh View Post
    There was something really dumb the other day ... where a setting was missing from someone's database that was causing this ...

    Think ... Think ... Think ...

    I remember!!!

    Google Site map is one possibility where it wipes out some settings ...

    The other is that any of these are missing from the configuration table ...

    In the Tools ... Insert SQL Patch ... enter these:
    PHP Code:
    INSERT INTO `configurationVALUES ('''Product option type Select''PRODUCTS_OPTIONS_TYPE_SELECT''0''The number representing the Select type of product option.'0NULL'2007-03-19 17:57:39''2007-03-19 17:57:39'NULLNULL);
    INSERT INTO `configurationVALUES ('''Upload prefix''UPLOAD_PREFIX''upload_''Prefix used to differentiate between upload options and other options'0NULL'2007-03-19 17:57:39''2007-03-19 17:57:39'NULLNULL);
    INSERT INTO `configurationVALUES ('''Text prefix''TEXT_PREFIX''txt_''Prefix used to differentiate between text option values and other option values'0NULL'2007-03-19 17:57:39''2007-03-19 17:57:39'NULLNULL);
    INSERT INTO `configurationVALUES ('''Image Handler Version''IH_VERSION''2.0''This is used by image handler to check if the database is up to date with uploaded image handler files.'0100NULL'2007-06-06 16:47:03'NULL'zen_cfg_textarea_small('); 

    edited for buzz word: fix attributes required requiring requires for text is broken or stopped working
    That did the trick! Thanks... and here I was trying to insert my own form validation....
    ~ jasmel : My Store Using Contributions: Wallet Theme | Simple Google | Quantity Discounts | Godaddy | FAQ's | Confirm Email Address Entry | Admin login as customer | Newsletter Subscribe | CampaingMonitor

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Required stop working

    Surprisingly ... I was just now on a site that was experiencing this exact same issue ...

    Guess what?! This worked for me too!!
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Feb 2008
    Location
    Washington State
    Posts
    236
    Plugin Contributions
    0

    Default Re: Required stop working

    Quote Originally Posted by Ajeh View Post
    Surprisingly ... I was just now on a site that was experiencing this exact same issue ...

    Guess what?! This worked for me too!!
    I didn't have any mods that caused this.. It was a database recovery(from backup) that messed with this "required text" issue. (just more info for possible others that might be experiencing this issue after a rollback.)

    Now... I am looking for easy to follow steps for creating a test or dev environment for 1.3.9a ;-)
    ~ jasmel : My Store Using Contributions: Wallet Theme | Simple Google | Quantity Discounts | Godaddy | FAQ's | Confirm Email Address Entry | Admin login as customer | Newsletter Subscribe | CampaingMonitor

  7. #7
    Join Date
    Feb 2008
    Location
    Washington State
    Posts
    236
    Plugin Contributions
    0

    Default Re: Required stop working

    I had to repeat this procedure after installing the contribution named: Recover Site Sales.

    Not sure why.. but a simple SQL copy and paste and my "required" started working again.
    ~ jasmel : My Store Using Contributions: Wallet Theme | Simple Google | Quantity Discounts | Godaddy | FAQ's | Confirm Email Address Entry | Admin login as customer | Newsletter Subscribe | CampaingMonitor

 

 

Similar Threads

  1. v139d Contact Us Page Stop Working W Errors
    By skaterschoice in forum All Other Contributions/Addons
    Replies: 19
    Last Post: 22 Jun 2014, 02:30 PM
  2. "Attribute Required for Text" - what would make it stop working?
    By aaelghat in forum Setting Up Categories, Products, Attributes
    Replies: 52
    Last Post: 1 Nov 2011, 04:33 AM
  3. Flash Buttons Stop Working
    By esoikie in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 7 Nov 2008, 08:22 PM
  4. Please help. My website has stop working
    By Wrendora in forum General Questions
    Replies: 9
    Last Post: 2 Jul 2008, 08:32 PM
  5. Intermittent Language Defines Stop Working
    By cachehit in forum General Questions
    Replies: 5
    Last Post: 29 May 2008, 02:32 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