Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 05-02-2014 11:05:36

mickelb
Member
Registered: 08-07-2011
Posts: 127

Discount Codes not flexible enough

I guess I'll get a "request a quote" to this. If I do does anyone want to share the cost :-).

I would like to be able to :

1) Set a Discount Code top expire after first use, even if the full amount hasn't been used (True/False)
2) Set a minimum spend before the Discount Code is valid (Value >= set value, leave 0 for no minimum spend).

Both seem perfectly normal ways of doing business but not supported in Clickcart as far as I can see.

If it is coming in V9 it is far too late for me.

Offline

 

#2 05-05-2014 09:32:55

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Discount Codes not flexible enough

These are simple mods.  For (1), edit {private}/apps/ecom/ECOM_Order/ext/0100_discount.php.  In there, where you see:

Code:

$codevalue = $codevalue - $disctotal;

Change to:

Code:

$codevalue = 0;

For (2), edit {private}/apps/ecom/ECOM_Checkout/ECOM_Checkout.php.  Look in the cocalcdiscount() function at the top for:

Code:

$this->globals('ecom.total_discount','0');
$this->globals('ecom.discount_basis',array());

Right below that, add:

Code:

if ($this->totals['subtotal'] < 100) {return false;}

This means, if the subtotal is less than 100 (use any amount), you don't process the code.


Nick Hendler

Offline

 

#3 05-06-2014 09:29:12

mickelb
Member
Registered: 08-07-2011
Posts: 127

Re: Discount Codes not flexible enough

Thanks.

I'll give 1 a go.

2 looks as if it sets a global value, which isn't what I am looking for. I am looking to be able to set a mimimum spend, or no minimum, at individual discount code level.

It would be extremely useful to have these attributes added to the Discount Code settings at some point.

Offline

 

#4 05-07-2014 08:23:30

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Discount Codes not flexible enough

Add new fields using Raw DB Admin, and when the code is looked up in cocalcdiscount(), use those values.


Nick Hendler

Offline

 

Board footer