Olly

Forum Replies Created

Viewing 20 posts - 1,281 through 1,300 (of 4,431 total)
  • Author
    Posts
  • in reply to: How to get list of orders with php ? #36570
    Olly
    Admin & Mod

      i’m afraid , there isnt really a simple way to do this as virtually all queries will only ever return a restricted dataset
      (either by user id , or by order id , or limited by pagination etc etc)

      that said, i can see the usefulness of making this available in some circumstances , and will add an easy to use wrapper function in one of the next updates

      in reply to: Restrict by Street Address #36443
      Olly
      Admin & Mod
        in reply to: Restrict by Street Address #36430
        Olly
        Admin & Mod

          PS: why is there a wp_footer action that prints some js if you are also enqueuing a customjs anyway you could add this to instead ?
          surely , one of these is not required i would have thought
          just an observation

          in reply to: Restrict by Street Address #36429
          Olly
          Admin & Mod

            >I’m getting an error

            of course you do. your syntax is wrong (it even tells you where the issue is)
            https://www.w3schools.com/jsref/jsref_regexp_test.asp

            in reply to: Restrict by Street Address #36413
            Olly
            Admin & Mod

              am also a bit puzzled as to why an address should match John|Smith|David|Luke
              furthermore, the == NOTE == part here
              https://support.wp-pizza.com/downloads/wppizza-delivery-by-postcode/
              *might* already be sufficient in what you want to do (but i cannot know the exact requirements of course)

              in reply to: Restrict by Street Address #36412
              Olly
              Admin & Mod

                it’s not a plugin (well, it is kind of , but it’s inbuilt so to speak)
                it’s simply a way to add a custom validation rule you will then have available in the validation dropdown in wppizza->order form settings for whatever field you want to apply this to
                i.e

                
                	//to add your own rule - let's say 'my_rule'
                	add_filter('wppizza_filter_validation_rules','my_function');
                	function my_function($validation_rules){
                		$validation_rules['my_rule']= array( 'lbl'=> 'My Rule', 'parameters'=>false, 'callback'=>false, 'enabled'=>true);
                	return $validation_rules;
                	}
                

                will add a “My Rule” to the dropdown

                
                	$.validator.methods.my_rule = function (value, element) {
                   		return this.optional(element) || /^(?:\d+|\d{1,3}(?:[\s\.,]\d{3})+)(?:[\.,]\d+)?$/.test(value);
                	}
                

                is the javascript that validates the field that has “My Rule” as validation selected (i.e it should return true or false depending on how you want to validate this)

                and if the concept of filters/actions s new to you:
                https://docs.wp-pizza.com/developers/?section=filters-actions-functions

                in reply to: Restrict by Street Address #36392
                Olly
                Admin & Mod

                  i would suggest you create validation rules like mentioned here
                  https://docs.wp-pizza.com/developers/?section=additional-validation-function

                  in reply to: There is no information about selected checkboxes #36340
                  Olly
                  Admin & Mod

                    the order history shows the information that was sent in the email to the shop (i.e the info in the email to the shop == info in order history )

                    in reply to: There is no information about selected checkboxes #36339
                    Olly
                    Admin & Mod

                      did you enable that checkbox (whatever you named it ) to be used in the templates ?

                      in reply to: There is no information about selected checkboxes #36337
                      Olly
                      Admin & Mod

                        if you want data to be available in the emails (for example) you’ll have to add a/that checkbox to the main formfields instead before going to the confirmation page.

                        the confirmation page checkboxes are there to – for example – stop people submitting an order unless they have accepted the T&C’s (or similar) if it was made required (or whatever else you want to do with the options there)

                        in reply to: Additional Stripe payment options (SEPA etc.) #36276
                        Olly
                        Admin & Mod
                          in reply to: Additional Stripe payment options (SEPA etc.) #36195
                          Olly
                          Admin & Mod

                            at some point in the future probably, but there are no immediate plans for this at the moment I’m afraid

                            in reply to: Google Cloud Print Margin #36168
                            Olly
                            Admin & Mod

                              just set up an identical email template though your css will have to be entered differently.

                              as many email clients strip css the entering of the style declarations is different there, but it should not be too difficult to make the outcome look the same

                              in reply to: default text instead of date/time #36167
                              Olly
                              Admin & Mod

                                if you set to display your default text when no selection has been made yet, then that’s what it does and should do.

                                presumably your text says “as soon as possible” so 11:30 is as soon as possible

                                in reply to: default text instead of date/time #36158
                                Olly
                                Admin & Mod

                                  ok
                                  i believe 2.0.6 fixes this now (make sure you clear your cache first so you don’t see old dates in the frontend you might have entered previously)

                                  in reply to: Google Cloud Print Margin #36156
                                  Olly
                                  Admin & Mod

                                    you must speak to your printer manufacturer / read their manual as to how to enable borderless/nomargin by default

                                    in reply to: Google Cloud Print Margin #36150
                                    Olly
                                    Admin & Mod

                                      i cannoy see you printing with google cloud print there
                                      i can only see you sending something to the printer
                                      once with margins, once without margins
                                      if the template were to have it’s own margins it would have margins even if your print settings are set to not have margins
                                      therefore your printer is adding margins when cloudprinting (or google cloudprint itself)

                                      you should ask your printer manufacturer if that printer can be set to print without margins when getting a document from google cloudprint (i.e in the printer setting itself)

                                      in reply to: Google Cloud Print Margin #36144
                                      Olly
                                      Admin & Mod

                                        depending on how your printer handles it though, you could try to use the/a html print template and set the with in th ecss from 100% to some absolute value (i.e 2in for example or 70mm or whatever size is appropriate)
                                        might or might not work.just an idea. depends on printer or whether margins are automatically added by something

                                        in reply to: Google Cloud Print Margin #36143
                                        Olly
                                        Admin & Mod

                                          >But I would like to warn that Google Cloud print add automatically Left and Right Margin to the document.
                                          No, it most certainly does not and this is simply not true. (i assume you are referring to the plugin here and not gpoogle cloudprint itself)

                                          it sends whatever you have chosen as a print template in the plugin settings to cloudprint.
                                          a default plaintext template is 74 characters width, a default html template is 100% width, no margin and no padding

                                          i also recall several posts here on this forum somewhere where people use thermal printers apparently without any of your margin issues, so it seems to me this is either a printer problem (i.e your particular printer always prints margins) or a setup problem (i.e the template you are using has margins/padding added), neither of which is something the plugin can do anything about

                                          PS it may of course also be the case that cloudprint itself (i.e google) adds/forces margins. there’s nothing i can do about that either (not as far as i know, anyway)

                                          in reply to: default text instead of date/time #36137
                                          Olly
                                          Admin & Mod

                                            i’ll see what i can reproduce here
                                            might be a conflict between the postcode and preorder plugin (because when i simply do not select any postcode in the popup it DOES say “as soon as possible” …)

                                            will get back to you when i know more. this might take a bit

                                            PS: i actually have an idea what might cause this and it’s not a conflict as such but something in the preorder plugin itself (that’s my current thought at least … i won’t bore you with the details )

                                          Viewing 20 posts - 1,281 through 1,300 (of 4,431 total)