Custom product availability

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #15477
    RosaKick
    Participant

      I’m setting up a site for a restaurant with 2 locations. They serve pizza mostly, but one location also offers burgers. Is there a way to set that somehow?

      #15487
      Olly
      Admin & Mod

        then they are – effectively – two different sites (not only regarding items, but also addresses etc)
        you could however use two categories . one for location A one for location B, but in the long run you might find that there will be more differences than just the menu, so personally I would setup 2 sites (in a multisite setup probably)

        #16017
        RosaKick
        Participant

          another angle is with products (or in my case, offers) that are only available for either delivery or pickup.
          For example, a special offer of a pizza with 2 toppings is only available for store pickup.

          #16018
          Olly
          Admin & Mod

            you can set offers (i.e discounts) of that kind with this
            https://www.wp-pizza.com/downloads/wppizza-coupons-and-discounts/
            i.e apply discount of x if pickup , otherwise do not apply discount…

            #16542
            RosaKick
            Participant

              I’m trying to write a js/jquery function to uncheck AND hide the delivery checkbox when certain products are in the cart/added to the cart. Any tips on how to trigger it?
              with $(document).ready it only updates when the page is refreshed.

              What I’m trying to accomplish is to disable the delivery option on certain products.
              I’ve set the product numbers manually in an array in the js.

              var checkDelivery = (function() {
              jQuery('div.wppizza-order-pickup-choice > label').css('display','none');
              jQuery('#wppizza-order-pickup-sel').css('display','none');
              var a = ['408', '411', '412', '413', '414'];
              for (index = 0; index < a.length; ++index) {
              item = a[index];
              if(jQuery('.wppizza-cart-contents li[id^=wppizza-cart-item-'+item+']').length > 0 || jQuery('#wppizza-cart-contents li[id^=wppizza-cart-item-'+item+']').length > 0) {
              //it is in cart
              jQuery('#wppizza-order-pickup-sel').prop('checked', false);
              jQuery('div.wppizza-order-pickup-choice > label').css('display','none');
              jQuery('#wppizza-order-pickup-sel').css('display','none');
              }
              }
              });
              #16543
              Olly
              Admin & Mod

                just unchecking and hiding the checkbox does nothing. that value must be submitted to affect the calculations (unless in your case absolutely all values that are affected by pickup or delivery are the same).

                generally speaking – not knowing your exact scenario though – i would think your answer is in your own question
                > ………… how to trigger it? ……………..< http://api.jquery.com/trigger/

                #16590
                RosaKick
                Participant

                  That I know already, what I’m wondering is on which event I should trigger. I want it to trigger when an item is added to the cart
                  it’ll then check if the item is not available for delivery
                  if so, check if the delivery checkbox is checked
                  if so, uncheck the box and submit the change

                  on reload, because of the submission, the page will hide the delivery option if an item is in the cart which does not allow for delivery.

                  #16597
                  Olly
                  Admin & Mod
                    #16612
                    RosaKick
                    Participant

                      Alright, to get going, I copied the suggested code, verbatim – but I am not getting anything in the console as the code orders, like it’s not loading the code at all.
                      According to the suggested code, it should return “do stuff” and the contents of the cart variable, but it returns nothing.

                      Try here: http://castello.is/matsedill

                      #16614
                      Olly
                      Admin & Mod

                        i updated the code (was missing the line that actually instanciated the class)

                        #16616
                        RosaKick
                        Participant

                          Thank you sooo much! it’s working now.

                        Viewing 11 posts - 1 through 11 (of 11 total)
                        • The topic ‘Custom product availability’ is closed to new replies.