Forum Replies Created
- AuthorPosts
-
>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.aspam also a bit puzzled as to why an address should match John|Smith|David|Luke
furthermore, the == NOTE == part here
https://www.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)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-functionsi would suggest you create validation rules like mentioned here
https://docs.wp-pizza.com/developers/?section=additional-validation-functionthe 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 )
did you enable that checkbox (whatever you named it ) to be used in the templates ?
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)
at some point in the future probably, but there are no immediate plans for this at the moment I’m afraid
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
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
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)you must speak to your printer manufacturer / read their manual as to how to enable borderless/nomargin by default
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)
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>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 paddingi 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)
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 )
may i first of all ask you to update the post/zipcode and the preorder plugin to their respective latest versions
thanks>If I deactivate the plugin, there is no time to choose, also the text “as fast as possible” is not visible.
i’m not with you. if you de-activate that plugin it doesn’t do anything . of course there should be no text and nothing to choose from (I really dont understand the confusion there)>No matter if the shop is open or not.
of course. that’s the idea of the plugin
you can order when the shop is closed for the time when the shop is openfor the rest i cannot say much without at least a link.
sure, but i’m somewhat confused what it is you are expecting when – as you say – “I have disabled the preorder plugin”…..
- AuthorPosts