![]() |
Making product description non-mandatory
When adding a product I need to be able to make the 'short description' field non-mandatory. I do not want to remove the field completely but just make it so it can be left blank. I've searched around the main/product_details.tpl and main/product_modify.tpl but do not know which code to modify?
Any help would be appreciated. |
Required Fields for Product Modify
The required fields can be changed by adjusting line 82 in product_modify.php ----
$fillerror = (($categoryid == "") || empty($product) || empty($descr) || ($price == "") || ($avail == "") || empty($low_avail_limit)); remove "empty($descr) || " |
I can't seem to find that line.
|
Required fields?
Ahhh. I got it. It was at line 269 in my version.
|
glad to know that you got it. but, however does it solve your problem exactly what you want?
|
The problem with removing that error checking function from that line (269 for me too btw) is that now it won't validate the Full Description field and that field can now be submitted without being filled out, which is a bad thing.
I'm also wanting to remove the short description box from the admin products page and have had some resistance thusfar. I'm going to dig further, but I believe some further hacking is going to be required. Any suggestions? If I beat you guys to it I'll reply my findings. |
Okay - here's the deal.
Don't worry about include/product_modify.php Leave it alone - it does what it's supposed to. Edit: /yourSkin/main/product_details.tpl Instead of this: Code:
<tr> I replaced that whole row with a hidden field: Code:
<input type=hidden value=" " name="descr" /> So the textarea doesn't have to be a textarea, its just that the variable "descr" just has to have SOME value - hence the 'space' in the value attribute. The BEST way to do this, would be to go hack out every insert and validation rule for this field but - time is money and money talks so... It's semi-ugly but extremely effective. rYno |
All times are GMT -8. The time now is 02:25 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.