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

adding new field to the customer registration page

Started by maverick, July 05, 2010, 10:49:07 am

Previous topic - Next topic

maverick

Hi,

Please help with this, i am modifying this customer registration field to incorporate a new field "Alternate Email", though they are some custom fields that are i guess provided for this purpose only, but i want to have my own user defined name for this field, and i know that this can be achieved by using modifying the RegisterCustomerForm.java, plus some more java files for which i dont have the code, and since for DAO layer we dont have code.... how can we modify it and get the desired result...... please tell me a solution which requires making minimum changes to the konakart code.

many thanks
shiv

kate

why don't you want to use the custom fields?  this is what they are for.

maverick

my requirement is such that i have to add many more custom fields then are present in the products table. i know that i can use those fields, but i was doing a POC of adding more fields since in our case there will be many more fields.

kate

products??    I thought you were talking about customer registration.   

maverick

yeah i have to make modification in the products table..... but i was doing poc by using customer registration module....
and if successful... will then proceed with making changes in the products creation and other things

julie

We have 14 custom fields for the product which can all be used as constraints. If you require fields which are just used to fully describe a product so that it may be compared to another similar product (i.e. mobile phone) then what we suggest is to add some structured data (i.e. XML) to the comparison attribute of the product. In this way  you can add as many attributes as you want (xml tag names) and these can vary widely between different types of products.

maverick

Julie what if there is a case that i need to add a seperate table all together, then how will I achieve that

maverick

currently konakart provides the 5 custom fields in the customers table, but my requirement is such that i need 7 extra fields instead of 5, please tell me how can this be achieved and what all files do i need to modify.

thanks,
shiv

julie

You can add a new table. In the custom directory, build.xml contains targets for generating the required classes from the custom Torque schema. Once you've generated the classes you need to know how to customize the various managers etc. to use them. Since this is for advanced users of KonaKart and is subject to frequent improvements by us, we tend not to document the details in the community version for general use but prefer to keep the functionality for supported customers where we can do some hand holding along the way.

maverick

Thanks julie for all your inputs.....
but i still have doubts....
since we are developing a bookstore application.... so our database schema will have many other tables which are not provided in  konakart.... and will require customising the code of konakart. so wanted to know what is better way of doing of customising the code of konakart.... can we directly modify the business logic code.... or should we extend the classes of konakart and write our own logic...
and you mentioned about using the build-torque.xml for generating the classes
but i guess what ever schema we want to add or modify we need to make an entry in the custom-schema.xml, and when the build.xml is executed then it automatically creates the tables in the database.


julie

Quotesince we are developing a bookstore application.... so our database schema will have many other tables which are not provided in  konakart.... and will require customising the code of konakart. so wanted to know what is better way of doing of customising the code of konakart.... can we directly modify the business logic code.... or should we extend the classes of konakart and write our own logic...


My advice is to try as much as possible to keep your business logic separate from KonaKart and interface to KonaKart using the APIs. You can always customize the KK managers by providing your own managers that inherit from the KonaKart ones and you can customize the API calls by adding code before and after the standard calls. There are also the integration managers to capture events such as when an order is saved or it changes state etc.

If you follow these rules then you'll always be able to easily upgrade to new version of KonaKart which is a big advantage of being API based.

If you look a our customers page http://www.konakart.com/customers you'll see that we have stores in production selling all sorts of products. You'll be amazed how much you can customize without needing to touch the core code. If you have doubts, you should speak to our support team with concrete examples of what you want to do. They should be able to help you find the optimal way for implementing your business logic within a KonaKart environment.

maverick

QuoteMy advice is to try as much as possible to keep your business logic separate from KonaKart and interface to KonaKart using the APIs. You can always customize the KK managers by providing your own managers that inherit from the KonaKart ones and you can customize the API calls by adding code before and after the standard calls. There are also the integration managers to capture events such as when an order is saved or it changes state etc.


Julie here you meant that instead of modifying the konakart code, we should be writing our own managers and should inherits the managers classes provided in konakart... Please confirm.

And after creating our own managers, how will we tell the konakart to consider our manager classes when doing some operations?

In Konakart.properties file we noticed some thing mentioning about the konakart managers, is it here we have to specify our managers classes so that the konakart refers our classes instead of regular manager classes.

thanks & many regards,
shiv :-)

julie

QuoteJulie here you meant that instead of modifying the konakart code, we should be writing our own managers and should inherits the managers classes provided in konakart... Please confirm.

Yes, that is one technique.

QuoteIn Konakart.properties file we noticed some thing mentioning about the konakart managers, is it here we have to specify our managers classes so that the konakart refers our classes instead of regular manager classes


Yes

maverick

Hi,

Is there a way where-in I can add my own modules(Mgr classes) in the konakart.properties files.
eg. I want to fetch the languages and display them on the screens, in com.konakart.bl package LanguageMgr class is there, but same is not present in the com.konakart.al package, please suggest me do i have to write a new class, and how will I provide mapping in the konakart.properties file.

Thanks
shiv