Splatter Posted May 25, 2004 Posted May 25, 2004 I'm looking to add a text field (area) up to 1000 charactors for a product. For the user to add text, that they want for the product. Any info would be a great help. Thanks Cheney Quote Splatter
♥bruyndoncx Posted May 25, 2004 Posted May 25, 2004 checkout option types contribution Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt
Splatter Posted May 25, 2004 Author Posted May 25, 2004 Thanks for the Info, But I all ready have that working, what I would like to do is add another type. Text Field, Memo field, or a Text Area that can hold up to 1000 characters. Any info would be great. Thanks Cheney Quote Splatter
♥bruyndoncx Posted May 25, 2004 Posted May 25, 2004 isn't this explained in the contriubtion or on the board on how to do this ? I recal some explanation about this, but forgot where I saw it. Note, though varchar I think is limited to 255 chars, so you'd probably have to settle for a 2K or so text field (not sure about the exact definition in mysql). Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt
Splatter Posted May 25, 2004 Author Posted May 25, 2004 Not that I can find. I can chnage the character Lenght to 255, but it is one long box, I would like it to be a box about 90 charactors wide with Text wrap, and possibly a scroll abar on the side of it. I hope I'm making sense. Any info would be great. Thanks Cheney Quote Splatter
Splatter Posted May 26, 2004 Author Posted May 26, 2004 What I'm looking to do is add a comment section to each product. Much like the comment section on the first Check out page. I already have extra product option setup. (text box, radio buttons, and check boxes). but need 1 additional type. Comment box, text field, or memo area. I look forward to any comments. Here is a link that might help show what I'm doing. http://fworder.splattergraphics.com/produc...&products_id=51 thanks Cheney Quote Splatter
Splatter Posted May 26, 2004 Author Posted May 26, 2004 Can Anyone let me know if what i'm after can be done. or am I spinning my wheels, and causing more gray hair. Cheney Quote Splatter
♥bruyndoncx Posted May 27, 2004 Posted May 27, 2004 There are 2 parts to your question 1) showing a TEXTAREA iso TEXT field, i belive you could extend the option types and create a TEXTAREA Type field basically copy/paste of TEXT setup and modifying the HTML generated. BUT 2) if you check the readme.html for the option types, it says that TEXT is limited to 32 chars because of the field limitation in the shopping cart and order tables that are used. As usual, you should be able to change this, and increase this value but it's unclear what the consequences would be, the readme has some serious warnings about this. Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt
laidbak Posted May 27, 2004 Posted May 27, 2004 I may be the only person that understands what this gentleman is going through. I tried that same contribution to get the same effect 'Splatter' is looking for. The problem with the contribution you all are suggesting is : 1 - You have to add this for EVERY SINGLE PRODUCT... it doesn't just appear for every product by default. 2 - Even if you wrote a quick query to add this attribute to a product automatically, you still have to worry about the 32 character limit. 3 - Fact of the matter is the 32 character limit is not a big deal as my client wanted at least 255... ok, no problem, go into the database change the field to text, modify the html to not have a limit on max characters entered, and also constrain the textbox so that it doesn't ever go past 90 characters in width... other wise it will screw up your layout. #3 was the fix I made for my client... it was ok, but still not adequate. I backed out of that and went back to a previous version... Basically it was working, but the following reason is why I gave up on it #4 - Even though I had this working, the real problem is that you can only enter text when you are on the product_info.php page... My client wants to have this on the product list page... which makes sense from the business side. So, I somebody message me in a couple days (I'll probably be done today) about what I come up with... I'm going to write something really quick and dirty to do what I want... BTW, sorry to have bashed this contribution... it is really a good idea, but a bad idea if you are looking for text more than 32 characters which is not very practical. On the other hand, it only took me 10 minutes to figure out how to hack it to work with larger text and it really took me just 2 minutes to fix the html issue. So, thanks for a good job on the contribution... whomever wrote it. No disrespect intended at all. Trust me. Quote
Splatter Posted May 27, 2004 Author Posted May 27, 2004 Yes Finally someone understands what I'm after... the option types contribution works great for most of what I'm looking to do. But I still need a way to allow the customer to enter a large amount of text. You can set the amount of characters to 32 charactors and even more then 90, which can be set in the database. But it is 1 long text field. anything more then 90 characters conflicts with the layout. But I need to be able to have a Text Field with Text wrap that is 75 charactors wide, with a slide bar up and down. For example: The comment fileld in the check out section. is what I'm looking for, but within each product. Not at the beginning of the checkout process. Any additional info would be a great help. I look forward to see if you can come up with something Laidback. Thanks Cheney Quote Splatter
laidbak Posted May 27, 2004 Posted May 27, 2004 Splatter, From what you just posted, it looks like for your use the contribution you have now will work. For my client it is not a good solution, but you only need to make a couple small modifications to make it work the way you want it. At this point, I forget what file to modify to do this, but you only need to write a small amount of php to do the following: 1 - Where the code creates the actual textbox, change the code to create a TEXTAREA instead. 2 - You have to change the database... Instead of: ALTER TABLE customers_basket_attributes ADD products_options_value_text VARCHAR( 32 ) ; Make it: ALTER TABLE customers_basket_attributes ADD products_options_value_text TEXT ; Quote
laidbak Posted May 27, 2004 Posted May 27, 2004 product_info.php : line 140 $tmp_html = '<input type="text" name ="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']" size="' . $products_options_name['products_options_length'] .'" maxlength="' . $products_options_name['products_options_length'] . '" value="' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] .'"> ' . $products_options_name['products_options_comment']; Change the above code removing this: maxlength="' . $products_options_name['products_options_length'] You also want to change type="text" to make it a textarea instead Then Instead of : ADD products_options_length SMALLINT( 2 ) DEFAULT '32' NOT NULL Do this: ADD products_options_length SMALLINT( 2 ) DEFAULT '75' NOT NULL Quote
Splatter Posted May 27, 2004 Author Posted May 27, 2004 Thank You Laidbak.... I will try and make the code changes, and let you if it worked.... Thanks again for getting me this info..... Cheney Quote Splatter
laidbak Posted May 30, 2004 Posted May 30, 2004 Yes, do let me know how it goes... I am pretty sure that solution will do you well. On the other hand, if it does not you may be able to use the one I'm working on. It is specifically for long text comments which are associated to each product added to the customer's cart. I've called it "Products Extra Comments". I'd like a little feedback on this if you have a moment to check it out. It is at this store location: http://nelsonl.secureonlinestore.com This is a development store so feel free to do what you please. I have only successfully gotten up to the shopping cart thus far, however, you can see most of the functionality as you add/update products to the cart. Let me know if I am missing anything so far in your opinion. There is a lot more I could do with this but since this project is time sensitive I did not add too many bells and whistles (IE admin screens, etc). I did add the ability to turn this thing off in the config file though. Quote
soccercheese Posted July 22, 2004 Posted July 22, 2004 I would really like to add a textarea for each product I have so the user can add any special instructions. This thread is the closest thing I've found to what I want but I'm still confused. Will this work with Option Type or is it an either/or? How can I get it to work with Option Type if this is the case? Please any help would be appreciated, I've been looking and searching throught alot of posts trying to see if this can be done. Quote
laidbak Posted July 22, 2004 Posted July 22, 2004 I tried the option types contrib, but it was too messy for the simple task I wanted. My client was very happy with the custom job I did for him. I simply created a way to add a textbox instruction to each / any product. Some of it is hard-coded for his shop, but I could always pull out the code and make it work for any generic site - Quote
soccercheese Posted July 23, 2004 Posted July 23, 2004 laidbak, if you could please take the time to do that it would be greatly appreciated. from the other posts I've read, i think this would be beneficial to other users as a contribution. I looked at your test site and it's exactly what I was looking for, and if it could work along with Option Type, I'd be in your debt. Thanks! Quote
soccercheese Posted July 26, 2004 Posted July 26, 2004 laidbak, I just want to clarify my last post. I'm not asking for a contribution or anything fancy, the hard coded stuff would be great as I need it for every product. Don't need anything in admin, just need to make sure that the comment is included in the email that is sent. Just need to make sure that it works along with Option Type. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.