Olly

Forum Replies Created

Viewing 20 posts - 3,921 through 3,940 (of 4,441 total)
  • Author
    Posts
  • in reply to: Meal deals possible? #6809
    Olly
    Admin & Mod

      >make the meal deals seem a bit more seamless.

      i know, but this sort of thing is horrendously complicated if you want to make it useful for a wide range of scenarios / sites / requirements …

      this will be done at some point, but there’s absolutely no ETA as to when

      in reply to: min number of items ordered #6807
      Olly
      Admin & Mod

        > restricted number of items
        > when they add 3 items, At least 1 was required to be

        neither at the moment , but if this gets requested more often, I will revisit that/those idea(s) and do something about this.

        so consider this to be on my “list of ideas”, without committing to do this (as time is better spent doing/adding things requested by many as opposed to just one, sorry)

        in reply to: Meal deals possible? #6801
        Olly
        Admin & Mod

          you can only do this sort of things (and in your specific scenario only partially – see below) with the add ingredients extension (https://www.wp-pizza.com/downloads/wppizza-add-ingredients/)

          note: the add ingredients extension is primarily designed to add ingredients/toppings (or whatever you want to call it) to an existing menu item.

          as i understand you , you want to add several menu items to another menu item (this in your case being the “5 course meal”).

          as mentioned above, this is not the main purpose of the plugin. however, upi to an extend you could cheat somewhat by doing the following (assuming you have that plugin installed of course).

          a) add a menu item called “5 course meal” as normal to your wppizza menu items

          b) go to add ingredients and add all your starters, mains, side, rice and naans as new/separate ingredients (setting all prices to zero here i would have thought as your “5 course meal” price would/should not change if any of these are added

          c) go to “custom groups” and set a group for each type of ingredeints – in your case you would have 5 groups (1, Starter 2, Main 3, Side 4, Rice 5, Naan) and add the relevant ingredients to these groups

          so – using rice here as example – assuming you have set the following ingredients :
          plain rice, egg fried rice, basmati rice (etc etc)

          you create a custom group, name it “rice” , and add those three to that group (probably want to set the group type to “group must have one and only one ingredient one time…..etc”)

          do the same for all others respectively

          what you can NOT do is have main dishes like “tikka massala”, “tandori”, “korma” etc and then allow to select additionally whether you want “lamb” or “chicken” etc etc

          HOWEVER – instead of “main” you could say “type” (here have “tikka”, “tandori” etc )
          add another called meat or veg (here have “chicken”, “lamb” “vegetable” etc and let people choose that way

          essentially you would have to have/enter your whole menu as ingredients too

          go here https://www.wp-pizza.com/twentytwelve/our-menu/user/ and look at the breakfast example.
          just imagine that the “drinks” are your “rice” and/or starters etc

          in reply to: Find out if a page is closed in template #6796
          Olly
          Admin & Mod

            still not sure exactly what you are after but let me guess a bit:

            that page you are referring to seems to be just a list of subsites (i.e blogs) rather than menu items so I am not sure how the timed menu comes into play here ?!
            or are you actually NOT using a multisite setup for this sort of thing ?
            (or maybe I am just misunderstanding things)

            in any case , thinking out loud and also writing a bit for anyone else that comes across this:

            *if* you are using a multisite setup you would probably want to do/run a
            switch_to_blog / restore_current_blog loop and within that do the following (of the top of my head, but should work). something like this:

            
            if ( is_multisite() ) {
            $blogs = $wpdb->get_results("SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A);
            if ($blogs) {
            foreach($blogs as $blog) {
            switch_to_blog($blog['blog_id']);
            /*get wppizza options**/
            $options=get_option('wppizza');
            /*check if open**/
            $isOpen=wpizza_are_we_open($options['opening_times_standard'],$options['opening_times_custom'],$options['times_closed_standard']);
            if($isOpen){
            /*do stuff if open**/
            }else{
            /*do stuff if closed**/	
            }
            restore_current_blog();
            }}
            }
            

            (admittedly that wpizza_are_we_open function could be more user friendly , and i might just add another function that produces the same result without having to get the $options here seperately, but that’s for another day)

            however, if the story is – as i suspect – you are *NOT* using a multisite setup and you are using the timed menu to open/close your individual shops by making pages unavailable – if every page refers to a restaurant/shop (as opposed to opening times per shop), then something like the following *might* be what you are looking for

            
            /**************
            get the timed menu options
            **************/
            $wpptmoptions=get_option('wppizza_timed_menu');
            /**************
            get all the menu items on a page (before timed menu settings have been taken into consideration) 
            returns array with the keys being the page id and the values being the menu items
            ****************/
            $wpptmMenuItemsOnPage=$wpptmoptions[items_on_pages];
            /**************
            get the timed menu settings
            returns  array with the settings you have set in the timed menu (i.e dates/times/days/pages/menuitems etc
            **************/
            $wpptmSettings=$wpptmoptions[timed_items];
            

            so, assuming you are just excluding whole pages (as a page would be all items for a restaurant here if i interpret things correctly)
            something like this (there are probably other ways to code this too, but as a dummy example)

            
            $wpptmCurrentTime=current_time('timestamp');/*wordpress time*/
            $shopOpen=array();
            foreach($wpptmSettings as $tm){
            if($tm[enabled]){
            /*
            check here if $wpptmCurrentTime is within set time date etc
            probably want to convert the below to timestamps to compare to $wpptmCurrentTime
            returns stuff like
            $tm[start_date] => 2014-12-02//set start date
            $tm[end_date] => 2014-12-25//set end date
            $tm[start_time] => 08:45//set start tim
            $tm[end_time] => 17:45	//set end time
            $tm[day]=>Array([1] => 1,[2] => 2) //returns array of set days 0 to 6 
            $tm[enabled] =>1
            etc
            */
            if(time-date-check-passed[you'd need to write this check]]){
            $shopOpen=array_merge($shopOpen,array_keys($tm['pages']));
            }
            }}
            /**flip keys to be able to use isset as opposed to in_array (and also end up with unique keys)**/
            $shopOpen=array_flip($shopOpen));
            
            
            /**within your pages loop you could now do smth like**/
            if(isset($shopOpen[$pageId])){
            /**do stuff if open**/
            }else{
            /**do stuff if closed**/	
            }
            

            `

            in reply to: Find out if a page is closed in template #6792
            Olly
            Admin & Mod

              depends a bit on what modifications you did to your template, but something like this i would have thought
              (choose whatever action hook in the template you need )

              
              add_action('wppizza_loop_outside_end','my_custom_function',10,1);
              function my_custom_function($query){
              if(count($query->posts)<=0){
              /**no items, do stuff**/	
              }
              /*or just use (probably better here)**/
              if($query->post_count<=0){
              /**no items, do stuff**/
              }
              }
              

              PS: $query is an object with all sorts of things (i.e whatever the query returns) so if ->post or ->post_count is not what you need, maybe something else will do

              in reply to: Offline Order #6764
              Olly
              Admin & Mod

                i’m probably missing something, but i don’t really get the purpose of this in the first place.
                after all, what you’d need to do is

                a) select items
                b) go to orderpage and fill in info
                c) submit order
                which does all the scripting inserting order, sending emails etc etc

                so why not use what you have (i.e the website) to do this instead of building the same thing twice ?!

                in any case, there’s no “API” or whatever it is you want to call it.
                there are filters, actions and shortcodes you can use to do things….

                in reply to: SMS and Printer Integration #6706
                Olly
                Admin & Mod

                  in case any of you guys are still following this thread/topic (or anyone else for that matter that reads this)

                  i am trying to develop something that at least sends an sms to a gprs printer as well as some order notifications to a phone too (either being optional)

                  however, due to the fact that i haven’t got one of those printers and am no going to buy one as I personally have no need for it, it would be great if someone would be willing to be a bit of a guinea pig for testing some things (in return for a version of that plugin of course when it’s done)

                  it’s early days, and probably not – initially anyway – going to be a 2 way thing (i.e receive sms, enter time , send back sms etc. as that – from what i can see – depends on proprietary hardware)

                  for starters though the idea is to – at least – send any received orders to a gprs enabled printer directly plus an sms confirmation to some sms enabled phonenumber …..

                  there are a few caveats but i am happy to point these out if someone is prepared to initially “lend” me a printer so to speak i can send stuff to (i.e is prepared to waste some paper) to see and check how things print out to be able to make the necessary adjustments to get going on that project

                  cheers

                  in reply to: Displaying category items in a grid #6705
                  Olly
                  Admin & Mod

                    also – just bit by bit where and when i can – v2.5.11.8 now also has – within each category displayed – the following classes where appropriate

                    wppizza-article-first
                    wppizza-article-last

                    might come in handy

                    in reply to: Standard Order Display and Html E-Mail #6697
                    Olly
                    Admin & Mod

                      i already answered this above ?!

                      send me the filter you are using to dev[at]wp-pizza.com

                      in reply to: Standard Order Display and Html E-Mail #6695
                      Olly
                      Admin & Mod

                        english only please in this forum

                        from what i gather though:
                        a)re : phpmailer: Could not instantiate mail function

                        your server is not setup to send email . you must fix this:
                        https://www.google.co.uk/#q=phpmailer:+Could+not+instantiate+mail+function

                        b)re filter:
                        your plaintext filter will add “——-“…. somewhere.
                        it’s messed up because you have not added a linebreak.
                        i.e your “——-” should be “———“.PHP_EOL;

                        in reply to: Pre-Order #6679
                        Olly
                        Admin & Mod

                          so your employees have some reading difficulties it seems 😉

                          I can see how this would happen though. easy enough mistake to make i would think.

                          making it red or whatever is not going to work (for several reasons), but maybe some additional text like: “not today” or “future order” or something after the date if it’s not for today might work.

                          will put this on my ideas/improvements list, but can’t give you any ETA as to when this might be available at the moment

                          in reply to: Displaying category items in a grid #6641
                          Olly
                          Admin & Mod

                            for starters (just busy doing other stuff)
                            in a grid something like this (doesnt yet address name,size,img, descr but as a starter):

                            
                            article.wppizza-article{
                            width:33%;
                            border:1px solid #999999;
                            float:left;
                            clear:none;
                            margin:0;
                            margin-bottom:0;
                            }
                            article.wppizza-article:nth-child(3n) {
                            background: blue;
                            clear:left;
                            }
                            

                            probably have to play around with this and perhaps some last child element selectors to clear after the last etc….
                            all pure css though

                            in reply to: Prices not displaying #6631
                            Olly
                            Admin & Mod

                              no problem, at least we got to the root cause

                              must admit though I am not going to investigate why that plugin does what it does.
                              having said that , there are plenty of other plugins that enable shortcodes in other places

                              in reply to: Prices not displaying #6628
                              Olly
                              Admin & Mod

                                >I imagine therein lies the issue
                                yup
                                essentially there are no prices applied/existent to a menu item . however, there certainly should be and i can see them in the admin , so it’s kind of strange

                                somehow this looks like the meta data gets reset on display.

                                could you disable other plugins , and see if this changes things ?

                                in reply to: Prices not displaying #6626
                                Olly
                                Admin & Mod

                                  thanks.
                                  can’t see anything really wrong there.
                                  could you enable debug and see if you get any errors there ?

                                  https://www.wp-pizza.com/topic/how-to-enable-debug-in-wordpress/

                                  in reply to: Prices not displaying #6624
                                  Olly
                                  Admin & Mod

                                    i would need admin access (either setting your reply private here, or sending the un/pw directly to [email protected]).
                                    can’t tell from the frontend

                                    in reply to: get the list of all the sizes #6606
                                    Olly
                                    Admin & Mod

                                      you do know what arrays are, right ?
                                      have a look at the array and you will see the bits it’s made up of and print what you need to print …

                                      in reply to: get the list of all the sizes #6604
                                      Olly
                                      Admin & Mod

                                        >..the output is: ArrayArray

                                        well, yeah , of course it is. it’s up to you what you want to do with it

                                        >i think much better solusion would be to do like this …
                                        no. it just isn’t…
                                        the “better” solution is not entering prices you do not want displayed in the first places

                                        in reply to: Error when trying to order #6597
                                        Olly
                                        Admin & Mod

                                          sounds like your server has problems sending emails

                                          try setting
                                          wppizza->settings->Select Type of Mail Delivery to HTML/Plaintext (as that tends to give better error messages)

                                          and see what it says (and let me know)

                                          also enable debug. the debug.log might also help
                                          https://www.wp-pizza.com/topic/how-to-enable-debug-in-wordpress/

                                          in reply to: Had an email fail on a paypal payment. #6593
                                          Olly
                                          Admin & Mod

                                            also make sure you read the troubleshooting here :

                                            https://www.wp-pizza.com/paypal-gateway-extension/

                                          Viewing 20 posts - 3,921 through 3,940 (of 4,441 total)