Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2007
    Posts
    27
    Plugin Contributions
    0

    Default Drop down with only one value in attribute

    I only have one color option for an item but don't want it to be a radio button. I still want it to have a drop down menu, but with just the one item. I experimented with adding another color and sure enough it gives me the drop down menu. So is it a setting or something else.

    You can see the site here: www.pedxshoes.com/index.php

    I'm using the latest zencart.

    thank you,
    Justin

  2. #2
    Join Date
    Nov 2007
    Posts
    27
    Plugin Contributions
    0

    Default Re: Drop down with only one value in attribute


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

    Default Re: Drop down with only one value in attribute

    By default, dropdowns with only one option are displayed as radiobuttons. There is not a setting for this, but it should be possible to disable the switch somewhere in the PHP code.

  4. #4
    Join Date
    Nov 2007
    Posts
    27
    Plugin Contributions
    0

    Default Re: Drop down with only one value in attribute

    Good to know. Thank you.

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

    Default Re: Drop down with only one value in attribute

    To change the behavior of Option Names that are dropdowns with only 1 Option Value where it switches automatically to a selected Radio button so that customers do not waste time clicking the dropdown to discover that there are no other options ...

    You would need to customize the attributes.php module and comment out this whole case statement:
    PHP Code:
                      // dropdown menu auto switch to selected radio button display
                      
    case ($products_options->RecordCount() == 1):
                      if (
    $show_attributes_qty_prices_icon == 'true') {
                        
    $options_name[] = '<label class="switchedLabel ONE" for="' 'attrib-' $products_options_names->fields['products_options_id'] . '-' $products_options_value_id '">' ATTRIBUTES_QTY_PRICE_SYMBOL $products_options_names->fields['products_options_name'] . '</label>';
                      } else {
                        
    $options_name[] = $products_options_names->fields['products_options_name'];
                      }
                      
    $options_menu[] = zen_draw_radio_field('id[' $products_options_names->fields['products_options_id'] . ']'$products_options_value_id'selected''id="' 'attrib-' $products_options_names->fields['products_options_id'] . '-' $products_options_value_id '"') . '<label class="attribsRadioButton" for="' 'attrib-' $products_options_names->fields['products_options_id'] . '-' $products_options_value_id '">' $products_options_details '</label>' "\n";
                      
    $options_comment[] = $products_options_names->fields['products_options_comment'];
                      
    $options_comment_position[] = ($products_options_names->fields['products_options_comment_position'] == '1' '1' '0');
                      break; 
    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!

 

 

Similar Threads

  1. Choosing more than one attribute from a drop down
    By weboptimist in forum General Questions
    Replies: 4
    Last Post: 4 Apr 2011, 04:38 PM
  2. Need Option value to show an Image in Attribute drop down menu.
    By webflink2 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 20 Jan 2011, 08:30 PM
  3. How to add discount to item for only one attribute value?
    By Quimbly in forum Setting Up Specials and SaleMaker
    Replies: 10
    Last Post: 6 Dec 2010, 10:08 PM
  4. More than one drop down attribute
    By sports guy in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 24 Aug 2010, 05:09 PM
  5. read only attribute value size too small/ import html in read only attribute value
    By nazzaw in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 22 Jan 2007, 03:49 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