If this is your first visit, check our documentation. To post, register or login.
Forums / Addon Order Total Modules / Quantity Discounts for 1.3

Quantity Discounts for 1.3

Started by swguy on 13 Aug 2006, 10:22 AM · Views: 226,694

Results 321 to 340 of 847
17 Nov 2008, 5:33 AM
#321
supersnow avatar

supersnow

Zen Follower

Join Date:
Apr 2007
Location:
California, USA
Posts:
233
Plugin Contributions:
0

Quantity Discounts for 1.3

swguy:

If you have custom category discounts, you can't just use the default marketing text; you need to write additional code.

Scott

I know that; I already have the custom text in the additional code. I am not having problems with the marketing text.

What I am taking about the fact that if the url to get to a product is /index.php?main_page=product_info&cPath=22&products_id=15

And category 22 has a custom discount of 25% and it shows the marketing text of 25%.
But if somehow a customer goes to the product as /index.php?main_page=product_info&cPath=60&products_id=15

when 60 is a non existing category the default marketing text shows instead of the customer marketing text that I have set. So the customer thinks they can get a higher percentage.

The reason I am asking is because a customer did this and thought he was going to get 50% off when the actual category should only get 25% off. The customer sent me screenshots and it showed a non existent catid in the url.

Thanks
Supersnow

17 Nov 2008, 9:13 AM
#322
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

supersnow:

But if somehow a customer goes to the product as /index.php?main_page=product_info&cPath=60&products_id=15

when 60 is a non existing category the default marketing text shows instead of the customer marketing text that I have set. So the customer thinks they can get a higher percentage.

Sounds like $current_category_id may not be the master category id of the product in question; perhaps the product was linked at one time, perhaps the customer is just diddling the URL for fun. Who knows. In any event, if this is happening, you will need to query the category id manually instead of relying on $current_category_id. My Zen Cart Category Issues page discusses how to get this value.

http://www.thatsoftwareguy.com/zencart_category_issues.html#mt

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.

17 Nov 2008, 12:34 PM
#323
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

The bulleted list of tips following the documentation on adding Marketing Text to Quantity Discounts

http://www.thatsoftwareguy.com/zencart_quantity_discounts.html#marketing

Has also been updated to discuss this issue and cross reference the resolution.

It's funny - this code has been in place for several years with no complaints, and in the last 2 weeks I've gotten two questions about this - the other was from Better Together.

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.

18 Nov 2008, 4:05 AM
#324
supersnow avatar

supersnow

Zen Follower

Join Date:
Apr 2007
Location:
California, USA
Posts:
233
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

swguy:

The bulleted list of tips following the documentation on adding Marketing Text to Quantity Discounts

http://www.thatsoftwareguy.com/zencart_quantity_discounts.html#marketing

Has also been updated to discuss this issue and cross reference the resolution.

It's funny - this code has been in place for several years with no complaints, and in the last 2 weeks I've gotten two questions about this - the other was from Better Together.

Thanks for the help. I do believe it was a customer playing around with the category id but you never know. Your solution worked and hopefully it will not be an issue any further.

Thanks
Supersnow

1 Dec 2008, 10:59 PM
#325
nicecarvings avatar

nicecarvings

New Zenner

Join Date:
Oct 2007
Posts:
51
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

I really want to try this mod. Trouble is I have no clue how to even install mods to zencart! :ohmy:

Anybody know where I should be looking to get help installing a mod like this one?

Thanks!

My zen cart is being rebuilt!! www.nicecarvings.com
The Quantity Discount Mod is working great!
www.thatsoftwareguy.com/zencart

2 Dec 2008, 12:57 AM
#326
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

I wrote a very simple "introduction to installing my mods for rookies" page here:

http://www.thatsoftwareguy.com/zencart_install_mod.html

If this doesn't make sense to you, put an ad in Commercial Help Wanted to get someone who can walk you through doing this on the phone. It's only confusing the first time you do it.

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.

2 Dec 2008, 2:05 AM
#327
nicecarvings avatar

nicecarvings

New Zenner

Join Date:
Oct 2007
Posts:
51
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

swguy:

I wrote a very simple "introduction to installing my mods for rookies" page here:

http://www.thatsoftwareguy.com/zencart_install_mod.html

If this doesn't make sense to you, put an ad in Commercial Help Wanted to get someone who can walk you through doing this on the phone. It's only confusing the first time you do it.

Scott

Awesome, installed in working in less than 10 minutes with your tutorial! Appreciate that. If I make some sales i will try and donate!

:clap:

My zen cart is being rebuilt!! www.nicecarvings.com
The Quantity Discount Mod is working great!
www.thatsoftwareguy.com/zencart

2 Dec 2008, 2:14 AM
#328
nicecarvings avatar

nicecarvings

New Zenner

Join Date:
Oct 2007
Posts:
51
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Is there a way to have the discount figured immediately upon placing the quantity items in the cart? This is an awesome mod BTW!

My zen cart is being rebuilt!! www.nicecarvings.com
The Quantity Discount Mod is working great!
www.thatsoftwareguy.com/zencart

3 Dec 2008, 4:03 PM
#330
abran1984 avatar

abran1984

New Zenner

Join Date:
Apr 2008
Location:
Lancaster, CA
Posts:
58
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

I'm trying to set a discount for a specific product; I added the following code to the "apply_special_item_discount()" function:
case 397:
if ($count > 3 and $count < 6) {
$disc_amount = 6;
}
elseif($count > 6) {
$disc_amount = 12;
}
break;

But it's not working! Am I missing something, did I miss a step?

4 Dec 2008, 12:32 AM
#331
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

Remember that apply_special_item_discount can only be used with Discount Basis "Total By Item." I suspect you're using a different basis.

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.

4 Dec 2008, 12:38 AM
#332
abran1984 avatar

abran1984

New Zenner

Join Date:
Apr 2008
Location:
Lancaster, CA
Posts:
58
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Here's a screenshot of my settings, let me know if you need to see anything else.

20 Dec 2008, 12:54 AM
#333
tracib avatar

tracib

Zen Follower

Join Date:
Oct 2007
Posts:
157
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Where do I specify which categories to exclude from the discount? I just installed your most recent version.

I've looked in your info, but can't figure out where to do it.

Thanks!

20 Dec 2008, 1:05 AM
#334
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

tracib:

Where do I specify which categories to exclude from the discount?

The exclude_category function allows you to exclude categories which should not be discounted.

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.

20 Dec 2008, 1:08 AM
#335
tracib avatar

tracib

Zen Follower

Join Date:
Oct 2007
Posts:
157
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

swguy:

The exclude_category function allows you to exclude categories which should not be discounted.

So, I need to change the actual files? It's not something I do through the admin page of my cart?

Also, I'm looking at the info on your website. Do I need to paste in the patch that you mentioned (above the calculate_decuctions() )?

20 Dec 2008, 1:17 AM
#336
tracib avatar

tracib

Zen Follower

Join Date:
Oct 2007
Posts:
157
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

I found where to do this in the php file, starting with line 190:

// Add categories you wish to exclude to exclude_category()
if ($this->exclude_category($products[$i]['category'])) {
continue;

and the category I want to exclude is #111, but I'm not sure where to put it in the above code.

20 Dec 2008, 1:47 AM
#337
tracib avatar

tracib

Zen Follower

Join Date:
Oct 2007
Posts:
157
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

Ok, I figured it out! I found your faq on how to do it, but was confused because I couldn't find the code used in your example:
function exclude_category($category) {
switch($category) {

But I searched again, and found it near the top, starting with about line 16.

So THANKS! I just tried it, and it worked with my changes.:clap:

13 Jan 2009, 1:54 PM
#338
mikecrane avatar

mikecrane

New Zenner

Join Date:
Sep 2006
Posts:
25
Plugin Contributions:
0

Re: Quantity Discounts for 1.3

I have a question. I am trying to setup quantity discounts for 12 units, 24 units, 36 units, and 48 units. I want the discount to ONLY affect those quantities, not the quantities in between. For example, 13 units gets no discount, 14 units gets no discount, etc. I tried setting 12 units and 10 as the percent off and then 13 units and 0 percent off, then 24 units as 10 percent off,etc. but it did not work. Any suggestions?

13 Jan 2009, 2:34 PM
#339
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

You have to write code to do this sort of thing. Use the apply_special_item_discount() user exit. It's described in the help on my home page.

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.

13 Jan 2009, 5:21 PM
#340
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,022
Plugin Contributions:
2

Re: Quantity Discounts for 1.3

Upon installing the Quantity Discounts mod together with the marketing promo in my 1.3.8a, I notice much to my annoyance that there are two lines of space between the "Store Quantity Discount Policy" heading and the discount schedule on all product pages with the promo, but not on the Quantity Discounts Promo page itself. What I wish is to have only one line, or rather 1em of space, between the heading and the schedule.

One of these lines (the topmost) is due to my forcing a margin-bottom: 1em; under all headings and paragraphs via the css, and I have no intention of removing this facility.

However, the other line of space completely eludes me, having played with many a margin and padding in the css's and even searched for excess <br /> in the program files.

As my site is not live, I am unable to provide a link.

Any help greatly appreciated.