• Welcome to KonaKart Community Forum. Please login or sign up.
 
November 07, 2024, 06:47:04 am

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 - sashwill

1
Is there a way to remove the namespace from all the links that are generated?
for example:
When i click the my account button, the url generated is as follows:
https://myserver/fsportal/portal/_ns:YWtrLTFfX2trLTJ8ZV9zcGFnZXZpZXc9MT0vTG9nSW4uZG8_/iStores

i would like to get rid of the _ns:..._/  if there is anyway to do it.

konakart is running as a stand alone portlet and there is only one instance of it in our portal.


2
Programming of KonaKart / whos online
December 11, 2009, 04:47:11 pm
How does the whos_online table get populated?
3
This is how I fixed it because there is a bug in the save order method. I placed this in the CheckoutServerPaymentSubmitAction class just before save is called.


OrderProductIf[] orderProducts = order.getOrderProducts();
  for (OrderProductIf op : orderProducts) {
     int scale = new Integer(order.getCurrency().getDecimalPlaces()).intValue();
     op.setFinalPriceExTax(op.getPrice().multiply(new BigDecimal(op.getQuantity())).setScale(scale + 1, BigDecimal.ROUND_HALF_UP));
}


This makes sure that when they divide in the save method it comes out with a number that is valid.
4
Is there a bug report forum that I have missed?
I think I may have found a bug in the Konakart software. I was relaying that information to you.  If there was a fix, I was hoping someone might reply with what they did to fix it or since Konakart also helps out people within this forum, one of you might respond with some useful information.  I found a partial answer in another thread that helped me to find a work around. I will post that work-around now for anyone else who might need it. 
Since this appears to be a major bug I thought you might like to know.

In the CheckoutServerPaymentSubmitAction

for (OrderProductIf op : orderProducts) {
                int scale = new Integer(order.getCurrency().getDecimalPlaces()).intValue();
                op.setFinalPriceExTax(op.getPrice().multiply(new BigDecimal(op.getQuantity())).setScale(scale,BigDecimal.ROUND_HALF_UP));
             }


Do this before trying to save the order.

I believe the error is caused by rounding issues as the order is calculated.  Then when the order is saved, the line price is divided by the quantity throwing the exception.  Perhaps it is my issue alone due to the way I wrote my discount module, but if not, perhaps I can save someone else some time.

I have found this forum to be very helpful in the past and hopefully it will continue to be.

P.S.  Ver 3.2 will most likely do the same thing.

5
I'm having the same error on my customized system. ver 2.2.6
order price of 3.72  applying a 1% discount rounded to 3 places gives an order price of 3.6830 quantity of 24

I was able to decomplie the OrderManager class and I noticed this code
Quoteif(orderproduct.getQuantity() > 1)
            {
                bigdecimal = orderproduct.getFinalPriceExTax().divide(new BigDecimal(orderproduct.getQuantity()));
            }


I had errors in my discount module until i changed the divide statement to include scale like this

Quote.divide(new BigDecimal(100), scale, BigDecimal.ROUND_HALF_UP);


Is it possible for me to change this code?
Would you be able to test and or provide a patch if this is confirmed as a problem?
6
What would be the best approach to make certain products visible to only a cetain customer group?
I'm currently still using version 2.2.6.
7
Where(what screen) and how did you allow the customer to enter their "need by" date?
Any code your willing to share would help me out a lot.
8
Programming of KonaKart / Re: Shipping addresses
July 07, 2009, 07:36:16 pm
Sorry, I haven't checked the board lately.  My change doesn't allow customer to change address, that already exists in KK.  My change supplies a predefined address, such as "pick-up" location.
9
Programming of KonaKart / Re: Discount module
May 06, 2009, 08:45:04 pm
I got this to work, almost as you suggested.
Here is the section out of ProductDiscount.java that I modified:

Quote// Loop through promotion products to determine whether to apply a discount
                boolean firstLoop = true;
                for (int j = 0; j < promotion.getApplicableProducts().length; j++) {
                    OrderProductIf op = promotion.getApplicableProducts()[j];
                    boolean anotherDiscount = false;
                    if (promArray.length > 1) {
                        for (int ii = i; ii < promArray.length; ii++) {
                            if (promotion == promArray[ii]) {
                                continue;
                            }
                            BigDecimal discountApplied2 = getCustomBigDecimal(promArray[ii].getCustom3(), 3);
                            int minProdQuantity2 = getCustomInt(promArray[ii].getCustom2(), 2);
                            if (discountApplied.compareTo(discountApplied2) != 1 && op.getQuantity() >= minProdQuantity2 ) {
                                anotherDiscount = true;
                            }


                        }
                    }
                    if (op != null && op.getQuantity() >= minProdQuantity && !anotherDiscount) {
                        System.out.println("calculating new price");
                        // Get the current //total// price of the product(s)
                        BigDecimal currentOrderPrice = null;
                        BigDecimal currentPrice = null;
                        if (applyBeforeTax) {
                            currentOrderPrice = op.getFinalPriceExTax();
                            currentPrice = op.getPrice();
                        } else {
                            currentOrderPrice = op.getFinalPriceIncTax();
                        }

                        // Apply the discount
                        BigDecimal discount = null;
                        BigDecimal orderDiscount = null;
                        if (percentageDiscount) {
                            // Apply a percentage discount
                            discount = (currentPrice.multiply(discountApplied)).divide(new BigDecimal(100));
                            orderDiscount = (currentOrderPrice.multiply(discountApplied)).divide(new BigDecimal(100));
                            op.setPrice(currentPrice.subtract(discount));
                            order.setTotalExTax(order.getTotalExTax().subtract(orderDiscount));
                            order.calculateTotals();

                        } else {
                            // Apply an amount based discount
                            discount = discountApplied.multiply(new BigDecimal(op.getQuantity()));
                        }


I did not modify the dollar amount discount because we are not using it, so be aware that this mod does not cover all types of discounts.  Also testing is very limited at the moment.
10
Contributions / Re: Maven webservices pom
May 06, 2009, 08:36:58 pm
I should add that this is for konakart-2.2.6
11
Contributions / Maven webservices pom
May 06, 2009, 08:24:48 pm
Attached is a file for a maven project in netbeans to generate the webservices from the WSDLs
12
I've been able to isert a new product into a customer's basket, but i can't figure out how to update the session so the customer can see the inserted item.  I'm sure the item is there because if i click the update button while on the cart contents it shows up just fine. 
Can i force an update from the soap calls?
13
Programming of KonaKart / Discount module
April 24, 2009, 04:14:01 pm
Has anybody written a quantity discount module that changes the price at the line item level instead of the order total like the one that comes with Konakart?

To the kona experts:
Is there an easy way to modify the existing module?
14
Programming of KonaKart / Re: Shipping addresses
April 14, 2009, 04:07:13 pm
I found a way to do it.  Not pretty but it seems to work.  If anyone is interested how i solved it, reply and i'll post my solution.
15
Programming of KonaKart / Shipping addresses
April 08, 2009, 07:52:53 pm
I'm want to create a shipping module that is for customer pick up, therefore it would not be using one of the customer addresses.
How would i go about storing this address and if they select pick-up it would auto-magicly populate the pick-up address into the delivery field?