Page 1 of 1

Discount Module: Category Discount when order value over $x

Posted: Thu Jun 06, 2013 7:58 pm
by Martin
Following on from this topic on Interspire:
https://www.interspire.com/forum/showthread.php?t=14923

... I was looking at how easy it would be to update it to be 6.1.1 compatible... :shock: :lol:

Whilst the changes to template module calls in the PHP file and template TWIG tags were easily resolved it became clear that the whole discount module had been rewritten to use the QUOTE class that came into being in 6.x or possibly a little earlier.

Looking through the code a few key things have changed so I'm brain dumping them here so I can refer back and try to rewrite this thing properly.

1. $GLOBALS['ISC_CLASS_CART']->api->SetArrayPush('DISCOUNT_MESSAGES' calls now seem to be handled by this array $this->banners[] in tandem with 'DiscountMessage' and 'DiscountMessagePlural' and probably a few other labels.

2. $GLOBALS['ISC_CLASS_CART']->api calls are now primarily replaced with $quote (ISC_QUOTE class) calls.
Naturally enough the function names aren't directly translatable and the use of other modules like the TAX class means some of the variables being passed previously are redundant.

Re: Discount Module: Category Discount when order value over

Posted: Thu Jun 06, 2013 9:54 pm
by Martin
Having worked through most of the information I've got the point where I'm reasonably certain the discounting mechanism can be worked in 6.1.x but the option to allow/disallow discounts to be calculated on the bulkdiscounts is causing problems because I'm not sure where it's being applied.

So, find the latest version of the code to the point I could get it to and see if you can figure out what I'm missing then report back...

Re: Discount Module: Category Discount when order value over

Posted: Wed Feb 19, 2014 3:04 am
by cargogirl
hi - did you have any luck modifying this to get it to work on the later version os ISC

would be very interested

Re: Discount Module: Category Discount when order value over

Posted: Wed Feb 19, 2014 10:56 pm
by DBMAN
This looks like a useful edit overall but specifically right now I'm curious what exactly this means:
Display discount offer messages even when a product from the discounted categories above is not in the customers cart
and how it might be related (or be exactly what I'm looking for) to my request:
viewtopic.php?f=13&t=1972

Where I would like a simple message on item page of additional discount/sales to already site wide sale prices (all items). This is rather then the current procedure that only notes additional discounts inside the customers cart.

Re: Discount Module: Category Discount when order value over

Posted: Fri Mar 07, 2014 10:31 am
by Martin
cargogirl wrote:hi - did you have any luck modifying this to get it to work on the later version os ISC

would be very interested
Hi, regrettably I realised I was flogging a fossilised horse (yes, THAT bad!) so I dropped it...

Time is at a premium so I've had to make some sensible decisions on where to put it..