KonaKart Community Forum

Installation / Configuration => Configuration of KonaKart => Topic started by: Steveinjava on December 14, 2007, 09:25:20 am

Title: Promotions
Post by: Steveinjava on December 14, 2007, 09:25:20 am
I have just upgraded to 2.2.1.0 and was very impressed by the promotions ability. But when I introduce a "Buy 4 and get 7% off" promotion (and a "Buy 10 get 14% off) and set it to work for a specific product nothing happens when I buy that item in bulk.
I even tried restarting the KonaKart & Tomcat server but I can't get any (noticeable) effect by using the promotion.
Its a product discount. Non cumulative.  I have the active tick box set. I set wide valid dates although I actually want unlimited dates really but couldn't be sure leaving the dates empty would do that.
On the rules page I just have the relevant product selected- for all customers/manufacturers/categories.
Any ideas or just confirmations from someone who has got a similar promotion working would be much appreciated :)
Title: Re: Promotions
Post by: ryan on December 14, 2007, 09:34:30 am
Hi Steve,

Could this be your problem?

The promotion types available in the drop list are defined in the Modules>>Order Total section of the Admin App. New types may be added by adding new modules to KonaKart. Note that the promotion will not become active until the relevent OrderTotal module has been installed.

-Ryan
Title: Re: Promotions
Post by: Steveinjava on December 14, 2007, 12:25:42 pm
Ryan, thanks for that. I had neglected to install the module in my new installation.
Might be a good idea for the promotions page to show installation status for the 2 modules? Maybe even a dialog box if they try to actually add a promotion without the relivant module in place? Just an idea.

Unfortunately installing it and refreshing the cache + restarting the server etc still have not made the promotions visible...I know this has to be something dumb but any further ideas are most welcome.
Title: Re: Promotions
Post by: ryan on December 14, 2007, 01:18:31 pm
I've attached a screen shot of how the promotion is set up in our demo. Our demo uses a coupon which is why the requires coupon check box is checked. You can ignore that if you don't use a coupon.
Title: Re: Promotions
Post by: Steveinjava on December 14, 2007, 02:22:39 pm
Ryan, thanks but that doesn't show me anything new.
Incase it helps here is what my promo screen looks like.
(http://www.sdeals.com/images/screendump.jpg)
I have 'minimum quantity of a product' set to 4 and 10 respectively.
Just as a check I tried creating a promo just like the demo- 10% across the board with no minimums and applied to all customers etc. Even this doesn't work for me. ???
Title: Re: Promotions
Post by: ryan on December 14, 2007, 03:17:16 pm
Here's a screen shot of the OrderTotalModules . Check that the variable with key MODULE_ORDER_TOTAL_INSTALLED in the configuration table has the names of the discount order total modules in it (i.e. ProductDiscount;TotalDiscount;ot_shipping.php;ot_subtotal.php;ot_tax.php;ot_total.php )
Title: Re: Promotions
Post by: Steveinjava on December 14, 2007, 04:49:06 pm
Ryan, I can't find a config file with that key in it...I tried using the admin tool and just using windows explorer...
If I go to configuration on the admin screen I can then select Edit Config Files...
I then have a choice of...

KonaKart Properties File
KonaKart Admin Properties File
KonaKart Logging Properties File
KonaKart Admin Logging Properties File
KonaKart Mail Properties File

Is it one of these I need to edit?
Have a great weekend whatever :)
Title: Re: Promotions
Post by: ryan on December 14, 2007, 06:16:37 pm
Hi,

Sorry, I wasn't very clear. I meant the database table called configuration. You can run this :

SELECT configuration_value FROM configuration where configuration_key = 'MODULE_ORDER_TOTAL_INSTALLED';

This should get set by the Admin App when you install the module. It writes the module name into it. So if you don't see the module name then it means that for some reason the discount module hasn't been installed.
Title: Re: Promotions
Post by: Steveinjava on December 15, 2007, 02:16:22 pm
Ryan, when I run that SQL statement I get just

ot_subtotal.php;ot_tax.php;ot_shipping.php;ot_total.php

I have installed the Product Discount & Order Total Discount modules via the admin UI so any idea why it hasn't got into the db?
More practically can I just amend the contents of configuration_value and it will work?
BTW The relevant files (TotalDiscount.java and ProductDiscount.java are in the right place for inclusion so I am hoping just adding the ref to them will be enough...
Title: Re: Promotions
Post by: Steveinjava on December 15, 2007, 02:33:19 pm
Ryan, I tried

UPDATE configuration SET configuration_value="ProductDiscount;TotalDiscount;ot_shipping.php;ot_subtotal.php;ot_tax.php;ot_total.php" WHERE configuration_key = 'MODULE_ORDER_TOTAL_INSTALLED';

but it doesn't seem to have affected anything  :'(
Title: Re: Promotions
Post by: heidi on December 15, 2007, 08:24:12 pm
Hi Steve,

Ryan did not suggest that you go writing into the database like that...  just to check the value of that key to aid in the diagnosis of the problem.  If you do that you might get into a horrible state.

The Admin App should write that when you install the module (amongst a number of other critical parameters that you will miss if you do it manually - hence comment above).  If it isn't, you need to figure out why.

It's as if your admin app is pointing to a different database to your application (and the one you're checking).  Check that the db definitions in konakart.properties match those in konakartadmin.properties.

Heidi

Title: Re: Promotions
Post by: Steveinjava on December 16, 2007, 05:41:43 pm
Heidi, no worries. I tried the change then put it back after. You are correct about the db. I should have posted yesterday when I realised but felt I had already posted twice so was going to leave it. I was looking at my eApps based db- the one on my own pc does have the two refs below

ProductDiscount;TotalDiscount

So I am back to square one. The db does contain the refs & the promotions tables are all populated with the right sort of data (Names of promos- discount rates- productID of products involved).

I just wonder if the standard jsp pages have the logical by default to show promos? I will check myself now but if it requires a different JSP that will be the reason.

The one good thing about this muddle is it will provide help one day for another user seeing the same thing: When I/we find the cause I will list it out in this forum for max benefit  ;)
Title: Re: Promotions
Post by: Steveinjava on December 26, 2007, 05:49:04 pm
Well I am still unable to get any modules to work in my installation.  ???
ie no shipping (table), no payment (paypal) or productdiscount etc.
I have checked the properties file(s) and the db related fields are correct & match.

What I have realised is I cannot compile the konakartadmin module classes...
They contain imports like...

import com.konakartadmin.modules.ModuleInterface;
import com.konakartadmin.bl.KKAdmin;

but I haven't got the code (or source) for these. Are they available- They do not seem to be in the standard installation jar...
Title: Re: Promotions
Post by: ming on December 26, 2007, 06:04:29 pm
Hi,

I see you're using version 2.2.1.0.

There's an ant build file under the "custom" directory that you can use to build all the module code etc.

Take a look at konakartadmin.jar for those classes you couldn't find.

If you get your compiled module classes in the right places, the properties file setting correct, and install the module successfully you will see it in the application.

Use the modules that work in your environment as a guide.

Ming

Title: Re: Promotions
Post by: Anni on January 04, 2008, 01:12:42 pm
hi steve,

does is work for you now? because I've a similar problem (only for me all other modules work). just the promotions won't take effect.

if you got it to work I'd be happy to hear about your solution.

regards
Title: Re: Promotions
Post by: Steveinjava on January 04, 2008, 03:51:34 pm
Hi Anni! No I still haven't got ANY modules working. Sorry to hear you haven't got Promotions working either.
I am keen to be pointed to a website that DOES have the promotions working actually. Can you tell me where you put the compiled classes like Table.class and Paypal.class (Or whatever payment provider you use).
Presumably you put the promotional classes in the /modules/ordertotal/ directory? Which promotion are you trying to use? I want to allow discount for volume purchases of specific products so have used ProductDiscount.class but the others, like TotalDiscount I haven't tried.
Good luck & hang in there  :D
Steve H
Title: Re: Promotions
Post by: pete on January 04, 2008, 04:09:56 pm
Hi Anni,

Have you gone to the Modules>>Order Total section of the Admin App and actually installed the promotion module that you are using ?

-Pete
Title: Re: Promotions
Post by: Anni on January 04, 2008, 04:14:51 pm
hi steve,

with one exception I didn't do anything to the classes and just left everything as it was. so the classes used in my version will be in the jar files. but otherwise the directory would be classes/com/konakart(admin)/bl/modules/ordertotal/... and resp. for other modules. it should work if you put them there.
and I also just want to use the product discount. just to verify that it actually doesn't work I also installed the total discount and set it up to be active for all products. this didn't work either  :-\
because of this I started printing the promotionIds that are valid for a checkoutOrder to the tomcat console. it seems like for my shop there actually are no promotions ... I just have no idea why that is.

let me know if you find out something new. I'll do the same :)

anni
Title: Re: Promotions
Post by: Anni on January 04, 2008, 04:17:39 pm
hi pete,

yes, everything is installed and I also checked the database entries, which are ok. as I mentioned in the post before I've now installed both promotion types but none of them are working ... neither for specific products nor when active for all products.  ???

regards,
anni
Title: Re: Promotions
Post by: pete on January 04, 2008, 04:53:06 pm
Hi Anni,

As a sanity check I just did a fresh install against a fresh DB. Then I took the following steps:


I've no idea why it isn't working for you.

-Pete
Title: Re: Promotions
Post by: Steveinjava on January 04, 2008, 06:39:54 pm
Pete, I couldn't see the image you were going to attach...Did you forget
Also do you have a handy image of a product quantity discount working?
Cheers Steve
Title: Re: Promotions
Post by: pete on January 04, 2008, 07:43:05 pm
Hi,

I've attached a screenshot of a 33.3% discount if you buy at least 3 printers.
Title: Re: Promotions
Post by: Steveinjava on January 05, 2008, 10:14:38 am
Pete, many thanks- It gives me a bit of relief to see it working - I will try again to work out which class isn't in the right place to get my implementation working.
I presume there is some indication on the product page that a discount is available? The promotions description/name being displayed? When I briefly looked, I couldn't find any JSP with logic to display the promotion so had wondered if I had to update more files. I guess the extra functionality is added by inheritance but haven't had time to look for the code. I guess I should look into the JavaDoc & will do so.
Cheers, Steve
Title: Re: Promotions
Post by: Anni on January 07, 2008, 12:09:29 pm
hi again!

I now tried some other things. first, I added the unmodified class files for the product discount to my konakart and konakartadmin apps (i.e. com/konakart/bl/modules/ordertotal/productdiscount/... and com/konakartadmin/modules/ordertotal/productdiscount/...). after deleting all old promotions and setting up a new product discount for all products, it finally worked.  :)
but normally the class files should be in and read from one of the jars, right?

afterwards I started adding rules to that discount. for normal products, i.e. without any options, this still works fine. but the products I need promotions for have two options. to determine which product has a discount I only use one of those.  but that makes the promotion not stop working again ...  :-\

I'll try to figure this problem out. in the worst case I think I'll have to remove one of the options.
Title: Re: Promotions
Post by: Anni on January 07, 2008, 12:31:22 pm
found the problem. I just needed to add both options. so for me it works now.
hope you get it to work as well, steve.

regards
Title: Re: Promotions
Post by: Steveinjava on January 07, 2008, 01:28:41 pm
Anni, great news. I had already manually added the class files that way but it didn't help for me.
If you are using Windows could you just check for me the web apps file structure?
Assuming the use of the default locations for the installation for ProductDiscount.class I have...
C:\Program Files\KonaKart\webapps\konakart\WEB-INF\classes\com\konakart\bl\modules\ordertotal\productdiscount\ProductDiscount.class

Is that the same for you?

I confess with my problems I have been hacking around a bit and want to ensure I am not chasing my own tail.
I also tried a fresh install on to a laptop and I even get errors running it with the sample db! If I hadn't heard your good news I would have been tempted to give up & either continue my own JSP project or (better?) become a beach comber ;D
Steve
Title: Re: Promotions
Post by: Anni on January 08, 2008, 11:31:30 am
hi steve,

yes, your file path should be correct. I also put in the properties files though I think that won't make a difference. did you also add the productdiscount.class for konakartadmin? not sure if that's the reason why it's not working but it might be well worth a try.

good luck :)

anni
Title: Re: Promotions
Post by: Steveinjava on January 08, 2008, 04:05:37 pm
Anni, cheers for your feedback. Yes I had copied the konakartadmin class files but there again I am a bit confused  ???
In my file structure there are /konakart and /konakartadmin directories within c:Program Files\
but even within C:/Program Files/KonaKart/webapps there are subdirectories entitled /konakart and /konakartadmin
To cover every combination I have copied the C:/Program Files/KonaKart/custom/modules/classes/com/konakart and konakartadmin sundry classes to all the directories in the same relative position in the two places mentioned above.
Is that what you did? Like you, I can't understand why they are not auto-copied when selected...
Thanks in advance for your time when you have it sorted already  :)
Title: Re: Promotions
Post by: kate on January 08, 2008, 04:16:22 pm
QuoteLike you, I can't understand why they are not auto-copied when selected...


What do you mean by this?

If you have not customised the standard modules they will be in their jars already deployed in lib directories. Nothing to do.

If you have customised the modules, how do you think the system will know where you have put the classes to be able to copy them?

Kate
Title: Re: Promotions
Post by: Steveinjava on January 09, 2008, 02:59:39 pm
Hi Kate, if the app does read the lib directory and its jar files then why do I have no shipping,payment or promotion functionality in the web site? I had assumed the selection of a module in the admin app would mean it would read the lib/*.jars, find the relavant classes and insert them into the classes directory, hence my attempts at physically moving them.

Now I am left with no clue as to the problem. ???

Trying a fresh install on a laptop using the default db didn't help- I got different errors but the modules still didn't appear...I had hoped using jdk1.5 instead of 1.6 might have helped. I did get it going on OSCent4 via eApps but my development machines are all windoze.
Steve
Title: Re: Promotions
Post by: kate on January 09, 2008, 03:23:03 pm
Hi,

QuoteHi Kate, if the app does read the lib directory and its jar files

This is standard behaviour for a webapp

Quotewhy do I have no shipping,payment or promotion functionality in the web site

Most likely because you haven't configured it correctly.   Check the steps carefully http://www.konakart.com/configurationfaq.php#How_can_I_activate_a_promotion_

QuoteI had assumed the selection of a module in the admin app would mean it would read the lib/*.jars, find the relavant classes and insert them into the classes directory

This is not what happens.  They are the same class files so this would be pointless.

QuoteTrying a fresh install on a laptop using the default db didn't help- I got different errors
What errors?  There should be an explanation for all errors.  No-one can help you if you just say "I got different errors"

Quoteusing jdk1.5 instead of 1.6

KonaKart works fine with both

Kate

Title: Re: Promotions
Post by: Steveinjava on January 09, 2008, 03:45:33 pm
Kate, I didn't bother the forum with the laptop errors as I prefer to fight on one front at a time. I know webapps look at the jars but as I can't 'see' the modules I was trying to find a cause no matter how unlikely. (Same goes for Jdk1.5- the UI does mention 1.5 specifically so might be worth changing to '1.5 upwards')

I will do as you suggest and repeat the activations: I am sure the problem is going to be something dumb my end but luckily I am stubborn as well as dumb  ;)
Steve
Title: Re: Promotions
Post by: Steveinjava on January 09, 2008, 05:04:15 pm
I have got part way to solving my problems & report them so others can benefit if they make the same
mistakes.
I only have the paypal module and I hadn't worried too much about the parameters assuming I would be able to do that once I had seen the paypal screen. The field named "PayPal Payment Zone" didn't make a lot of sense to me so I put in my 'EU' zone. By reverting to -none- the payment option 'paypal' appears!
The shipping module (Zone) now appears after I realised the ISO-2 code for United Kingdom is GB.
I had tried other countries for test orders but, whatever, it appears now.
Even more bizarre, a product discount now appears on the checkout screen. But there is no warning/advert to show it exists before the checkout screen...The whole point from a marketing perspective is encouraging customers to buy more so that can't be right?

I haven't looked into this yet but maybe its obvious? I have the postage and totals shown twice! (Not added to the cost twice though) as below:

Sub-Total:   £41.33
-14% Vittoria UltraLight Innertube 700x19/23:   -£3.18
Zone Rates (Shipping to GB : 1.40000 lb(s)):   £8.50
Zone Rates (Shipping to GB : 1.40000 lb(s)):   £8.50
Total:   £46.65
Total:   £46.65

BTW, thanks everybody for help so far. Much appreciated. :)
Title: Re: Promotions
Post by: ryan on January 09, 2008, 05:14:44 pm
Quote
a product discount now appears on the checkout screen. But there is no warning/advert to show it exists before the checkout screen...The whole point from a marketing perspective is encouraging customers to buy more so that can't be right?


If you want to automatically (without customizing anything) show a discount for a product then you must set the product special price. A discount module can be very complex and we'd expect you to publicise it using your own wording somewhere on your web site. i.e. It may only come into effect if you have bought at least $50 worth of goods or have bought a set quantity of a single product or have bought a product from a certain manufacturer or have inserted a coupon code etc. This is why the promotion is always calculated on the contents of the basket rather than at the single product level. You may also want to publicise the duration of the promotion.

-Ryan
Title: Re: Promotions
Post by: Steveinjava on January 09, 2008, 05:35:05 pm
Ryan, I had wondered if this might be the case. I think anybody using product discount would benefit from having a description field displayed under the product description.
The overall discount at least appear in a 'special offers' column or page as well.
Otherwise by requiring it hard coded it removes the benefits of db update.
I do not even see the discount(s) applied in the shopping cart- Is that how it should be? On good sites (eg Amazon) you see lines like "You have spent £90, if you increase your order to £100 you will have a discount of 5% applied."
I know you can't have everything (And I don't mind doing it for my site then passing it on) but the promotions ought to be shown before the checkout & be linked to the db.
What do others think? Am I being fussy ;D
Title: Re: Promotions
Post by: ryan on January 09, 2008, 05:51:36 pm
Quote
I think anybody using product discount would benefit from having a description field displayed under the product description.

If your promotion lends itself to doing this, then you can certainly achieve this. However a promotion such as a 10% discount that only applies if you make an order of $100 isn't specific to any single product.

Quote
I do not even see the discount(s) applied in the shopping cart- Is that how it should be?

If you want to show the promotion at the shopping cart level you just have to customize the struts action to calculate it at this point and then visualize it as you see fit.

Quote
On good sites (eg Amazon) you see lines like "You have spent £90, if you increase your order to £100 you will have a discount of 5% applied."

I agree that this is a good feature and it is easily achieved by customizing KonaKart. It isn't something that we can deliver out of the box because it only applies to certain types of promotions and the wording can change dramatically between different types of promotions.
Title: Re: Promotions
Post by: Steveinjava on January 09, 2008, 10:24:43 pm
Ryan, yes it will be easy enough to change the JSP to make things as I want but I see it as a worthwhile option for most promotion users. A new field called Promotion description could be shown on the products that it applies to (For users that it applies to etc). The overall total discounts would instead have a mention on the home page in a prominent position: The home page is a bit lame via the templates - being a mix of products when most custom sites have more general info on it.
Anyway, I will do it for my own use and see how it can be used by others afterwards. While I can see a few such features I would like to see the rest of KonaKart is mouth warteringly good- Well done everyone involved  ;D