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...
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.
Discount Module: Category Discount when order value over $x
-
- Site Admin
- Posts: 1854
- Joined: Wed Jun 17, 2009 6:30 pm
- Location: South Yorkshire UK
- Contact:
Re: Discount Module: Category Discount when order value over
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...
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...
- Attachments
-
- percentoffitemsincat-beta1.zip
- beta 1 for 6.x compatibility
- (8.07 KiB) Downloaded 1369 times
Re: Discount Module: Category Discount when order value over
hi - did you have any luck modifying this to get it to work on the later version os ISC
would be very interested
would be very interested
Re: Discount Module: Category Discount when order value over
This looks like a useful edit overall but specifically right now I'm curious what exactly this means:
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.
and how it might be related (or be exactly what I'm looking for) to my request:Display discount offer messages even when a product from the discounted categories above is not in the customers cart
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.
-
- Site Admin
- Posts: 1854
- Joined: Wed Jun 17, 2009 6:30 pm
- Location: South Yorkshire UK
- Contact:
Re: Discount Module: Category Discount when order value over
Hi, regrettably I realised I was flogging a fossilised horse (yes, THAT bad!) so I dropped it...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
Time is at a premium so I've had to make some sensible decisions on where to put it..