Olly

Forum Replies Created

Viewing 20 posts - 1,241 through 1,260 (of 4,451 total)
  • Author
    Posts
  • in reply to: "your cart is empty" when clicking place order #36738
    Olly
    Admin & Mod

      let me put it this way. the plugin (wppizza that is) doesn’t care one iota what kind of session handling the server uses. files, memcache,memcached or whatever else they/you want to use
      all it cares about is that sessions work. if they do not , then the setup is simply wrong . there’s 100% nothing the plugin (author) can do about it or “suggest” other than “fix your server setup. I know nothing about it”

      i can give you a hint though: if using memcache, the session.save_path should most certainly not be /tmp (which is what it looks like looking at your configuration you sent)

      PS: there is always an – outside – chance though that some other plugin messes around with these things , but suffice to say, it isn’t wppizza, i can assure you

      in reply to: "your cart is empty" when clicking place order #36736
      Olly
      Admin & Mod

        in any event

        >quote from your service provider:
        >I will kindly ask you to contact the plugin support team and ask them how exactly shall we override this error.

        they cannot possibly be serious. it’s THEIR session setup error. there’s nothing to “override” . it’s the server/hosts job to setup session handling correctly (unless of course the user – i.e you – has access to the php.ini and messed it up 🙂 )

        in reply to: "your cart is empty" when clicking place order #36735
        Olly
        Admin & Mod

          >response from hosting provider
          >I tried to find some information regarding this error from a trustful source but to no avail.

          seriously ? they have heard of google , right ?

          https://www.google.co.uk/search?q=PHP+Warning%3A+session_start%28%29%3A+Cannot+find+save+handler+‘memcache’+–+session+startup+failed

          in reply to: "your cart is empty" when clicking place order #36733
          Olly
          Admin & Mod
            This reply has been marked as private.
            in reply to: "your cart is empty" when clicking place order #36731
            Olly
            Admin & Mod

              from your debug log

              [13-Apr-2018 18:46:11 UTC] PHP Warning: session_start(): Cannot find save handler ‘memcache’ – session startup failed ……

              that needs to be fixed (you should speak to your host)

              in reply to: "your cart is empty" when clicking place order #36729
              Olly
              Admin & Mod
                This reply has been marked as private.
                in reply to: Add Ingredients Issue #36697
                Olly
                Admin & Mod

                  if you are talking about the images there’s an option in wppiza->layout->Menu Item Images “pretty photo”
                  which will open an image in a lightbox kind of thing , other than that , there might be some other plugins that do things like that , but i have no idea

                  in reply to: Add Ingredients Issue #36695
                  Olly
                  Admin & Mod

                    Hi
                    sorry about the late reply. git completely snowed under with other things and it got lost in the queue so to speak

                    first of all, as I believe I already mentioned (perhaps), that plugin is in serious need of updating (in fact more or less re-writing) as soon as I get a chance , so what i would suggest – as a starting point – is to make a copy of the function
                    prepare_ingredients_for_markup($post_id, $item, $type) you will find in wppizza-addingredients.php to wherever you need it as – for example myprefix_prepare_ingredients_for_markup($post_id, $item) , omitting the type parameter

                    then at the top of that function add
                    $ai_options = get_option('wppizza_addingredients'); and replace the occurrences of $this->pluginOptions with $ai_options (or whatever you have called it) and pass the $post_id , $item from your loop to that new function you created

                    furthermore, i would also then perhaps replace
                    $showByGroup= (!empty($this->pluginOptions['options']['ingredients_show_groups_in_email']) && $type != 'cart' ) ? true : false;/* to do, by emails / thank you etc only */

                    with a simple
                    $showByGroup = true; or $showByGroup = false; (depending on what output you want) and take it from there

                    Note: none of the above is tested and it’s just an idea here, but should work i would think and should give you some more manageable array you can then use as you see fit

                    hope that helps somewhat

                    in reply to: Warning epaydk payment error #36602
                    Olly
                    Admin & Mod

                      ahh, now that makes sense , because it means that the notification message (at ipn.php) gets sent multiple times back to the server as otherwise you would not ever receive the normal order confirmation email
                      (this seems to happen only sometimes from what i can see and for reasons only ebay would be able to track down. might be waiting for a timely server response or any other reason, i don’t know)

                      in a nutshell, the order execution goes like this (there are a few other steps , but to keep it simple)

                      notification received at ipn, look for an order that has status “inprogress” or “unconfirmed” for that id.
                      if found, execute order, sending emails etc. once that’s all happened set status to “completed” – done

                      if the same ipn gets sent again, it will be looking for that “inprogress” status , however, it does not exist anymore as it is now “completed” (as we do not want to execute that order multiple times of course)

                      that’s as an explanation and it’s the only way i can see this happening

                      as there is a possibility somewhat, that other gateways might do the same, i will add something to the plugin (that’s the main wppizza plugin) to account for this. As I am in the middle of tearing a number of things apart an update is quite a few days away yet, so in the meantime, you could edit a corefile as follows (assuming you are familiar with simple php editing)

                      in wp-content/plugins/wppizza/classes/class.wppizza.order_execute.php you will find at approx line 1166

                      
                      /* error details */
                      $result['error'][] = array(
                      'critical'=> $critical, /* force sending of email to admin */
                      'error_id'=> 30007,
                      'error_message' => __('order not found using order id','wppizza-admin'),
                      'wp_error' => ''
                      );
                      /* logging, and sending */
                      $this->gateway_logging($result['error'], $gateway_reply, $order_id, $this->wppizza_gateway_ident, 'get-prepared-error');
                      /*
                      ipn, just return false !
                      */
                      return false;
                      

                      edit this to be the following

                      
                      /* 
                      if we receive ipn notifications multiple times for the same order, the status will already have changed to completed, 
                      so before throwing errors, check if that is the case and if so , simply ignore
                      */
                      $order = WPPIZZA()->db->fetch_order_details(false, $order_id, false, array('COMPLETED'), $wp_user_id);
                      if(!empty($order)){return;}
                      /* error details */
                      $result['error'][] = array(
                      'critical'=> $critical, /* force sending of email to admin */
                      'error_id'=> 30007,
                      'error_message' => __('order not found using order id','wppizza-admin'),
                      'wp_error' => ''
                      );
                      /* logging, and sending */
                      $this->gateway_logging($result['error'], $gateway_reply, $order_id, $this->wppizza_gateway_ident, 'get-prepared-error');
                      /*
                      ipn, just return false !
                      */
                      return false;
                      

                      save (and make a test order i would suggest)

                      i’ll add something like that to the next update

                      if you still have issues once this is added, please let me know.
                      while making sure that this works, maybe you could also perhaps enable
                      “Log successful orders” /wp-admin/edit.php?post_type=wppizza&page=settings for a few days
                      as it might give us a better idea/clue in case the above does not rectify the issue

                      (if it all works , after letting things run for a while, you can turn this off again)

                      in reply to: Warning epaydk payment error #36597
                      Olly
                      Admin & Mod
                        This reply has been marked as private.
                        in reply to: Add Ingredients Issue #36596
                        Olly
                        Admin & Mod

                          just did a test on your site and it works just fine…?!
                          any particular items in cart or checkout details you can give me so i can reproduce this ?

                          in reply to: Warning epaydk payment error #36595
                          Olly
                          Admin & Mod
                            This reply has been marked as private.
                            in reply to: Warning epaydk payment error #36592
                            Olly
                            Admin & Mod
                              This reply has been marked as private.
                              in reply to: Add Ingredients Issue #36579
                              Olly
                              Admin & Mod

                                re: On a side issue

                                as i dont know where or how you are using it , i cannot really comment other then to say that generally speaking you have to loop through $item[‘extend’][‘addingredients’]

                                correction: i believe this is actually $item['extend_data']['addingredients']

                                in reply to: Add Ingredients Issue #36578
                                Olly
                                Admin & Mod

                                  got a link ?

                                  in reply to: How to get list of orders with php ? #36577
                                  Olly
                                  Admin & Mod

                                    in fact i would suggest you simply use your own query

                                    ie. something like

                                    
                                    global $wpdb;
                                    $orders = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix . WPPIZZA_TABLE_ORDERS." WHERE payment_status='COMPLETED'  ORDER BY order_date DESC");

                                    as opposed to relying on internal functions that might change or get removed at any time (unless they are documented here https://docs.wp-pizza.com/developers/?section=filters-actions-functions , hence why there are a bunch of wrappers available the list of which gets expanded on an as needed basis )

                                    in reply to: How to get list of orders with php ? #36575
                                    Olly
                                    Admin & Mod

                                      that’s just offensive
                                      feel free to write your own plugin, maintain it over the years keeping things backwards compatible for old php, mysql versions while also accounting for endless variations of server setup, adding forever new things for your 1000’s of users , reply to literally thousands of support requests / emails / forum topics and then come back to me complaining

                                      in any event , that get_orders_orderhistory is a leftover from v2 and is only used in the order history and will probably be removed at some point in favour of a wrapper that will then use the fetch_order_details which will then allow queries that are not as restrictive as they are at the moment with the output being formatted as opposed to just the raw data and a bunch of other options

                                      in reply to: How to get list of orders with php ? #36570
                                      Olly
                                      Admin & Mod

                                        i’m afraid , there isnt really a simple way to do this as virtually all queries will only ever return a restricted dataset
                                        (either by user id , or by order id , or limited by pagination etc etc)

                                        that said, i can see the usefulness of making this available in some circumstances , and will add an easy to use wrapper function in one of the next updates

                                        in reply to: Restrict by Street Address #36443
                                        Olly
                                        Admin & Mod
                                          in reply to: Restrict by Street Address #36430
                                          Olly
                                          Admin & Mod

                                            PS: why is there a wp_footer action that prints some js if you are also enqueuing a customjs anyway you could add this to instead ?
                                            surely , one of these is not required i would have thought
                                            just an observation

                                          Viewing 20 posts - 1,241 through 1,260 (of 4,451 total)