Forum Replies Created
-
AuthorPosts
-
i cannot comment without a link to the site in question
PS: with all this GDPR going on , you might have to re-request/re-setup authorization for cloudprint as per directions (though it still works here as it always did)
have you checked the wppizza/logs directory for any error logs in there (or indeed your debug.log provided you enabled debug)
polylang breaks things
https://docs.wp-pizza.com/getting-started/?section=known-incompatabilitieswppizza is checked with WPML , so I would recommend that, but other translation plugins (other than polylang) might work too
in fact, it might even work by simply dequeueing the jquery-ui-[selected_style]-css and rerequeing it with a lower priority so it gets loaded before any of your other stylesheets so those (i.e your datepicker) simply overwrite the set styles
without having to check for post_id’s and whatnotmileage will vary. really depends on what the other styles do
i dont know in how many other ways i can say this:
the spinner (and all other jquery ui elements’) css is coming directly from jquery ui / themeroller and not from the wppizza plugin (hence you will see something like //ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.min.css) in your source
wppizza only “enqueues” it if selectedif you want to add only the spinner css have to grab it from there and add/include it (but i believe we’ve been here before. the spinner css in tons of lines of css so finding and getting all the ones you need is – at bets – tedious)
i would suggest you simply look into dequeueing it on the relevant pages (as mentioned )
PS: of course you will change/break customised css if you change priorities of the themes’ stylesheet without accounting for it elsewhere.
>On the settings page
I assume you are referring to the *order* settings page>Can each menu item specify whether a delivery charge will be applied or not?
not natively in the plugin, however, there is the following filter you could use to substract the delivery charge if a particular item (let’s say with id 5) is in the cart
I also assume you are using “Delivery Charges per item” in the settings hereSo, something like this (not tested, mileage will vary, but should give you an idea):
add_filter('wppizza_fltr_delivery_charges', 'my_prefix_delivery_charges_filter', 10, 3); function my_prefix_delivery_charges_filter($delivery_charges, $cart_items, $general_parameters){ global $wppizza_options; /* current set delivery charges per item */ $dcpi = $wppizza_options['order_settings']['delivery_charge_per_item']; $reduce_delivery_charges = 0; foreach($cart_items as $items){ foreach($items as $item){ if($item['post_id'] == 5 ){ $reduce_delivery_charges += $dcpi; } } } /* substract */ $delivery_charges = $delivery_charges-$reduce_delivery_charges; return $delivery_charges; }i’m simply not going to add the overhead of checking every single page or sidebar on every single page request for the possibility of a page haveing wppizza code/shortcodes on them , for the odd theme here or there (hence such an option will never be added to the plugin)
but you can do this for your particular thing as mentioned without having to cause this overhead as you know what your pages areof course dequeueing things (or similar) on pages that – one day perhaps – have datepickers and spinners on them will break things
there are many ways to do that .
the one outlined above
or dequeueing the ui-css on the pages that have the datepicker on them
or filtering the parameter (wppizza[order_settings][order_page_quantity_change_style]) to be empty https://docs.wp-pizza.com/developers/?section=filter-wppizza_filter_options on those pagesreally up to your imagination
sure, if you want to style ui-elements with your own css instead of taking advantage of the themeroller css options, you’ll spend a lot of time doing this and – in my book – is a complete waste of time as not only are you trying to re-invent the wheel but also have to know each and every class etc etc that ui-elements use whereas if you use what exists you can sinply forget about all of that
you dont even have to know what the classes are and don’t have to ever worry about updating anything when versions or whatnot change.
For example, currently wordpress uses 1.11. One day wordpress will probably be using 1.12 or higher. If you use your own css, you’ll have to maintain it.
Do you really want to waste your time checking for this every time there might be an update to something ?how is this complicated ?
you roll your theme, download it and include/enqueue it (you can probably even use some priority value to include it before the styles you already have, so your current styles would override the newly added ones if the same classes are being used )
or – as mentioned several times now – simply choose from one of the default themesthat’s about 2 lines of code
with the added advantage that if you ever add another jquery-ui-element (other than your current datepicker(s) and the spinner) they are also already styled .
you already know this from what i can make out…?!
http://jqueryui.com/download/#!version=1.11.4>So (as a result) adding another instance to style the spinner (only) will be complicated code wise.
why ? it’s just some style and has no bearing on the js.
(unless you force the ui-js to be added again too, for no reasons i can see)>switching the option off only disables the style and not the JS
that is correct. there is an awful lot of functionality attached to this spinner ui element which would not work if the js is not loadedthanks for sharing your experiences here. I’m sure this will help some others too at some point
Olly
that option already exists by not including/enabling the themeroller css and adding your own css for the spinner (presumably from copying it when creating your own themeroller css) somewhere
People might disagree here – and that’s perfectly ok of course – but in my book, if you are using/loading a jquery ui-element you should also use (or at least offer the option to use) one of the themes/styles that are made for that purpose
(not to mention the convenience of not having to maintain it and automatically being able to take advantage of any improvements etc that might get added over time)>This is happening because the plugin loads its styles on all pages instead of loading it on pages where it is used.
that’s simply not true
it’s caused by including the themeroller style – the inclusion of which was made optional for precisely the reason that if themes already include styling for jquery ui-elements it won’t be neededalas – from what i can see – your theme does not actually provide any styling for ui elements and it is the gdlr-hotel plugin that provides and styles the datepicker using it’s own style but only for the datepicker.
furthermore – though somewhat unrelated – the wppizza.css only ever targets it’s own distinct elements and only where strictly necessary. Wherever possible and sensible it will try to use a themes’ style
lastly, using an equivalent of “is_woocommerce” would do no such thing as it would also not load any styles on the checkout pages or in fact any page that shows the wppizza menu items or any wppizza widgets, shortcodes etc etc
(the overheads of checking a page content/sidebar to see if a particular widget/shortcode/whatnot is used are quite high and one would have to do that for every single pagecall. one of the reasons why woo doesn’t do that either one suspects)>do we have to set the ingredients individually for each pizza so that they can be deselected?
yes, that’s the way to do it (otherwise the plugin has no idea what is or is not part of that pizza)
i.e , let’s assume you have a tuna pizza that – by default – comes with onions too that you want a customer to be able to not have.
So, add a(nother) custom group for this where you set “group type” to be “PRESELECT … etc ” and select your “Onions” there.
When a user clicks on it in the frontend, the “Onions” will be pre-selected but are also de-selectableYou (probably) might then also then want to enable (in the “Options” tab of the Add Ingredients plugin under the heading “Show de-selected pre-selected ingredients ?”) “if you have pre-selected a specific ingredient…etc” so it will be submitted as “No Onions” so it’s clearer to the Kitchen so to speak what’s required
(I’m aware these things can get complicated, so if the above is not clear, shout)
-
AuthorPosts