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

Is their any other restriction on the length of variable content except the data

Started by craig@civic, August 19, 2009, 11:44:24 am

Previous topic - Next topic

craig@civic

I have to enter products that have titles longer than the 64 length allowed in the variable name.

Can I just update the length of the column in the database or is their some other validation that will restrict entry?

I am most likely to be using the loader to load products so will not be manually entering data

Brian

Generally speaking you can extend the length of fields in the database.   In most cases you can also configure the validation in KonaKart to respect your own database definitions - refer to http://www.konakart.com/docs/CustomValidation.html in the User Guide for details.

On the subject of the loader....  In the next release of KonaKart (v4.1.0.0) there will be a powerful new XML import/export facility which may be of interest to you.   This new release should be made available within the next few weeks.

craig@civic

I extended the database field OK, but there doesn't seem to be an entry in the validation file for the products, it only has validation for the customer data.

Is the value for "Product Title" hardcoded to 64 somewhere?

craig@civic

To customise the validation for products I changed the CustomValidation.properties file in the .....konakartadmin/WEB-INF/classes and uncommentted the products.name value and changed to the value I required as stated here http://www.konakart.com/docs/CustomValidationAdminApp.html

Brian

From v4.0.0.0 a much wider set of attributes can be configured using this CustomValidation.properties file as follows:


# --------------------------------------------------------------------
#
#  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;32
# Category.image                 = 0;64
# Category.custom1               = 0;128
# Category.custom2               = 0;128
# Category.custom3               = 0;128

# CustGroup.priceId              = 0;3

# 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.priceId                = -1;3
# Product.sku                    = 1;30
# Product.weight                 = 1.5;999.9


The next release, v4.1.0.0, will almost certainly be available in a week or less now...