Zen Cart Logo
Forums / Addon Order Total Modules / Quantity Discounts for 1.3

Quantity Discounts for 1.3

Views: 226,318

Results 121 to 140 of 847
14 Jun 2007, 12:56 PM
#121
pasher avatar

pasher

New Zenner

Join Date:
Dec 2005
Posts:
64
Plugin Contributions:
0

Quantity Discounts for 1.3

swguy:

Rounding is done at several stages, so this sort of thing will happen.

Scott
Yeah - I suspected it was to do with rounding.
Is your rounding always 'done up', or 'up or down' dependent upon the '.5' breakpoint?
The reason I ask is that when erroneus, the tax is always high. If the roundings were up and down, one would expect it to be correct sometimes, or even low occasionally.

Cheers
Pa

24 Jun 2007, 1:31 AM
#122
sydmich avatar

sydmich

New Zenner

Join Date:
Jun 2007
Location:
Australia
Posts:
60
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

I would like to have discount pricing per item within different categories (based on currency). Each category has different quantity discounts that need to be applied. I have 6 categories that need to have discounts per item.
for example

Category A has 1000 products. Every product in the category has the same quantity discount pricing structure but the discount can not be combined between products within that category.

Category A product 1
0-49 = $0.25 each
50-99 =$0.23 each
100-199 = $0.20 each
200 -249 =$0.18
250 + = $0.15

Category B has say another 800 products that need discounts applied per item as well.
Category B product 1
0-99 = $0.25 each
100- 199- $0.23
200-249 = $0.21
250 - 499 = $0.18
500 + = $0.15

I know that ZC product pricing can do this but it means that I would have to apply the discount individually to all my 3000+ products. Does your module support this as I was unsure after reading the instructions. Any help appreciated thanks

24 Jun 2007, 3:22 PM
#123
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

You would have to write software to do this. PM me for details.

Scott

24 Jun 2007, 5:10 PM
#124
justme avatar

justme

New Zenner

Join Date:
Jun 2007
Posts:
4
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

I installed the module per instructions. I then set the parameters in the (Modules, Order Total, ot_quantity_discount). It worked the first time, but after that, it stopped working. When it did work, during checkout on the last leg it showed the discount; it’s just not working now.

Also, I removed (not just disabled it) the module and reinstalled it. I’m using the latest ZC version and the most recent Quantity Discount module.

Do I need to do something else other than just install the module? I’m just getting started with creating a website with a shopping cart—I’m green to this experience. Any detailed instructions on this will be appreciated.

I do have the Zen Cart book, but I can't find anything in the book that provides info

Please advise.

24 Jun 2007, 10:05 PM
#125
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

The book only discusses the stock cart, not mods.

Are you sure you're putting enough things in your cart to trigger a discount? Otherwise I have no idea.

24 Jun 2007, 11:18 PM
#126
justme avatar

justme

New Zenner

Join Date:
Jun 2007
Posts:
4
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

For test purpose I have the parameters set as follows:
Discount Unit: percentage
Discount Basis: Total Items in Cart
Discount Level 1: $11.00
Discount Amount: 80

My items cost $5.89 and above. When I put any amount above $11 in the shopping cart (i.e. $45 worth of product), it doesn't give a discount in any amount.

It worked the first time only.

24 Jun 2007, 11:27 PM
#127
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

Total items in cart should be 5, 10, 27, 34 or some other cardinal number, not $11. What you're trying to do (if you want thresholds like $11, $22, or whatever) would require more software. PM me for details.

Scott

25 Jun 2007, 2:05 AM
#128
sydmich avatar

sydmich

New Zenner

Join Date:
Jun 2007
Location:
Australia
Posts:
60
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

hi,
Just to let you know we have decided to redo our quantity discounts based on category level (mixed products within category will qualify) so your module with be invaluable
Thanks for your help

25 Jun 2007, 11:54 PM
#129
justme avatar

justme

New Zenner

Join Date:
Jun 2007
Posts:
4
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Your input clarified how this module works. I put in the proper parameters and it's working as it should now, and it will do what I need it to do without futher programming--simple is good. Thanks!

justme

2 Jul 2007, 1:31 AM
#130
vivaraquel avatar

vivaraquel

Zen Follower

Join Date:
Sep 2004
Location:
Australia
Posts:
305
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Will this module apply the discount to the prices in price manager? SaleMaker through admin does not so I am looking for something that will. Thank you.

2 Jul 2007, 1:50 AM
#131
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

It's completely separate from price manager - it's a different mechanism entirely.

4 Jul 2007, 3:56 PM
#132
lvanderb avatar

lvanderb

New Zenner

Join Date:
Mar 2006
Posts:
27
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

I'm using Zen Cart 1.3.7, installed this order_total module - modified apply_special_category_discount() for the particular category I want it to apply a discount for, but it didn't work - I had set the module to do discounts by category.

So, I did some echos and found that $products[$i]['category'] was null, so I added the following subroutine to the calculate_deductions function right after ```
$products = $_SESSION['cart']->get_products();
$prod_list = array();
$prod_list_price = array();
$cat_list = array();
$cat_list_price = array();
$all_items = 0;
$cat_list_back = array();
$prod_list_back = array();
$all_items_price = 0;
for ($i=0, $n=sizeof($products); $i<$n; $i++) {

add the following:

if ($products[$i]['category'] == '') {
$products[$i]['category'] = zen_get_products_category_id($products[$i]['id']);
}


Now I get the quantity discount showing in the checkout page.

Let me know if there's an easier fix!

Thanks,
Linda
4 Jul 2007, 6:07 PM
#133
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

If category is null, you have the dreaded :) Master Categories problem, likely caused by using Easy Populate. You can back up your database, then go to Admin -> Tools -> Store Manager, and click on "Reset ALL Products Master Categories ID".

Good luck,
Software Guy

4 Jul 2007, 7:28 PM
#134
lvanderb avatar

lvanderb

New Zenner

Join Date:
Mar 2006
Posts:
27
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Actually, I looked at ```
$products = $_SESSION['cart']->get_products();

        (which returns the $products array), it does not return a category for the product, which makes it null. 

The shopping_cart class doesn't even mention master_categories_id. Here's the code from the shopping cart class:

$products_array[] = array('id' => $products_id,
'name' => $products->fields['products_name'],
'model' => $products->fields['products_model'],
'image' => $products->fields['products_image'],
'price' => ($products->fields['product_is_free'] =='1' ? 0 : $products_price),
// 'quantity' => $this->contents[$products_id]['qty'],
'quantity' => $new_qty,
'weight' => $products->fields['products_weight'] + $this->attributes_weight($products_id),
// fix here
'final_price' => ($products_price + $this->attributes_price($products_id)),
'onetime_charges' => ($this->attributes_price_onetime_charges($products_id, $new_qty)),
'tax_class_id' => $products->fields['products_tax_class_id'],
'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : ''),
'attributes_values' => (isset($this->contents[$products_id]['attributes_values']) ? $this->contents[$products_id]['attributes_values'] : ''),
'products_priced_by_attribute' => $products->fields['products_priced_by_attribute'],
'product_is_free' => $products->fields['product_is_free'],
'products_discount_type' => $products->fields['products_discount_type'],
'products_discount_type_from' => $products->fields['products_discount_type_from']);


Taking a look the the database shows that all products have a master_categories_id, so that's not the problem. I also have not used Easy Populate.

Interesting - could it just be a change from the version of zen cart?

Thanks,
Linda
4 Jul 2007, 10:19 PM
#135
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

What you have posted looks like an old version. Re-download 1.3.7 and look again - line 1178 of shopping_cart.php should be

'category' => $products->fields['master_categories_id'],

It is true that in older versions of shopping_cart.php this field wasn't set; I used to compensate for that if you look back at Quantity Discounts version 1.2 and prior by including a customized copy of shopping_cart.php.

SoftwareGuy

4 Jul 2007, 10:40 PM
#136
lvanderb avatar

lvanderb

New Zenner

Join Date:
Mar 2006
Posts:
27
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Thanks,

You are so right! lol... interesting that the version tool in admin says it's 1.3.7, probably partly updated... I promise not to complain any more... about that anyway!

Thanks again,
Linda

4 Jul 2007, 10:48 PM
#137
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

You probably just had an old local change you forgot to update. It might be worth re-checking against a fresh download to be sure that's the only out of date file.

Good luck,
Scott

29 Jul 2007, 1:42 PM
#138
saher_alsous avatar

saher_alsous

New Zenner

Join Date:
Jun 2007
Location:
Palestine
Posts:
55
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

hi Softwareguy

how are you?

thanx for the this mod its really great to have it but i have one problem is that the mod don't work with the cart,, i did everything you mentioned in the read me file, and its installed correctly, i used discount Discount Basis
Total Items in Cart.

it do not show or calculate a discount with the cart, i have 1.3.7 zen cart

the Discount model appears in Order Total Modules correctly...

but not on the interface or in calculations...
what is the problem?

https://www.alsousbros.com

can you help in it?

regards

29 Jul 2007, 1:50 PM
#139
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

Are you exceeding the level 1 item count that you set in the admin panel? If you say level 1 is 5 items and you only bought 4, you will not see a discount.

29 Jul 2007, 1:57 PM
#140
saher_alsous avatar

saher_alsous

New Zenner

Join Date:
Jun 2007
Location:
Palestine
Posts:
55
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

by the way you can use this user to login my site

[email protected]
gelgamish

don't worry this isn't my email password :D

regards