Forums / General Questions / Pairing products based on attributes

Pairing products based on attributes

Views: 568

Results 1 to 6 of 6
6 May 2015, 11:52 AM
#1
hubert avatar

hubert

Zen Follower

Join Date:
Mar 2005
Posts:
229
Plugin Contributions:
0

Pairing products based on attributes

Hello,

As some of you already noticed I'm running a Pizza site and I would like to me able to sell half pizzas.

Of course I could add Half pizzas products but that would mess up the site and won't solve my problem.

Each of my pizzas are priced by attributes, the Size attribute makes the price. Today I have three sizes and I can add three new sizes to each pizza
Half small
Half medium
Half large.

My problem is how can I check that the customer has ordered two half of the same size before allowing him to checkout ?
I'm quite sure there is a place where to put a custom code to check this but I don't know where and it would help me if an expert could tell me where to put this checking.

Thanks for your help

Regards

Hubert

6 May 2015, 2:19 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Pairing products based on attributes

So you don't want to sell me half a pizza, you want to sell a whole pizza, half of which has certain toppings and the other half has other toppings?

6 May 2015, 4:44 PM
#3
hubert avatar

hubert

Zen Follower

Join Date:
Mar 2005
Posts:
229
Plugin Contributions:
0

Re: Pairing products based on attributes

Exactly,

We don't sell half pizzas. Sometimes customer are customizing pizzas till asking "I want half a Primavera and half a Four Season" and they even ask to remove some toppings on a half and add on the other one.

That's the behaviour we want to be able to deal with.

We already have a custom add-on which allow us to make combined attributes price, i.e. if the size is small the toppings price is 1, if it's medium toppings are 1.20...

So I only need to add to my Size Option three new values, half small, half medium and half large.

The only problem is that I have to avoid a cart with an odd number of halfs, or halfs of different sizes to be validated.

The better would be an observer that would don't let you go further if your pizza is not made of two halfs.

6 May 2015, 8:45 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Pairing products based on attributes

hubert:

Hello,

As some of you already noticed I'm running a Pizza site and I would like to me able to sell half pizzas.

Of course I could add Half pizzas products but that would mess up the site and won't solve my problem.

Each of my pizzas are priced by attributes, the Size attribute makes the price. Today I have three sizes and I can add three new sizes to each pizza
Half small
Half medium
Half large.

My problem is how can I check that the customer has ordered two half of the same size before allowing him to checkout ?
I'm quite sure there is a place where to put a custom code to check this but I don't know where and it would help me if an expert could tell me where to put this checking.

Thanks for your help

Regards

Hubert

This could be done in a extra_cart_actions file where each product in the cart can be reviewed. Where combinations meeting your criteria can be combined or otherwise handled.

Reading over the above (as I started this message this morning) would want to allow a half pizza be added, but not allow the sale until a complete pizza is provided... Perhaps a message provided if an "odd" half existed...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

11 May 2015, 10:31 PM
#5
hubert avatar

hubert

Zen Follower

Join Date:
Mar 2005
Posts:
229
Plugin Contributions:
0

Re: Pairing products based on attributes

Thanks for the clue...

Hubert

12 May 2015, 1:00 PM
#6
lat9 avatar

lat9

Administrator

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

Re: Pairing products based on attributes

You could also try using the Products Min/Max/Unit settings. Within each of your products, you'd set

Product Qty Minimum to 1
Product Qty Units to 0.5
Product Qty Min/Unit Mix to Yes

That states that you allow 1/2-unit pizzas to be ordered (with different combinations), but to checkout you must have "whole" pizzas.