Olly

Forum Replies Created

Viewing 20 posts - 1,121 through 1,140 (of 4,431 total)
  • Author
    Posts
  • in reply to: Can’t get the Customer Feature to show #38838
    Olly
    Admin & Mod

      >How do I go about changing that?
      you don’t . as that’s automatic and will always be “on” so to speak as an email must be set to be able to register and receive your passwords etc (maybe one could relabel it to “auto” one day or something)

      in reply to: Can’t get the Customer Feature to show #38836
      Olly
      Admin & Mod
        in reply to: Order History Report #38825
        Olly
        Admin & Mod

          that’s what wppizza -> reports is for

          in reply to: Half and Half Query #38725
          Olly
          Admin & Mod

            sorry, but there’s no provision for this sort of thing
            as i remember that this has once cropped up in the (distant) past, i might add such an option at some point , but cannot give you any ETA as to when (or even if) this will be added

            in reply to: Delivery Price per Category #38724
            Olly
            Admin & Mod

              you could probably use this one

              add_filter('wppizza_fltr_delivery_charges', 'my_function', 10, 2);
              function my_function($delivery_charges, $items){
              /* do your thing here based on $items */
              return $delivery_charges;
              }
              
              in reply to: Different Delivery/ pickup opening times #38666
              Olly
              Admin & Mod

                >Thanks Olly I got it sorted.
                good stuff

                i’ll have a look if there’s something that could be done to dynamically change the “opening times above the cart” too somehow at som point perhaps (though not very hopeful as that’s quite a static thing)

                to be honest you are probably better off not to display those in the widget and simply write something in freeform text somewhere regarding pickup and delivery opening times

                in reply to: Gird layout is not working #38657
                Olly
                Admin & Mod

                  only your host/server admin will be able to tell you why it throws a 403
                  what i can tell you is this though

                  the wppizza.grid.css.php dynamically generates the css as per your settings and has a content type of

                  header(“Content-Type: text/css”);

                  it *might* be the case that due to the fact it’s a php file but with a text/css header your server throws the 403
                  it *might* also be the case that dues to the above your file permissions for this file have to be different

                  but again, only your server admin will be able to track down (by looking at log files etc) why exactly the issue exists

                  in reply to: Need to add the Payment type in email Subject Line #38642
                  Olly
                  Admin & Mod

                    apologies, my fault i think (i didnt test this and only did it from memory)

                    i believe the

                    
                    $subject['prefix'] .= ' '.$order['initiator'];
                    

                    in the first example (now corrected) should actually be

                    
                    $subject['prefix'] .= ' '.$order->initiator;
                    
                    in reply to: Need to add the Payment type in email Subject Line #38635
                    Olly
                    Admin & Mod

                      in fact (and then I promise I’ll shut up :) ) actions/filter hooks exist precisely for the reason that you do not have to touch core files but can extend/change a/some functionality of a plugin/theme/wordpress

                      in reply to: Need to add the Payment type in email Subject Line #38634
                      Olly
                      Admin & Mod

                        PS: never EVER edit core files (of ANY plugin, theme or indeed core wordpress files)
                        (with – very very – few exceptions that is.)

                        in reply to: Need to add the Payment type in email Subject Line #38633
                        Olly
                        Admin & Mod

                          NO
                          you MUST learn about wordpress filters and actions and how they work
                          https://docs.wp-pizza.com/developers/?section=filters-actions-functions

                          in reply to: Need to add the Payment type in email Subject Line #38631
                          Olly
                          Admin & Mod

                            as of WPPizza v3.6.6 – and earlier – you can do this

                            
                            add_filter('wppizza_filter_email_subject', 'prefix_filter_email_subject', 10 , 2);
                            function prefix_filter_email_subject($subject, $order){
                            
                            	/* 
                            	$subject is an array made up of 
                            	$subject['prefix'] - typically contains blogname followed by items added to subject line in wppizza->order form 
                            	$subject['main'] - typically contains "your order" localization string (wppizza->localization)
                            	$subject['suffix'] - typically contains date of order according to date/time format set in WP->settings
                            	*/
                            	
                            	/* example: adding the "initiator" (i.e payment gateway ident) after the prefix - typically "COD" or "STRIPE" etc, tweak as required, perhaps use some conditionals to change the label to something else if "COD" etc etc */
                            	
                            	$subject['prefix'] .= ' '.$order -> initiator;
                            	
                            
                            	return $subject;
                            }
                            

                            the next / later version will have an additional parameter in the filter that has the order details already formatted

                            
                            add_filter('wppizza_filter_email_subject', 'prefix_filter_email_subject', 10 , 3);
                            function prefix_filter_email_subject($subject, $order, $order_formatted){
                            
                            	/* 
                            	$subject is an array made up of 
                            	$subject['prefix'] - typically contains blogname followed by items added to subject line in wppizza->order form 
                            	$subject['main'] - typically contains "your order" localization string (wppizza->localization)
                            	$subject['suffix'] - typically contains date of order according to date/time format set in WP->settings
                            	*/
                            	
                            	/* example: adding the label of a gateway as set in wppizza->gateways after the prefix , tweak as required*/	
                            	$subject['prefix'] .= ' '.$order_formatted['ordervars']['payment_type']['value_formatted'];
                            	
                            	/* example2: adding the paymet method (i.e typically simply  "Cash" or "Credit Card" ) , tweak as required*/	
                            	$subject['prefix'] .= ' '.$order_formatted['ordervars']['payment_method']['value_formatted'];
                            	
                            	/* see $order_formatted for all available parameters */
                            
                            	return $subject;
                            }
                            

                            in both cases the $subject array returned will be imploded with a space between each key

                            in reply to: Different Delivery/ pickup opening times #38616
                            Olly
                            Admin & Mod

                              without a link to your site and/or seeing the exact code you used , i cannnot comment really

                              in reply to: meal size location #38509
                              Olly
                              Admin & Mod

                                Hi

                                although you could do this with the filters available
                                (https://docs.wp-pizza.com/developers/?section=wppizza-markup-loop-posts-prices-php)
                                for your own sanity , i would probably suggest you use/make a copy of the posts.prices.php template as outlined here
                                https://docs.wp-pizza.com/developers/?section=modify-templates-readme
                                under “EDITING FILES DIRECTLY – ONLY IF FILTERS/ACTIONS CANNOT BE USED”
                                and simply moving the relevant elements around

                                i.e move

                                
                                $markup['post_price_'.$key.'_span'] = '<span>' . $price['price'] . '</span>';
                                

                                AFTER

                                
                                if(empty($price['no_label'])){
                                   $markup['post_price_'.$key.'_label'] = '<div class="' . $price['class_size'] . '">' . $price['size'] . '</div>';
                                }
                                

                                instead of where it is now (so just reverse the two locations of those parts of the script)

                                not thoroughly tested , but should work i would think

                                hope that helps

                                in reply to: alternate Orders page. #38474
                                Olly
                                Admin & Mod

                                  unless you are having a dedicated site where you know where stuff comes from (perhaps a multisite setup though) it will ALWAYS need some programming to do this sort of thing

                                  in reply to: Address issue #38470
                                  Olly
                                  Admin & Mod

                                    PS: the behaviour of enter and tabs also depends on how many results there are in the dropdown to start off with, so i would need a specific “order of events” – i.e “enter address abc” hit enter , enter address xyz – hit TAB etc to be able to reproduce this and be able to tell what the issue might be (if any)

                                    in reply to: Address issue #38469
                                    Olly
                                    Admin & Mod

                                      ok, it turns out , that the google maps api does not always return a street or house name/number for all locations (even if it is typed in to the address box) and the plugin simply says “ambiguous” as for a proper address you will be able to deliver to, you need of course more than just the street number

                                      I am really not sure if there is anything i will be able to do about this but I will see what i can do.
                                      maybe in cases where there is no housenumber returned there is a second/different api query that one can run … but at the moment i cannot tell you much more or indeed if this is doable

                                      (unfortuynately there will always be cases where the maps/distance calculation will simply not work – one of the reasons why that part of the plugin will probably always be marked as experimental/beta)

                                      in reply to: Google Cloud Print Margin #38443
                                      Olly
                                      Admin & Mod

                                        just to add to this – might help someone somewhere – allow me to also point to this topic
                                        https://support.wp-pizza.com/topic/question-google-cloudprint/

                                        ( especially the last few printing options/examples/tests posts)

                                        in reply to: responsive layout adjustment #38441
                                        Olly
                                        Admin & Mod

                                          if you want it on the same line, just leave the style at “default”
                                          However, if you do that you might have issues on small screens – but that depends on your theme and the number of prices/sizes you have for each item. hence the very existence of the “responsive” layout

                                          alternatively, you can also mess around with the “element” attribute of the shortcode (https://docs.wp-pizza.com/shortcodes/?section=by-category) to move bits around and add required css

                                          in reply to: DIfferent Pick-up opening hours in functions.php #38436
                                          Olly
                                          Admin & Mod

                                            I’ve deleted my previous replies (only confuses the issue) and updated the documentation here instead

                                            https://docs.wp-pizza.com/developers/?section=pickup-opening-times

                                            (as there were some parts to it missing that makes this work in different scenarios)

                                          Viewing 20 posts - 1,121 through 1,140 (of 4,431 total)