Html Template for Mail

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #42113
    Umut
    Participant

      Hi Olly

      Wie kann ich Menge breite verkleinern?
      Wie kann ich grösse der Zutatentext ändern. im Bild als Gelb markiert.

      Template screen

      I have under the wppizza> Template> html format> Style input html code changed but still could not improve both points.
      Thanks for any help
      Umut

      #42114
      Olly
      Admin & Mod

        you can only do this using filters
        assuming that you know how filters work, this is the one that’s added for this ($styles being an array of different elements )

        $styles = apply_filters('wppizza_ingredients_filter_email_styles', $styles );

        #42115
        Olly
        Admin & Mod

          PS: the default $styles array is this

          
          $styles = array();
          $styles['ingrinfo'] 	= 'white-space: initial; margin: 3px; line-height: 130%;' ;
          $styles['ingr_item'] 	= 'font-style: italic;' ;
          $styles['ingrinfo'] 	= 'white-space: initial; margin: 3px 3px 3px 20px; line-height: 130%; font-size:85%;' ;
          $styles['ingrgrp'] 	= 'white-space: initial; margin: 3px;line-height: 130%;' ;
          $styles['ingrgrp_0'] 	= 'white-space: initial; margin: 3px;line-height: 130%; display:inline' ;
          $styles['ingrgrp_1'] 	= 'white-space: initial; margin: 3px;line-height: 130%; margin-left: 15px' ;
          $styles['ingrgrp_lbl'] 	= 'font-weight: bold; padding-right: 3px;' ;
          $styles['comments'] 	= 'padding: 3px 0; font-size: 75%;' ;
          
          #42127
          Umut
          Participant

            1- where should I insert this code?
            2- Will it be deleted after an update?

            Thanks

            #42128
            Olly
            Admin & Mod

              1)
              you MUST learn how wordpress action and filter hooks work if you want to do ANY kind of wordpress alteration that are beyond just simple point and click
              here’s a quick overview

              https://docs.wp-pizza.com/developers/?section=filters-actions-functions

              2) it depends on where you put your code (i strongly suggest you use child themes as they do not get updated when you update your theme)

              the reason why it’s not in the template section is because it’s coming from the add ingredients plugin and the options that plugin provides to add things to orders would make it completely unmanageble if added to the inputs of th etemplates

              your filter will the look *something like* this (depending what exactly you want to achieve, but as a starting point)

              
              add_filter('wppizza_ingredients_filter_email_styles', 'myprefix_filter');
              function myprefix_filter($styles){
              /* 
              the 120% here overrides any previous (default of 85%) 
              font-size declaration for the element   
              */
              $styles[ingrinfo] .= 'font-size:120%;';
              return $styles;
              }
              
              #42133
              Umut
              Participant

                Dear Olly
                Thank you for your valuable help. I did it.
                Only now I want to take all selected ingredients in brackets.
                For example: (1 x olives, 1x broccoli, 1 x capers)

                Which code can I use for brackets?

                Thanks again for all the help.
                best regards
                Umut

                #42176
                Umut
                Participant

                  [Edit:redacted by admin to not confuse people (errors in code) ]

                  #42177
                  Umut
                  Participant

                    hello olly

                    I think I solved the problem.

                    Thank you
                    best regards

                  Viewing 8 posts - 1 through 8 (of 8 total)
                  • The topic ‘Html Template for Mail’ is closed to new replies.