• Welcome to KonaKart Community Forum. Please login or sign up.
 

Admin validation

Started by Aaron, February 13, 2009, 05:32:51 pm

Previous topic - Next topic

Aaron

For our cart, we need to add descriptions for the Categories.  Essentially it gives customers info on a group of products, and they then select a product under that category.  Unfortunately, I don't see an easy way to do this.  I had thought to use the custom fields, but they are too small.  I then tried increasing them in the db, but the validation on the admin page won't allow more than 128 chars.  So I then found out about the custom validation file, but apparently that only works for the Product class.  Now I'm stuck again.  Anybody know of an easy fix for this, or a way around it?  Maybe I'm overlooking something, because this seems like something a lot of people would need... descriptions for their categories.

Thanks for your help and time!!

bobrowley

I found this article:

http://www.konakart.com/custom_validation_faq.php , which said:
Quote
Only a certain subset of fields can have their validation overridden in this way, but if you need other fields to be made available for validation please get in touch with support at KonaKart.

Currently you can define validation rules for the following fields:

Product.contentType     
Product.custom1         
Product.custom2         
Product.custom3           
Product.custom4         
Product.custom5           
Product.description     
Product.quantity         
Product.model             
Product.name             
Product.sku             
Product.weight         

All of these fields appear (commented out) in the default CustomValidation.properties file in the default installation for ease of reference.


How can I set the validation for the Category.name? And how can I "get in touch with support at KonaKart"?

heidi

The User Guide is the place to look for information on the current version:  http://www.konakart.com/docs/CustomValidationAdminApp.html

A copy of the User Guide is also provided in every download package.



In the next version of KonaKart (probably v4) you will be able to define custom validation on all of these:

# --------------------------------------------------------------------
#
#  K O N A K A R T   C U S T O M   V A L I D A T I O N
#
# --------------------------------------------------------------------
# The parameters to define custom validation in the KonaKart Admin App
# --------------------------------------------------------------------

# --------------------------------------------------------------------
# If no custom validations are defined (or this file is removed) the
# default validation rules are used in the KonaKart Admin App.
#
# If you define custom validations in this file they will override
# the default rules defined in the KonaKart Admin App.
# Therefore, you only need to define the custom validation rules
# that are different to the defaults.
# --------------------------------------------------------------------

# --------------------------------------------------------------------
# If your intention is to increase the number of characters allowed
# in the database for a certain quantity, you will have to modify the
# characteristics of that column in the database first.   If you then
# wish to validate the attribute in the KonaKart Admin App to allow
# for the increased column width... you also need to add your custom
# validation to this file
# --------------------------------------------------------------------

# --------------------------------------------------------------------
# Format:
#
# ClassName.Attribute = [min];[max]
#
# If min or max are not specified they will not be checked.
#
#
# Examples:
#
# Product.custom1 must be a minimum of 2 characters, and a maximum of 30:
# Product.custom1 = 2;30       
#
# Product.sku must be a maximum of 25 characters in length (no min):
# Product.sku = 0;25       
# or
# Product.sku =  ;25
#
# Product.weight must be a min of 1.0 and a maximum of 25.7:
# Product.weight = 1.0;25.7       
#
# Product.quantity must be a maximum of 0 products, but no maximum:
# Product.quantity = 0;       
#     
# Product.quantity no minimum or maximum specified:
# Product.quantity = ;       
#     
# --------------------------------------------------------------------

# --------------------------------------------------------------------
# In the default installation all of the fields are commented out.
# Uncomment only the fields you want to define.
# --------------------------------------------------------------------

# Address.company                = 0;32
# Address.custom1                = 0;128
# Address.custom2                = 0;128
# Address.custom3                = 0;128
# Address.custom4                = 0;128
# Address.custom5                = 0;128
# Address.postcode               = 2;10
# Address.street_address         = 2;64
# Address.suburb                 = 0;32

# Category.name                  = 1;10
# Category.image                 = 0;11
# Category.custom1               = 0;12
# Category.custom2               = 0;13
# Category.custom3               = 0;14

# Customer.email_address         = 2;96
# Customer.custom1               = 0;128
# Customer.custom2               = 0;128
# Customer.custom3               = 0;128
# Customer.custom4               = 0;128
# Customer.custom5               = 0;128
# Customer.telephone             = 0;32
# Customer.fax                   = 0;32

# Order.custom1                  = 0;128
# Order.custom2                  = 0;128
# Order.custom3                  = 0;128
# Order.custom4                  = 0;128
# Order.custom5                  = 0;128
# Order.number                   = 0;128

# Order_Status_History.comment   = 0;1204

# Product.contentType            = 1;5
# Product.custom1                = 0;10
# Product.custom2                = 0;10
# Product.custom3                = 0;10
# Product.custom4                = 0;10
# Product.custom5                = 0;10
# Product.description            = 0;10
# Product.quantity               = ;500
# Product.model                  = 0;20
# Product.name                   = 0;20
# Product.sku                    = 1;30
# Product.weight                 = 1.5;999.9



For "getting in touch with support"...   For supported (those with support contracts) customers, write to support @ konakart . com;  For all others, post on this forum.

--Heidi