WPPizza – A Restaurant Plugin for WordPress › Support › General Support › get the list of all the sizes
- AuthorPosts
- 12 December, 2014 at 9:19 am #6573
Hi,
i want to get the list of all the sizes i have created. how to get this list?
i dont want to show near evry price the size. i want to print all the sizes in the top of the table.Thanks
12 December, 2014 at 9:39 am #6574one more question regarding “sizes”.
when i add new item and this item dont have “extra big” size for example, the menu will print 0 near extra big size. how not to print 0(hide or print “-“) if the size don’t have price?for example:
i create small medium big extra big size
the some of the items don’t have the extra big size:small 5$ medium 7$ big 10$ and extra big empty field
in the front page it will print all the princes and the sizes but in the extra big it will print just 0.12 December, 2014 at 11:45 am #6576>i dont want to show near evry price the size
use css: .wppizza-article-price-lbl{display:none}>i want to print all the sizes in the top of the table.
use (one of the) action hooks in the templates (i.e wppizza_loop_outside_start for example – hava a look at the loop templates. $options[sizes] will return all the sizes)>some of the items don’t have the extra big size:
then you should probably create another size with just “small”,”medium”,”big” and use that one for items that have no “extra big”13 December, 2014 at 6:52 am #6599Hi Olly.
>i want to print all the sizes in the top of the table.
if i use echo $options[sizes]; the output is: ArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArray
i used it here:wppizza_loop_outside_start
also the question is how to print$options[sizes]
for specific ID (for example all sizes with id 5)>some of the items don’t have the extra big size:
i see that this codeecho wppizza_output_format_price($meta['prices'][$k],$optionsDecimals)
print the prices.
i think much better solusion would be to do like thisif (wppizza_output_format_price($meta['prices'][$k],$optionsDecimals) > 0) {echo...}
but i dont get this to work.13 December, 2014 at 1:06 pm #6604>..the output is: ArrayArray
well, yeah , of course it is. it’s up to you what you want to do with it
>i think much better solusion would be to do like this …
no. it just isn’t…
the “better” solution is not entering prices you do not want displayed in the first places13 December, 2014 at 1:25 pm #6605so how can i just print the sizes name from $options[sizes]?
i want to print all sizes for id = 5
it will need to print: small ,medium, big , extra big etc…how can i do this?
Thanks
13 December, 2014 at 2:02 pm #6606you do know what arrays are, right ?
have a look at the array and you will see the bits it’s made up of and print what you need to print … - AuthorPosts
- The topic ‘get the list of all the sizes’ is closed to new replies.