Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Join Date
    Feb 2008
    Location
    Washington State
    Posts
    236
    Plugin Contributions
    0

    Default Re: Attribute options with 2000 choices?

    Back again... still haven't launched the store due to all the options for the CD's.

    I have now made seven form select boxes which when the customer selects the child's name will make a javascript shoot the selected name to the attribute text field that I choose. I have this working off site. But, don't know which .php file to edit to get it to get called up with the attribute code on the product page.

    Anybody know which file I need to insert my fancy code into?

    I would like the code to be called up on the product page.

    ***I promise to share what I did once I get it up and running ;-)

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

    Default Re: Attribute options with 2000 choices?

    Quote Originally Posted by jasmel View Post
    ***I promise to share what I did once I get it up and running ;-)
    This is what I did to get the 2000+ choices on my product info pages.

    Each of the seven CD's has a different name list.

    Code:
    <!--bof Names Selection -->
    
    <?php if($_GET['products_id']==1) { 
     include("CD1.php");
     }
    elseif($_GET['products_id']==8) { 
     include("CD2.php");
     }
    elseif($_GET['products_id']==3) { 
     include("CD3.php");
     }
    elseif($_GET['products_id']==4) { 
     include("CD4.php");
     }
    elseif($_GET['products_id']==5) { 
     include("CD5.php");
     }
    elseif($_GET['products_id']==6) { 
     include("CD6.php");
     }
    elseif($_GET['products_id']==7) { 
     include("CD7.php");
     }
    ?>
    <!--eof Names Selecton -->

    See example: http://www.justmymusic.com/store/ind...&products_id=3

  3. #13
    Join Date
    May 2006
    Posts
    51
    Plugin Contributions
    0

    Default Re: Attribute options with 2000 choices?

    Jasmel,
    sent you a private message if you can take a look when you can...

    Rich Fallon
    Occasion Essentials

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

    Default Re: Attribute options with 2000 choices?

    I modified the tpl_products_music_info_display.php file by adding the php includes code (*music because my products were loaded into the music category)

    Code:
    <?php if($_GET['products_id']==1) { 
     include("CD1.php");
     }
    elseif($_GET['products_id']==2) { 
     include("CD2.php");
     }
    ?>
    In this example I uploaded two files (CD1.php and CD2.php) files. Which had a simple form select option with the names for that CD. (*I had to do this for all seven CD's I sell.)

    So when the page loads the include code checks to see which product id is going to be displayed and then grabs the correct file to include.

    form code:
    Code:
    <select size="5" name="CD1" id="CD1">
    <option value="000002">Aaliyah</option>
    <option value="000003">Aaron</option>
    <option value="000004">Abbie</option>
    <option value="000005">Abby</option>
    </select>
    Example: www.JustMyMusic.com (It will take you to one of the CD's and scroll down past the fold to see the selection box.)
    ~ 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. #15
    Join Date
    May 2008
    Posts
    13
    Plugin Contributions
    0

    Idea or Suggestion Re: Attribute options with 2000 choices?

    Hi There:

    I had the same issue. And thank you this post got me on the right track

    I initially set things up the same way you did but the copy the name from above bit really bugged me as it comes off as being clunky. After a couple of false starts and hair pulling i was able to come up with a method to integrate external drop down list into the Attributes system of ZenCart.

    First off I created a Text Entry in Catalog:Option Name Manager to hold the drop down list result.

    Then I inserted the includes into tpl_modules_attributes.php as opposed to product info to get the dropdown to appear after the Please Choose: header for the Attributes.

    Code:
    <?php if ($zv_display_select_option > 0) { ?>
    <h3 id="attribsOptionsText">
    <?php echo TEXT_PRODUCT_OPTIONS; ?></h3><?php } // show please select unless all are readonly ?>
    
    <!--bof Available Names -->
    <?php if (($_GET['products_id']) == '3') {  include 'prd_03.php';  }
      elseif (($_GET['products_id']) == '4') {  include 'prd_04.php';  }
      elseif (($_GET['products_id']) == '5') {  include 'prd_05.php';  }
      elseif (($_GET['products_id']) == '6') {  include 'prd_06.php';  }
      elseif (($_GET['products_id']) == '7') {  include 'prd_07.php';  }
      elseif (($_GET['products_id']) == '8') {  include 'prd_08.php';  }?>
    <!--eof Available Names -->
    
    <?php    for($i=0;$i<sizeof($options_name);$i++) {?>
    For the include files I made some name and code changes to insert the selection into data tables along the lines of the following:

    Code:
    <div id="productAttributes">
    <div class="wrapperAttribsOptions">
    <h4 class="optionName back">
    <label class="attribsSelect" for="attrib-17">Child's Name: </label>
    </h4>
    <div class="back">
    <select name="id[txt_17]" id="attrib-17">
    <option value="0" selected="selected">-- Please Choose --</option>
    <option value="3">A.J.</option>
    .
    .
    .
    <option value="9189">Zoe</option></select></div>
    <br class="clearBoth" />
    </H4>
    Now the Selection gets passed along to the Cart etc.

    I'll likely play with this a little more to see if I can convinve ZenCart to Parse and Verify the customers entry to see if they didn't just leave the selection at -- Please Choose -- and rebuild the option list so the names are passed instead of reference #'s but for now at least I can focus on the rest of my 101 things to do list.

    If you want to have a look see http://www.namethosesongs.com still in work in progress mode but feedback is always welcome!

    Greg

  6. #16
    Join Date
    May 2008
    Posts
    13
    Plugin Contributions
    0

    Default Re: Attribute options with 2000 choices?



    So much for figuring I had solved this one...

    OK a week later and while the above does work as far as getting the info into the order goes i realized that adding any ZENish variables to the process tended to break little things like inventory reduction.

    Current solution is to insert the include variables at the end of the end of the attributes module and have the defined Zencart attribute in the product as well.

    The end result is something along the lines of
    ZEN ID[1] Enter Name [TEXTBOX]
    ZEN ID[2] Enter Age [TEXTBOX]

    HARDCODE ID[1] Select name from list [DROPDOWN]

    So far it seems to trick ZEN into thinking everything is OK and not break anything in the process.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v150 Can Customer Choose Multiples of Attribute Choices?
    By nadinesky in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 29 Feb 2012, 12:54 AM
  2. Attribute Choices
    By leew04 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 3 Mar 2008, 02:15 AM
  3. Attribute with multiple options?
    By davidpiddington in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 24 May 2006, 10:48 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