I'd like it so that when the customer signs up they can choose a size and I'll have a record of it. It's to help segment out specific products for specific sizes.
I'd like it so that when the customer signs up they can choose a size and I'll have a record of it. It's to help segment out specific products for specific sizes.
It sounds like you could benefit from a more custom solution. Typically, attributes are used to select size of a product. So it sounds like you would like to store attribute sizes and auto-select for the customer's future orders. That will make their shopping experience easier, and your store management easier. Of course, that would require totally custom code. Just an idea for consideration :)
For now, if you want to manually look at their size from the Customers page, and match it up to the order each time, then you can use a simple dropdown.
The How Did You Hear About Us module has a built-in dropdown and you can edit the fields from the admin. This way, you can easily manage sizes without having to modify code each time: http://www.zen-cart.com/index.php?ma...roducts_id=186
I managed to get it to display the dropdown using an array, but it's not showing the data in the array for the dropdown.
What I have is this:
$extrafieldArray = array();
$extrafieldArray[] = array('id' => '1', 'text' => '1');
$extrafieldArray[] = array('id' => '2', 'text' => '2');
$extrafieldArray[] = array('id' => '3', 'text' => '3');
$extrafieldArray[] = array('id' => '4', 'text' => '4');
$extrafieldArray[] = array('id' => '5', 'text' => '5');
for the array
and then for the dropdown on the registration page:
<?php echo zen_draw_pull_down_menu('extrafield',$extrafieldArray) . (zen_not_null(ENTRY_EXTRAFIELD_TEXT) ? '<span class="alert">' . ENTRY_EXTRAFIELD_TEXT . '</span>': ''); ?>
Any ideas perhaps?
Thank you!
@jackie - thanks for this mod - it is so close to what I need. I've just set up a florist shop for my wife and she wants clients to be able to enter specific information when they register (eg wifes/partners birthday, specific instructions (eg preferred colours). She can then target them with specific bouquets.
@jahmar - I think what you have done, is what I need - I have added an one additional field (added sql to sql and .php files) but I still only see one extrafield box. jahmar is there any way you could share the files you updated so I can see what you changed?
I can send across my email if there is any chance -
Rabbs
Sorry @jackie - you posted earlier:
@ntestinfo11, yes you can add more fields by following the instructions in readme.txt file
I only have instructions.txt (I know this is readme) - but it doesn't say how to add more fields. Is there another readme.txt or...
Thanks in advance
Rabbs
Hmm, perhaps the instructions aren't in there... I will check into that. Basically, the way you would make new fields is by duplicating the "extrafield" throughout the files.
For example, in this file:
includes/templates/YOUR_TEMPLATE/tpl_account_edit_default.php
You would find this code and duplicate it, then add your new variable instead of "extrafield". Let's say, "extrafield2".
Do the same for all the remaining files... find the variable "extrafield" and copy then modify the code.Code:<!-- start extrafield --> <label class="inputLabel" for="extrafield"><?php echo ENTRY_EXTRAFIELD; ?></label> <?php echo zen_draw_input_field('extrafield', $account->fields['customers_extrafield'], 'id="extrafield"') . (zen_not_null(ENTRY_EXTRAFIELD_TEXT) ? '<span class="alert">' . ENTRY_EXTRAFIELD_TEXT . '</span>': ''); ?> <br class="clearBoth" /> <!-- end extrafield -->
Then, you'll want to run the Install script for your new field. Swap out "extrafield" for your new variable in the install.txt script, then run in SQL patches.
Thanks Jackie
Really appreciate your quick response - found my errors after some digging and it's now working - I missed changing the extrafield_defines.php - had a brain freeze...
Many thanks!
I did step 3, checked all the files and they seem to be correct, and all I get on my create account page is the following:
ENTRY_EXTRAFIELD [Text box] ENTRY_EXTRAFIELD_TEXT
Any ideas? I'm running 1.3.8a.
I want the label for the entry to be "Wholesale Group", and I'd love to have a dropdown box where they can select one of many options. Can you help me with that?
Looks like you are missing the language definitions files. Try re-uploading the file in \includes\languages
The add-on worked fine. My question is how to add drop down list in this extra field. For example, the extra filed is for the Souce of Information:
option 1: Goggle Search
option 2: yahoo search
option 3: Magizine ads
etc.
Thanks!
Bookmarks