Forums / Setting Up Categories, Products, Attributes / Attribute options with 2000 choices?

Attribute options with 2000 choices?

Locked

Views: 3,156

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
18 Feb 2008, 4:54 AM
#1
jasmel avatar

jasmel

Zen Follower

Join Date:
Feb 2008
Location:
Washington State
Posts:
230
Plugin Contributions:
0

Attribute options with 2000 choices?

I have several items that have personalization options.

Example: Music CD with child's name in it.

Shopper would find a Music CD, then add to cart and select the child's name from a option drop down menu. (or set the option to for personalization before adding to cart?)

Can this be done? Do I have to create each option one at a time or can I create all 2,000 names via Mysql script?

I tried to search the forums for this type of question but it seems either it hasn't been asked or I didn't phrase the search properly.

Thanks in advance!

~ 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

18 Feb 2008, 5:11 AM
#2
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Attribute options with 2000 choices?

Why? You can use the text attribute, which allows users to type in the name.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

18 Feb 2008, 5:14 AM
#3
jasmel avatar

jasmel

Zen Follower

Join Date:
Feb 2008
Location:
Washington State
Posts:
230
Plugin Contributions:
0

Re: Attribute options with 2000 choices?

yellow1912:

Why? You can use the text attribute, which allows users to type in the name.

There are only CD's with these 2,000 names in them. Names like Jennica are not available however names like Jennifer, Jessica and other popular names are available.

I have to limit the customer's names selections to the ones that CD's have been made for.

~ 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

18 Feb 2008, 6:15 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Attribute options with 2000 choices?

If you're comfortable writing a MySQL script, you should be able to automate populating the values for an option name in the database. See the Database Schema in the wiki for a list of tables and their field descriptions.

The fun part may be getting a usable dropdown to pick the name from.

18 Feb 2008, 6:20 AM
#5
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Attribute options with 2000 choices?

Im thinking about Ajax ^^.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

18 Feb 2008, 6:31 AM
#6
jasmel avatar

jasmel

Zen Follower

Join Date:
Feb 2008
Location:
Washington State
Posts:
230
Plugin Contributions:
0

Re: Attribute options with 2000 choices?

Could I insert a standard html form with the output value going to the TEXT name textfield?

Select child's name: [drop down menu][^]
Output goes into TEXT area.

Then have the customer continue with the purchase.

I am not familiar with AJAX... is AJAX another option to get to my end goal?

~ 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

18 Feb 2008, 6:37 AM
#7
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Attribute options with 2000 choices?

Well, if you think about it, it's really not possible to have customers choose from a list of 2000 names. Your drop-down list would be too long.
The best way would be: let the customers type the name, but at the same time using javascript to check the name they typed it and tell them it's not available.
You can also use the first characters they type in to suggest available names
for example: if they type in jo then suggest john or jones etc....

Another possible option which is a bit easier:
Make that product a category instead, and inside that categories you have 26 products starting from A-Z (which is the first character of the name)

Then in each product you dont have 2000 options, may be 100 or so, still alot tho.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

18 Feb 2008, 7:23 AM
#8
jasmel avatar

jasmel

Zen Follower

Join Date:
Feb 2008
Location:
Washington State
Posts:
230
Plugin Contributions:
0

Re: Attribute options with 2000 choices?

Sounds like a better option that what I thought I had to do. (Create 2,000 products times seven CD choices. 14,000 possible CD's.)

The above statement just gave me another idea as an option.
Have the customer select the name as the "product" then add one of seven CD's as an attribute. Hmmmmm Then I can use the product filter to help them locate the name.

Don't really know what the best route would be? I can start playing with it more... Unless, somebody else has a great idea. I am willing to try just about anything.

~ 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

18 Feb 2008, 7:34 AM
#9
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Attribute options with 2000 choices?

You could create html docs or pdf files which contain names
available..Link to these files in product description i.e
A,B,C,D,E, each opening in new window.
Then add text attribute to product, whereby customer chooses
one of the available names from those pdf/html files.

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

26 Feb 2008, 4:07 AM
#10
jasmel avatar

jasmel

Zen Follower

Join Date:
Feb 2008
Location:
Washington State
Posts:
230
Plugin Contributions:
0

Re: Attribute options with 2000 choices?

Ok.. I have a new issue to this bigger issue.

The Personalized products I am about to sell are CD's. There are seven CD's to choose from and within each CD there are between 1,800 to 2,400 names to choose from.

Not one of the CD's has the same list of name choices (there are repeats of course) but, none of them use the same exact list of names.

What I plan to do is create a Selection Drop down menu for each CD and somehow have the correct one to display within the individual product's page.

*Guessing by using javascript. (**If somebody is willing to help me on this please Private Message me)

The problem I have, once I get the javascript figured out, is; how to I ensure that I get a receipt of the order with the customer's "name selection" on it? That way I know which CD to mail them.

=========
I do not wish to create an attribute for each CD and each name available for each CD. I would take me hours! 2,000 times seven CD's Ouch!

~ 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 Mar 2008, 3:35 AM
#11
jasmel avatar

jasmel

Zen Follower

Join Date:
Feb 2008
Location:
Washington State
Posts:
230
Plugin Contributions:
0

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 ;-)

~ 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

17 Mar 2008, 5:47 AM
#12
jasmel avatar

jasmel

Zen Follower

Join Date:
Feb 2008
Location:
Washington State
Posts:
230
Plugin Contributions:
0

Re: Attribute options with 2000 choices?

jasmel:

***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.

<!--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/index.php?main_page=product_music_info&cPath=1&products_id=3

~ 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

17 Mar 2008, 7:35 PM
#13
foilman avatar

foilman

New Zenner

Join Date:
May 2006
Posts:
51
Plugin Contributions:
0

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

21 Mar 2008, 1:52 AM
#14
jasmel avatar

jasmel

Zen Follower

Join Date:
Feb 2008
Location:
Washington State
Posts:
230
Plugin Contributions:
0

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)

<?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:

<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

8 May 2008, 2:59 PM
#15
namethosesongs avatar

namethosesongs

New Zenner

Join Date:
May 2008
Posts:
6
Plugin Contributions:
0

Re: Attribute options with 2000 choices?

Hi There:

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

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.

<?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:

<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

21 May 2008, 3:24 AM
#16
namethosesongs avatar

namethosesongs

New Zenner

Join Date:
May 2008
Posts:
6
Plugin Contributions:
0

Re: Attribute options with 2000 choices?

:oops:

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.