Forums / General Questions / How do I give a discount if two products are purchased together?

How do I give a discount if two products are purchased together?

Started by bparker on 25 Aug 2012, 2:23 AM · Views: 1,896

Results 1 to 8 of 8
25 Aug 2012, 2:23 AM
#1
bparker avatar

bparker

Zen Follower

Join Date:
Oct 2008
Location:
Rochester, NY
Posts:
232
Plugin Contributions:
0

How do I give a discount if two products are purchased together?

Here's what I want to do. A customer can buy product A for $300. They can also buy product B for $300. However, if they they will get a message asking them if they also want to checkout with product B. If they do, product B will only cost them $200, therefore giving a grand total of $500.

Is there any way of doing this?

Thanks,
BP

25 Aug 2012, 8:35 AM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,129
Plugin Contributions:
56

Re: How do I give a discount if two products are purchased together?

There's the Better Together plugin (I haven't used it).

25 Aug 2012, 8:36 AM
#3
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: How do I give a discount if two products are purchased together?

bparker:

Here's what I want to do. A customer can buy product A for $300. They can also buy product B for $300. However, if they they will get a message asking them if they also want to checkout with product B. If they do, product B will only cost them $200, therefore giving a grand total of $500.

Is there any way of doing this?

Thanks,
BP

From memory (and I could be totally wrong..) there is an add-on called Better Together. Just have a look in the "Plugins" section of this site (see menu on top of page).

Frank

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

25 Aug 2012, 10:15 AM
#4
swguy avatar

swguy

Administrator

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

Re: How do I give a discount if two products are purchased together?

You are both correct. Better Together is designed to do "Buy A, Get B at a discount."

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.

28 Aug 2012, 1:25 PM
#5
bparker avatar

bparker

Zen Follower

Join Date:
Oct 2008
Location:
Rochester, NY
Posts:
232
Plugin Contributions:
0

Re: How do I give a discount if two products are purchased together?

Ok, I'm trying Better Together, but I have no idea what this line means in the readme:

Decide on the linkages you wish to use, and add them to the setup() function in includes/modules/order_total/ot_better_together.php. Open a shopping cart in another window to test these discounts. They are shown on the second step of checkout in "Your Total" under "Better Together."

Could someone clarify, please? This is critical and I have no idea what I'm doing. :)

Thanks,
bparker

28 Aug 2012, 1:31 PM
#6
swguy avatar

swguy

Administrator

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

Re: How do I give a discount if two products are purchased together?

There are some more examples in the extended help on my home page at

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

You need to modify the setup() function at the bottom of includes/modules/order_total/ot_better_together.php

Use these examples to guide you to the configuration you want to use.

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.

29 Aug 2012, 2:36 AM
#7
bparker avatar

bparker

Zen Follower

Join Date:
Oct 2008
Location:
Rochester, NY
Posts:
232
Plugin Contributions:
0

Re: How do I give a discount if two products are purchased together?

Wow... this is an essential. Why the heck was this not included in the readme? How can someone use the addon without seeing this information? I mean, sure, you could look at the code and decipher this, but then it's probably just as difficult as building the addon from scratch. :P

Very helpful. Thanks!

You've earned an emoticon. :)

29 Aug 2012, 2:45 AM
#8
swguy avatar

swguy

Administrator

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

Re: How do I give a discount if two products are purchased together?

bparker:

Wow... this is an essential. Why the heck was this not included in the readme?

It was. Re-read the block of text you posted in post #5. It probably makes more sense now.

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.