| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Making product description non-mandatory | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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.
__________________
v4.0.18 |
|||||||
#2
|
|||||||
|
|||||||
![]() 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) || " |
|||||||
|
#3
|
|||||||||
|
|||||||||
![]() I can't seem to find that line.
__________________
Scott X-Cart Gold 4.0.18 PHP 4.3.9 MySQL 4.1.18 Apache 2.0.55 Windows 2000 Pro |
|||||||||
#4
|
|||||||||
|
|||||||||
![]() Ahhh. I got it. It was at line 269 in my version.
__________________
Scott X-Cart Gold 4.0.18 PHP 4.3.9 MySQL 4.1.18 Apache 2.0.55 Windows 2000 Pro |
|||||||||
#5
|
|||||||||
|
|||||||||
![]() glad to know that you got it. but, however does it solve your problem exactly what you want?
__________________
Dongan MercuryMinds Technologies Professional X-Cart Design, X-Cart Development, X-Cart Customization Services www.mercuryminds.com Follow us at Facebook / Twitter |
|||||||||
#6
|
|||||||||
|
|||||||||
![]() 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.
__________________
gold v4.0.18 -> live ...working on another soon |
|||||||||
#7
|
|||||||||
|
|||||||||
![]() 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:
I replaced that whole row with a hidden field: Code:
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
__________________
gold v4.0.18 -> live ...working on another soon |
|||||||||
|
|||
X-Cart forums © 2001-2020
|