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

How to modify the existing konakart sql queries

Started by praj, July 01, 2010, 08:45:14 am

Previous topic - Next topic

praj

Hi,


I want to customize the main page of the konakart application.On the main page products are shown on screen.I want to add one more field in products table and show only those products on the main page having these custom field set to 1.How can I modify the existing product related queries/code in the konakart application.Also I do not see any queries in the custom code for the custom modules?...Please help me in this.

Any help or alternative suggestion will be welcome .

Thanks,
Praj

praj

Quote from: praj on July 01, 2010, 08:45:14 am
Hi,


I want to customize the main page of the community version konakart application.On the main page products are shown on screen.I want to add one more field in products table and show only those products on the main page having these custom field set to 1.How can I modify the existing product related queries/code in the konakart application.Also I do not see any queries in the custom code for the custom modules?...Please help me in this.

Any help or alternative suggestion will be welcome .

Thanks,
Praj

michaelwechner


maverick

what if the no of fields which i am considering is more in number then the customs provided?

michaelwechner

NOTE: I am not a KonaKart developer hence please consider this when reading my answers ;-)

Re additional fields, I guess there is no other way than introduce your own fields/tables, whereas for backwards compatibility reasons it probably makes sense to decouple this from the konakart database and use the product IDs as the only cross-reference.

AFAIK the product IDs never change and can be considered as UUIDs (together with the language ID), but I am not 100% sure about this.

Also I would recommend to introduce your own data abstraction layer instead using JDBC directly from your third-party webapp.

Cheers

Michael

kate

Without knowing in much more detail about your requirements it's impossible to say what the best approach is.

If you really have that many custom fields (we have 14 separate custom fields on the product object alone) one popular approach is to add your own custom data in an encoded fashion (eg as an XML string) in the existing custom field(s).   This approach is ideal in many cases as it means that you can simply use all the existing KonaKart APIs without modification.

Other approaches are possible and may be more appropriate but I can't say without knowing your requirements.

praj

Hi,

Thanks for the response.I actually want to filter out the products in catalog based on a where clause like

select * from products where custom_field = true...and only display those products that satisfy this condition in the existing product catalog.

Is this possible ?

Thanks,
Praj

julie

You can do this by setting the constraint in the DataDescriptor. Take a look at AdvancedSearchSubmitAction() to see how to do that.

The latest version of KonaKart has been improved to allow you to define the type of constraint (i.e. exact search or wildcard search).