Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2005
    Posts
    229
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default 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?

  3. #3
    Join Date
    Mar 2005
    Posts
    229
    Plugin Contributions
    0

    Default 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.

  4. #4
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Pairing products based on attributes

    Quote Originally Posted by hubert View Post
    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...

  5. #5
    Join Date
    Mar 2005
    Posts
    229
    Plugin Contributions
    0

    Default Re: Pairing products based on attributes

    Thanks for the clue...

    Hubert

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,901
    Plugin Contributions
    96

    Default 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.

 

 

Similar Threads

  1. v151 Help to create list of unique products based on attributes applied
    By philip937 in forum General Questions
    Replies: 7
    Last Post: 18 Aug 2014, 01:16 PM
  2. Swap Products based on attributes / model
    By Semenek in forum General Questions
    Replies: 0
    Last Post: 20 Feb 2011, 11:42 PM
  3. Stock tracking based on products attributes
    By j_kins in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 30 Jul 2008, 06:32 AM
  4. Sub-attributes? Making attributes of attributes appear based on which you select?
    By pioupioun in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 7 Jun 2006, 11:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg