Forum Replies Created
- AuthorPosts
- 15 November, 2024 at 1:17 am in reply to: WP-PIZZA Language Setting Changed After WordPress 6.7 Update #69194
on second thoughts , it really looks like WP messed up here and broke things …
see: https://core.trac.wordpress.org/ticket/62337I’ll follow that thread for a while and dig around a bit anyway, but will probably wait until WP 6.7.1 until I do something about this ( for a few days anyway).
15 November, 2024 at 12:57 am in reply to: WP-PIZZA Language Setting Changed After WordPress 6.7 Update #69193Not sure if this was intentional or a mistake by WP’s devs, but suffice to say that’s quite a nasty change that happened there and I suspect will affect lots of plugins and theme’s (WPPizza or not)
Relatively easily fixed I think (though I have not yet 100% worked through all the the implications) but needs an update to the wppizza plugin (as well as – almost all – associated extensions) .
So that’ll be me being busy for a few days then…
I’ll make updates available asap – starting with the main WPPizza plugin of course..Thanks for flagging it, I probably would not have noticed for quite some time otherwise.
While I was messing around with various things it occurred to me that this sort of thing already exists in the pickup prices plugin – https://www.wp-pizza.com/downloads/wppizza-pickup-prices/
you simply need to enter -0 into any pickup price for an item . If you apply the -0 to all pickup-prices (i.e variations) of an item, the whole item will become unavailable on pickup…
wppizza is a custom post type, category__not_in will not work there. you will need taxonomy queries
$args['tax_query']['relation'] = 'AND' ; $args['tax_query'][1]['taxonomy'] = WPPIZZA_TAXONOMY ; $args['tax_query'][1]['field'] = 'id' ; $args['tax_query'][1]['terms'] = array(16) ;/* 16 being your beer/wine cat */ $args['tax_query'][1]['include_children'] = false ; $args['tax_query'][1]['operator'] = 'NOT IN' ;
that said, having thought about this a bit more, I think this is actually going down the wrong path as you would also have to find a way to reload the page when switching between pickup/delivery . Do-able but somewhat unnecessarily complicated altogether if you ask me.
perhaps a (somewhat) better approach is actually some js here .
every item has a title with an id , that is made up of blogid, catid, postid, sizes(tier)id, in tier id like
<h2 id="wppizza-article-1-2-8-3-0" class="wppizza-article-h2">
so you can select all ‘wppizza-article-h2’ on a page , get the id’s , split by ‘-‘ to then get all ‘cat ids’ so to speak
and show/hide depending on pickup/delivery value and when switching between the two (you’d still need to set the session in the cart accordingly with a php filter)advantage being you do not have to reload any pages so much faster (still many pitfalls on the way to be encountered , but personally i think a better approach)
I might make this sort of thing into a plugin myself as i can see the possible need for this in certain circumstances, but at the moment we are where we are
PS: taking items off the page would not stop an item from being added to the cart first and then pickup being changed to delivery (or vice versa).
If you want to prevent that too , it gets a lot more complicated although you could perhaps run/add the filter below as well and removing the non-permitted items in the cart as required$session = apply_filters('wppizza_fltr_session', $session);
(though not tested in any shape or form – just an idea off the top of my head)
Alternatively you of course have two sites (multisite setup perhaps) one for pickup, one for delivery
you would need to put your dough selection it into it’s own (custom) group . (with a “…choose one only…” setting I would think)
Otherwise it’s just another ingredient.Regarding pickup / delivery :
there’s a ‘wppizza_filter_loop_args’ filter that lets you set the arguments (i.e the posts returned). so in conjunction withif(wppizza_is_pickup()){ /* do something if pickup selected*/ }
for example (https://docs.wp-pizza.com/developers/?section=global-wppizza-functions)
I would think you could exclude posts (i.e post id’s ) as required . Probably simply getting all wppizza posts(ids) that belong to your beverages category and exclude/include as requiredalternatively, some conditional – again , based on
wppizza_is_pickup()
that simply removes the beverages shortcode of the page where you have it (or exclude that page entirely from your site when it’s pickup)Up to you which way you want to do this of course
sounds like you need to setup/add an “exclude” ingredients custom group
Ok, now you are describing this, I can reproduce this (it’s got to do with your first one having an ident of zero most likely)
I’ll fix that
works just fine here. did you check your debug log and browsr console for errors ?
FYI: v5.3.1 should have this fixed now
11 October, 2024 at 8:38 pm in reply to: Add Ingredients Plugin Version 5.3 – Error Message Appears #68879as of 5.3.1 this should be fixed now, but of course , let me know if you still have issues
11 October, 2024 at 6:27 pm in reply to: Add Ingredients Plugin Version 5.3 – Error Message Appears #68863I’ve no idea what happened there.
I’ll fix this in the next couple of hours or so with 5.3.1 update .
In the meantime, you could simply change'name'=>$this->render_tags($v['item']) . $this->render_additives($k, $v),
back to
'name'=>$this->render_tags($v['item']) ,
so it stops throwing those errors (or of course downgrade back to 5.2.2 – whatever is easiest)
Apologies for messing this up
hold off on updating. I introduced an errror in 5.3
will be fixed asap11 October, 2024 at 6:02 pm in reply to: Add Ingredients Plugin Version 5.3 – Error Message Appears #68854forget all of that . the render_additives function got lost in the upload somehow.
I’ll fix that asap.thansk for reporting
11 October, 2024 at 5:56 pm in reply to: Add Ingredients Plugin Version 5.3 – Error Message Appears #68853also, have you checked your debug.log ?
is there anything i there ?11 October, 2024 at 5:54 pm in reply to: Add Ingredients Plugin Version 5.3 – Error Message Appears #68852can you go to the (admin) ingredients tab and simply save your ingredients as they are once ?
if you do that , does your error go away ?I can see where this might come in useful, so as of v5.3 of the ingredients plugin, you can now add/assign your defined allergens and/or additives to each ingredient.
Hope that helps
As I do not know anything about your cash register – or indeed what it is you want it to do – I can only refer you here in general
https://docs.wp-pizza.com/developers/
and here in particular (the most likely “interface” you are looking for , but I cannot know)
https://docs.wp-pizza.com/developers/?section=action-wppizza_on_order_execute
Hope that helps
>The problem was: allow_url_fopen was deactivated
Yup, that would do it.
If allow_url_fopen is disabled Sendy would not work using the API examples Sendy are suggesting – which is of course what I referred to and used when integrating Sendy here.
However, I really cannot see any reason why allow_url_fopen needs to be enabled for this sort of thing so as of v1.5 of the WPPizza Mailinglists plugin allow_url_fopen is not needed anymore if using Sendy .
Hope that helps
Thanks for doing the digging around ….
Cheers
Oliver
This reply has been marked as private. - AuthorPosts