get the list of all the sizes

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #6573
    foxpc
    Participant

      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

      #6574
      foxpc
      Participant

        one 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.

        #6576
        Olly
        Admin & Mod

          >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”

          #6599
          foxpc
          Participant

            Hi 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 code echo wppizza_output_format_price($meta['prices'][$k],$optionsDecimals) print the prices.
            i think much better solusion would be to do like this if (wppizza_output_format_price($meta['prices'][$k],$optionsDecimals) > 0) {echo...}
            but i dont get this to work.

            #6604
            Olly
            Admin & Mod

              >..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 places

              #6605
              foxpc
              Participant

                so 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

                #6606
                Olly
                Admin & Mod

                  you 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 …

                Viewing 7 posts - 1 through 7 (of 7 total)
                • The topic ‘get the list of all the sizes’ is closed to new replies.