Olly

Forum Replies Created

Viewing 20 posts - 961 through 980 (of 4,446 total)
  • Author
    Posts
  • in reply to: Inventory #42137
    Olly
    Admin & Mod

      there are (still) no short or medium term plans to implement this sort of thing

      Olly
      Admin & Mod

        I’d need a link to the page in question really.
        the above is/was really just guesswork on the info supplied

        in reply to: Html Template for Mail #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;
          }
          
          
          in reply to: Html Template for Mail #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%;' ;
            
            
            in reply to: Html Template for Mail #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 );

              Olly
              Admin & Mod

                wppizza menu items (just like normal WP posts) must be assigned to a category
                if you do not set one – and when i add something in an update that deals with avoiding this warning – all that would happen is that i would force a category for you programatically (the first/top one in your wppizza categories list)
                so you might as well select one that is most likely more appropriate i would think

                hope that explains things somewhat

                Olly
                Admin & Mod

                  updating from what version to what version exactly

                  in any event, that’s – most probably – because your item is not associated with any category
                  although i can add something that would suppress this warning, i would really suggest you select a category to go with it

                  in reply to: custom opening hours are automatically added #42102
                  Olly
                  Admin & Mod

                    All of your plugins (bar one) are at least 1 and some even 2 years old
                    and the wppizza plugin itself you are using is also about 7 month out of date

                    I would suggest you update your plugins to start off with

                    in reply to: custom opening hours are automatically added #42097
                    Olly
                    Admin & Mod

                      also :
                      what wppizzq version
                      (and versions of related wppizza plugins)

                      in reply to: custom opening hours are automatically added #42096
                      Olly
                      Admin & Mod

                        what other plugins are you running ?
                        any custom coding of some sort ?

                        >Have you ever had such a similar case?
                        no

                        in reply to: custom opening hours are automatically added #42066
                        Olly
                        Admin & Mod

                          when does this happen ?
                          when you install the plugin?
                          when you update the plugin ?
                          at some other random time ?

                          in reply to: Ingredients Custom Group #41998
                          Olly
                          Admin & Mod

                            you’d have to write some javascript to show/hide things
                            there are plenty of classes you can target

                            (and you’d also have to trigger clicks to select/deselect if – for example – someone selected a saladsauce but then changed his/her mind and wants pommes instead )

                            in reply to: Burger+drink for free #41949
                            Olly
                            Admin & Mod

                              maybe it would be a better idea to actually create some sort of “burger menu” to start off with.
                              something along the lines of the “breakfast example” here

                              https://demo.wp-pizza.com/wppizza-add-ingredients/our-menu/user/

                              in reply to: Pre-order inactive but still showing #41947
                              Olly
                              Admin & Mod

                                one more quick question for you please:
                                was the preorder plugin an update from an earlier version , or did you install v2.5.2 to begin with on that site ?
                                thanks

                                in reply to: Pre-order inactive but still showing #41946
                                Olly
                                Admin & Mod

                                  PS perhaps check the other strings in that shoppingcart section too

                                  in reply to: Pre-order inactive but still showing #41945
                                  Olly
                                  Admin & Mod

                                    my guess would be that for some reason (i will check if i can reproduce this somehow)
                                    your localization strings in wppizza->localization got overwritten with the settings from the preorder plugin)

                                    so if you go to
                                    [www.yoursite.com] /wp-admin/edit.php?post_type=wppizza&page=localization
                                    and scroll down to “Shoppingcart” you will find this there , instead of the defaults

                                    so if it says <span class="wppizza_cart_preorder">currently closed – pre-orders only</span> somewhere in one of those text boxes, simply overwrite this with “currently closed” (or whatever you want to say )

                                    let me know if my assumption/guess is correct please

                                    in reply to: Increasing Font Size In Menu Item #41926
                                    Olly
                                    Admin & Mod

                                      that’s typically down to some broken/invalid css before that stops any declarations after being applied

                                      in reply to: order_details in DB – Change format #41904
                                      Olly
                                      Admin & Mod

                                        a quick – working – example (as mentioned, mileage may vary, and the caveat regarding function name remains)

                                        
                                        /* get orders */
                                        $orders = wppizza_get_orders();
                                        	
                                        /* get template */
                                        $template_type = 'print';
                                        $template_id = 0;
                                        
                                        /* parameters of template print template id 0 */
                                        $template_parameters = get_option(WPPIZZA_SLUG.'_templates_'.$template_type);
                                        $template_parameters = $template_parameters[$template_id];
                                        
                                        /* get markup for each order */
                                        foreach($orders['orders'] as $order_formatted){
                                        	$order_for_template = array();
                                        	$order_for_template['sections'] = $order_formatted;
                                        	$markup = WPPIZZA() -> templates_email_print -> get_template_email_html_sections_markup($order_for_template, $template_parameters, $template_type, $template_id);	
                                        }
                                        
                                        
                                        in reply to: order_details in DB – Change format #41903
                                        Olly
                                        Admin & Mod

                                          i would strongly suggest you start here in that case
                                          https://docs.wp-pizza.com/developers/?section=function-wppizza_get_orders

                                          get the template parameters (in this case print from the print templates id=0 and assuming it’s set to be using html format for your purpose)

                                          
                                          	$template_type = 'print';
                                          	$template_id = 0;
                                          
                                          	/* parameters of template print template id 0 */
                                          	$template_parameters = get_option(WPPIZZA_SLUG.'_templates_'.$template_type);
                                          	$template_parameters = $template_parameters[$template_id];
                                          
                                          	/* 
                                          		get the html markup  
                                          		$order formatted will be the order(s) you get from the wppizza_get_orders() functions
                                          		so the below should be in a loop
                                          	*/
                                          $markup = WPPIZZA() -> templates_email_print -> get_template_email_html_sections_markup($order_formatted, $template_parameters, $template_type, $template_id);
                                          
                                          

                                          mileage may vary, and not tested as such, but something along these lines.

                                          the next version of WPpizza will probably have a global wrapper function that replaces the WPPIZZA() -> templates_email_print -> get_template_email_html_sections_markup with something that is easier to use (and i would strongly recommend to use it once it’s implemented as the get_template_email_html_sections_markup referred to above *might( well change at some point in the future as it’s really only an internal function, but I’m just mentioning it here. just do not rely on it )

                                          in reply to: order_details in DB – Change format #41901
                                          Olly
                                          Admin & Mod

                                            sorry, but only plaintext will be stored in these fields
                                            I dont actually even understand why html would be useful there I must admit

                                          Viewing 20 posts - 961 through 980 (of 4,446 total)