• Welcome to KonaKart Community Forum. Please login or sign up.
 
May 06, 2024, 01:47:14 pm

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - ssharma

16
hi
    i stored 
<?xml version="1.0" encoding="UTF-8"?>
<neclace>
   <material>gold</material>
   <carat>24</carat>
</neclace>
and i want to access this comparision data thorogh API . Can i ? And where the neclace xml file stored.Please help me to solve this problem.
17
hi,
   thanks for new version of konakart. i want to do product comparison and for this konakart added a new "comparison" attribute to the Product object. The purpose of this attribute is to store structured data such as xml that can be used to compare features with other products.

i want to ask is there any pre xml tags are defined or not ?and can u help me for this in detail.
18
hi
I am using konakart API as am ecommerce application and there is need to access product by certain criteri and i am using
                                prodSearch.setCategoryId(subcategory[l].getId());               
            prodSearch.setSearchInSubCats(true);
            products=eng.searchForProducts(null, dataDesc, prodSearch, -1);
but i am not getting product description so again i am using
forDesc=eng.getProduct(sessionId,relProduct.getId(),-1);
so plese help me how i will get all product detail including description with a single database call
19
hi
    i want to search product's detaills according to category wise but for gettng product description i have to include this line          

      forDesc=eng.getProduct(sessionId,relProduct.getId(),-1);


because by using this code i am not able to get products description

                                products=eng.searchForProducts(null, dataDesc, prodSearch, -1);
            relProduct=products.getProductArray();

and for this databsse call inincreased  and it is not sufficient so please help me for solving that problem

package org.argus.konakart;
import java.math.BigDecimal;
import java.util.*;

import org.medicalert.website.idm.entities.Product;
import org.medicalert.website.idm.entities.impl.ProductImpl;

import com.konakart.app.DataDescriptor;
import com.konakart.app.Products;
import com.konakart.appif.ProductIf;
import com.konakart.appif.ProductsIf;
import com.konakart.app.ProductSearch;
import com.konakart.appif.CategoryIf;


public class GetCategory_Detaila extends BaseApiExample
{   
    public static void main(String[] args)
    {
        try
        {
           // Initialize the connection with konakart and acquire session Id
      
      GetCategoryInfo();
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }
    public static void GetCategoryInfo()
    {
       Date senddt = new Date();
      long d1 = senddt.getTime();
       init();
       if(sessionId == null)
       {
          System.out.println("not exist");
       }
       try
       {
      int i;
      CategoryIf category[]=eng.getCategoryTree(-1,true);
      CategoryIf subcategory[];
      
      int no_sub,j,l;

      // Create Data Desc object
      DataDescriptor dataDesc = new DataDescriptor();
      dataDesc.setOffset(0);
      // Set maximum no of row fetched from database at a time.
      dataDesc.setLimit(50);
      
      ProductSearch prodSearch = new ProductSearch();
      
        ProductsIf products =null;
       // eng.getProduct(sessionId,product_id,-1);
      //eng.searchForProducts(null, dataDesc, prodSearch, -1);
      
      
      ProductIf relProduct[];
      ProductIf output;
      
      int total_category;
      total_category = category.length;
      System.out.println("The total categoies are :::" +total_category);
      System.out.println("\n =================================================== \n");   
      
      HashMap<String,List> temp = new HashMap<String,List>();
      
      for(j=0;j<total_category;j++)
      {
         subcategory=category[j].getChildren();      
         no_sub=category[j].getNumberOfProducts();
         System.out.println("\n\nCategory :"+category[j].getName()+ "("+no_sub +")");
         List productList = new ArrayList();
         ProductIf forDesc;
         for(l=0;l<subcategory.length;l++){
            prodSearch.setCategoryId(subcategory[l].getId());               
            prodSearch.setSearchInSubCats(true);
            products=eng.searchForProducts(null, dataDesc, prodSearch, -1);
            relProduct=products.getProductArray();
            //output=eng.getProduct(sessionId,relProduct[l].getId(),-1);
            
            Product product = null;
            
            
            for(i=0;i<relProduct.length;i++){
               
               //System.out.println("Products name is :;" +relProduct);
               product = new ProductImpl();
               product.setProductId(String.valueOf(relProduct.getId()));
               product.setProductName(relProduct.getName());
               product.setPrice(relProduct.getPriceExTax().doubleValue());
               product.setDiscountedPrice(0.0);
      
               //product.setProductDescription(relProduct.getDescription());
               product.setProductImage(relProduct.getImage());
               forDesc=eng.getProduct(sessionId,relProduct.getId(),-1);
               product.setProductDescription(forDesc.getDescription());
               System.out.println("Desc is "+product.getProductDescription());
               productList.add(product);
         
               
            }
            
         }
         System.out.println("Size of List :: "+productList.size());
         temp.put(category[j].getName(), productList);
      }
      
      /*
      System.out.println("----------------------------------");
      List<Product> l1 = null;
      for(String keyStr : temp.keySet()){
         System.out.println(keyStr);
         l1 = temp.get(keyStr);
         for(Product p : l1){
            System.out.println(p.getProductId());
         }
      }
      System.out.println("----------------------------------");
      List tempList = temp.get("Software");
      
      System.out.println(tempList.size());
      */
      /*for(int t=0;t<temp.size();t++)
      {
         temp.get(key)
      }*/
      Date recdt = new Date();
      long d2 = recdt.getTime();
      long diff=d2-d1;
      System.out.println("Time to execute progrma in miliseconds :  "+ diff);
   }
       catch(Exception e)
       {
             System.out.println("Error is"+e);
       }
     }
}
20
hi ,
i want to add fedex shipping module in konakart. Can you help me for this .
And ,can you list down all the places where it requires change.
21
hi,
   i want to search product details according to manufacturer . i got all the manufacturer -name bt i didnt get product details.And there is no method available in konakart API to get total number of products so please help me .
package org.argus.konakart;

import com.konakart.app.DataDescriptor;
import com.konakart.app.Manufacturer;
import com.konakart.app.ProductSearch;
import com.konakart.appif.ManufacturerIf;
import com.konakart.appif.ProductIf;
import com.konakart.appif.ProductsIf;

public class price extends BaseApiExample
{

   public static void main(String[] args)
   {
      try
      {
         Search_Criteria();
      }
      catch(Exception e)
      {
         e.printStackTrace();
      }
   }
   public static void Search_Criteria()
   {
      init();
      try
         {   
            ManufacturerIf manufacturer[];
            DataDescriptor datadesc = new DataDescriptor();
            datadesc.setOffset(0);
            datadesc.setLimit(0);
            ProductSearch prodsearch = new ProductSearch();
            eng.searchForProducts(null, datadesc, prodsearch, -1);
            manufacturer = eng.getAllManufacturers();
            ProductIf product_list[];
            System.out.println("The total number of manufacturer are ::" +manufacturer.length);
            
                     for(int i=0;i<manufacturer.length;i++)
                     {
                           ProductsIf products;
                           System.out.println("The name of manufacturer is :::: " +manufacturer.getName());
                           prodsearch.setManufacturerId(manufacturer.getId());
                           products = eng.getAllProducts(sessionId,datadesc, -1);
                           product_list = products.getProductArray();
                           //System.out.println("The name eof product is ::: "  +product_list.getManufacturerName());
                           //prodsearch.setSearchInSubCats(true);
                           products = eng.searchForProducts(null, datadesc, prodsearch, -1);
                           //product_list = products.getProductArray();
                                 for(int j=0;j<5;j++ )
                                    {
                                       System.out.println("The name of product is :::" +product_list.getName());
                                    }   
                     }
         }
      catch(Exception e)
      {
         e.printStackTrace();
      }
      
   }
}



22
hi
i am getting the method from which i will get the total number of categories in root.
23
hi heidi
    thank you very much for answering my question.
24
hi ,
     I want to fetch product_attributes through konakart API bt i found null pointer exception. Can anybody help me to found products_attributes. i am posting the code also.
import java.util.*;
import java.io.*;
import com.konakart.app.KKException;
import com.konakart.app.DataDescriptor;
import com.konakartadmin.app.*;
import com.konakart.appif.ProductsIf;
import com.konakart.appif.ProductIf;
import com.konakart.appif.OptionIf;
public class FetchProductPrice4 extends BaseApiExample
{
   
    public static void main(String[] args)
    {
        try
        {
      init(); 
      int i;
      ProductsIf output;
      ProductIf data[];
      OptionIf option_data[];
      DataDescriptor dataDesc = new DataDescriptor();
      //DataDescriptorIf dataDesc = new DataDescriptorIf();
      dataDesc.setOffset(0);
      dataDesc.setLimit(50);
      output=eng.getAllProducts(sessionId,dataDesc,-1);
      data=output.getProductArray();
      System.out.println("\n\n\n\n\n\n\n\n\n");
      for(i=0;i<output.getTotalNumProducts();i++)
      {
            
            option_data = data.getOpts();
            System.out.println("\nAfter the getopts method");
            System.out.println("The value of i is :: " +option_data);
            System.out.println("The price is  ::: " +option_data.getValueId());
         
      }
   
      
      
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}
25
Feature Requests / buty 1 get 1 free kind of facility
February 05, 2008, 01:39:17 pm
hi
i want this kind of facility   
purchase more than $100 and receive a free 1 year Advantage Renewal
purchase a silver ID and receive free FedEx shipping
Is it possible in konakart
26
hi
  there is a requirement of this kind Purchase two items worth $50 or more each and receive free shipping
and in konakart there in only order value discount. Is it possible in konakart ? please relply if any option for this .