WPPizza – A Restaurant Plugin for WordPress › Support › General Support › Print Half Half Pizza Values
- AuthorPosts
- 21 October, 2019 at 11:07 am #45218
Hi Olly, long time since I’ve posted, I hope you are well and business is good!
Quick question I hope for you, when printing out the add ingredients for half half pizza, the code below we’ve been using only seems to print one side of the pizza not the other. Could you please assist?
foreach($item['extend_data']['addingredients']['multi']['1']['0'] as $key => $value) { //$txt .= print_r($value, true); $txt .= " + $value[count] $value[name]"; }
Thank you,
24 October, 2019 at 8:02 pm #45272that’s because you are only getting the first half/quarter
the …[‘multi’][1] (why the quotes around the 1 ???, it’s an integer….) is the first half/quarter
so you need to loop through those first of all as in – simplistically speaking – [‘multi’][1], [‘multi’][2] etc etcthe
show_ingredients_in_order()
orshow_ingredients_in_plaintext_templates()
functions/methods in the plugin will perhaps help you alongPS: although quite a while away yet, the whole plugin is in process of being re-written / redeveloped to get rid of some of the convolution that has been added over the years by adding ever more and more options, so the above might not be at all applicable anymore when this gets released (will be something like v6.x . plenty of notice will be given and betas will be made available ….)
24 October, 2019 at 11:17 pm #45278Thanks Olly, that’s perfect all working now!
We’re looking forward to the rewrite sounds awesome, all the best!
- AuthorPosts
- The topic ‘Print Half Half Pizza Values’ is closed to new replies.