Print Half Half Pizza Values

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #45218
    justin
    Participant

      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,

      #45272
      Olly
      Admin & Mod

        that’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 etc

        the show_ingredients_in_order() or show_ingredients_in_plaintext_templates() functions/methods in the plugin will perhaps help you along

        PS: 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 ….)

        #45278
        justin
        Participant

          Thanks Olly, that’s perfect all working now!

          We’re looking forward to the rewrite sounds awesome, all the best!

        Viewing 3 posts - 1 through 3 (of 3 total)
        • The topic ‘Print Half Half Pizza Values’ is closed to new replies.