New ingredients functions

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #69054
    Umut
    Participant

      Dear Olly,

      I need a feature that I often require but is currently unavailable in the WP-Pizza ingredients functions.

      For example:
      Usually, I create a group under the “Portion Size” section for pizzas that consists of two columns: 30 cm and 40 cm. When adding pizzas, I can set the prices separately for both the 30 cm and 40 cm pizzas. Additionally, when I add ingredients to this group, they appear for both the 30 cm and 40 cm options. However, some of my customers request gluten-free dough, which is only available for 30 cm pizzas. If I offer this as an option under ingredients, it appears for both 30 cm and 40 cm pizzas, but I only want it to show for those selecting the 30 cm option. Otherwise, I would have to create about 50-60 pizzas and the same number of ingredients in a separate group, which is very tedious. Do you have a suggestion for me?

      For instance, if there were an option to add “gluten-free dough” to the ingredient list and have it only appear when the 30 cm option is selected, it would solve the issue nicely.

      Thank you in advance!
      Umut

      #69068
      Olly
      Admin & Mod

        sounds like you need to setup/add an “exclude” ingredients custom group

        #69086
        Umut
        Participant

          Dear Olly

          Based on your feedback, I tested the “exclude” ingredients custom group. I can set it up so that the ingredients group only shows the normal ingredients for 40cm, while for 32cm pizzas, the dough selection is also displayed. However, when I choose “exclude,” the radio button does not appear, allowing users to choose between gluten-free dough or classic dough. Instead, it appears like normal ingredients, and people can select both at the same time. If the radio option could be included in the “exclude” group, my issue would be resolved.

          I also have a similar issue with delivery or pickup options. Some businesses are permitted to deliver alcoholic beverages but are not allowed to sell them on-site. In this case, I cannot disable alcoholic beverages for pickup. Therefore, I need a solution that allows product categories to be shown or hidden for pickup or delivery.

          #69099
          Olly
          Admin & Mod

            you would need to put your dough selection it into it’s own (custom) group . (with a “…choose one only…” setting I would think)
            Otherwise it’s just another ingredient.

            Regarding pickup / delivery :
            there’s a ‘wppizza_filter_loop_args’ filter that lets you set the arguments (i.e the posts returned). so in conjunction with

            
            if(wppizza_is_pickup()){
            /* do something if pickup selected*/
            }
            

            for example (https://docs.wp-pizza.com/developers/?section=global-wppizza-functions)
            I would think you could exclude posts (i.e post id’s ) as required . Probably simply getting all wppizza posts(ids) that belong to your beverages category and exclude/include as required

            alternatively, some conditional – again , based on wppizza_is_pickup() that simply removes the beverages shortcode of the page where you have it (or exclude that page entirely from your site when it’s pickup)

            Up to you which way you want to do this of course

            #69100
            Olly
            Admin & Mod

              PS: taking items off the page would not stop an item from being added to the cart first and then pickup being changed to delivery (or vice versa).
              If you want to prevent that too , it gets a lot more complicated although you could perhaps run/add the filter below as well and removing the non-permitted items in the cart as required

              
              $session = apply_filters('wppizza_fltr_session', $session);
              

              (though not tested in any shape or form – just an idea off the top of my head)

              Alternatively you of course have two sites (multisite setup perhaps) one for pickup, one for delivery

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.