Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2006
    Posts
    71
    Plugin Contributions
    0

    Default Compulsory Attribute

    Hi

    I am just wondering whether there is an option in zen cart or a modification i can install that will require a customer to select an attribute if there is some before they can add a product to the cart.

    Any help would be much appreciated.

    Thanks
    Brad

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,262
    Plugin Contributions
    3

    Default Re: Compulsory Attribute

    As far as I know, the only type of attribute one can make "required" is a TEXT INPUT attribute. All the others are optional, because the shopper will make a selection of other attributes based on the options you configure. Within these selections, you can set a DEFAULT, so if the shopper fails to "adjust" the option to his/her requirement, the default setting will be automatically added.

    So, for example, if you have a dropdown list of options for "buy batteries with this item", you would configure values such as:-

    BUY BATTERIES WITH THIS ITEM?
    "not required" (no extra cost or weight added)
    "pack of 4" (relevant extra cost + weight added)
    "pack of 8" (relevant extra cost + weight added)
    "pack of 12" (relevant extra cost + weight added)

    ...and you'd set the default to "not required".
    19 years a Zencart User

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Compulsory Attribute

    What you do is make another option value for the option name, called "Select" or whatever, and add that as an attribute, setting it as Default and Display Only in Attribute Controller.

    Then the customer will be required to actively make a choice before adding to cart.

  4. #4
    Join Date
    Mar 2006
    Posts
    71
    Plugin Contributions
    0

    Default Re: Compulsory Attribute

    Thanks for the quick reply the only problem i have with the method you have suggested is that i have hundreds on option names which have already been entered and it would take me days to get through them all due to the amount of products and attributes are online.

    Is there any more ideas that i can try which may resolve the problem with a template alteration in the attribute controller template.

    Thanks
    Brad

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Compulsory Attribute

    If you have advanced PHP or maybe javascript coding skills, you could probably write something that would replicate the "required response" function that is already built in with the display only.

    Otherwise, you have the answer and will just need to implement it. Check out the option value copying possibilities.

    Since you say you have hundreds of different option names, there will not be a nice bulk copy feature, but you can make a new option name with only the Select value, and in Option Names Manager use the "Copy ALL Option Values to another Option Name" function to propagate it faster.
    Then I think you will have to add each value in Attributes Controller.

    If you have option names which are used by more than one product, then you can bulk copy the new attribute to all other products with that name, in Attributes Controller using "Add ALL Option Values to ALL products for Option Name"
    Update ALL existing products that have at least ONE Option Value and Add ALL Option Values in an Option Name.

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

    Default Re: Compulsory Attribute

    NOTE: To copy 1 attribute to 1 or more categories where you already have Option Names and want to add 1 more option value you can do this in the Option Value Manager ...

    Say you want to add the Color Pink to all Products with the Color Red in categories_id 45 ...

    Look in the Option Values Manager and you will see:
    Copy to ALL Products where Option Name and Value ...
    Select an Option Name and Value that currently exists on a product or products that you then want to copy another Option Name and Value to for all products with this existing Option Name and Value
    Pick from the Option Name From: COLOR and Option Value From: RED
    Pick from the Option Name To: COLOR and Option Value To: Pink
    Pick categories_id 45
    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!

  7. #7
    Join Date
    Jan 2006
    Posts
    55
    Plugin Contributions
    0

    Default Re: Compulsory Attribute

    Quote Originally Posted by gjh42 View Post
    What you do is make another option value for the option name, called "Select" or whatever, and add that as an attribute, setting it as Default and Display Only in Attribute Controller.

    Then the customer will be required to actively make a choice before adding to cart.
    Thanks for this - been trying to sort this for ages.

    Also is there any way to make this 'select' or default option invisible i.e. not appear on product listing on website?
    (it pushes photo-attribute options onto two lines but would prefer it not to show if possible)

 

 

Similar Threads

  1. v150 email not compulsory
    By nrkar in forum General Questions
    Replies: 1
    Last Post: 27 Sep 2012, 08:21 PM
  2. compulsory products
    By Kathy_ in forum Customization from the Admin
    Replies: 7
    Last Post: 19 May 2012, 04:36 PM
  3. How do I set a compulsory option?
    By richardsnowstar in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 8 Nov 2010, 06:35 AM
  4. Compulsory Field
    By aminut in forum General Questions
    Replies: 2
    Last Post: 27 Jan 2010, 08:42 AM

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