Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / exemption to global qty discount

exemption to global qty discount

Locked

Started by redxiii on 30 Jun 2006, 9:54 AM · Views: 2,941

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
30 Jun 2006, 9:54 AM
#1
redxiii avatar

redxiii

New Zenner

Join Date:
Jun 2006
Posts:
58
Plugin Contributions:
0

exemption to global qty discount

Here's basically the scenario.

All products of all categories have one price to follow. Say, $2.

Except for one product, the customized product. The category it belongs has no other product except it. And it's worth, say, $20.

Now my problem is, how do I set a typical global quantity discount (using that downloadable module or something else) to all products except that customized one?

I tried changing lines inside ot_qty_discount.php but I am still confused.

Will appreciate anything.

30 Jun 2006, 10:43 AM
#2
redxiii avatar

redxiii

New Zenner

Join Date:
Jun 2006
Posts:
58
Plugin Contributions:
0

Re: exemption to global qty discount

Okay, stupid me. I just found out that there's a newer version of the Global Quantity Discount module, version 1.2.034 out there and I've been using the ol' 1.0. So this new module says it can disable the discount for categories of choice. I tried checking the Custom category and placed 10 items in cart including the custom one, but no discount occured.

3 Jul 2006, 6:27 AM
#3
redxiii avatar

redxiii

New Zenner

Join Date:
Jun 2006
Posts:
58
Plugin Contributions:
0

Re: exemption to global qty discount

Funny, this module's Disable for Categories doesn't exclude a particular category on the checkout list but rather no discount will be offered as long as one of the products in the cart belong to the Disable for Categories.

I have some screenshots here when I tested the module in default test shop of Zencart.

http://www.oneimagehost.com/files/screen001.jpg
http://www.oneimagehost.com/files/screen002.jpg
http://www.oneimagehost.com/files/screen003.jpg

Anyone still using this module? Please help.

6 Jul 2006, 7:50 PM
#4
pilot avatar

pilot

New Zenner

Join Date:
Apr 2005
Posts:
55
Plugin Contributions:
0

Re: exemption to global qty discount

I have just loaded this module and it seems to work OK.

The discounts are applied at check out.

7 Jul 2006, 12:58 AM
#5
emman avatar

emman

New Zenner

Join Date:
Jun 2006
Posts:
10
Plugin Contributions:
1

Re: exemption to global qty discount

Yes it does when only you specified the category and ordered number of products from that category only and no ther order from other category. But try to more products from other categories which are not exempted from discounts. Then click chec out. You will see the problem. I am also experiencing this problem no and it doesnt really work.

It has something to do here...

function check_process_ok() {
	$return = true;...

if (MODULE_QTY_DISCOUNT_DISABLED_CATEGORIES != '') {
		$excluded_categories = explode(', ',  MODULE_QTY_DISCOUNT_DISABLED_CATEGORIES);

		foreach ($GLOBALS['order']->products as $product) {
			foreach ($excluded_categories as $excluded_category) {
				if (zen_product_in_category($product['id'], $excluded_category)) {
					$return = false;
					break 2;
				}
			}
		}
	}

try to make a analysis.... I think this is how it goes.... for each product loop then for each excluded category then loop. if found one then return false.... so i think that's the problem... you will stop and return false when you found exluded category.

From where the function is called, which is:
function process() {
if (!$this->check_process_ok()) {
return false;
}....

from the start of the function it will globally exclude all categories if function check_process_ok() returned false, even if you select only one category. and will compute for the discount for global categories or all categories if it returned true.

This might be confusing but try it. Order product to different categories. With one product belonged to excluded categories.

25 Aug 2006, 9:27 PM
#6
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,735
Plugin Contributions:
56

Re: exemption to global qty discount

Quantity Discounts version 1.1 allows you to target discounting on a per category basis. See
http://www.zen-cart.com/forum/showthread.php?t=39763

Good luck,
Scott

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.