suggestion for preselect field on checkout coming from URL param

WPPizza – A Restaurant Plugin for WordPress Support General Support suggestion for preselect field on checkout coming from URL param

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #49305
    tueddy
    Participant

      Hello, Oly,

      I need a suggestion how I can implement this:
      My WPPizza shop is for inhouse (restaurant tables) only! It’s already runing fine for the waiters.
      I’d like to place table orders now by the guest itself. For this purpose I generate a QR-code which the guest scans. My custom php-page gets the code from URL param and evaluates the QR code in which the table is encoded. Now I have the table number and can store this in a session value. Afterwards I redirect to the shop startpage. The guest orders some items and goes to the checkout. Now the field “cname” should be preset to exactly this table name. And best not editable by the guest just displaying “table 04”. Do you have an idea how I can preset this field on checkout with the value stored in the session?

      i tried at startup: WPPIZZA()->session->add_userdata_key(“table_name”, “my table from QR-Code, e.g. table 04”);
      and on checkout with wppizza_formfields_inputs ??

      This does not preselect the right name on checkout:

      $customer_data_set = WPPIZZA()->session->get_userdata();
      $customer_data_set["cname"] = "table 04";
      

      Thanks a lot
      Dirk

      #49357
      tueddy
      Participant

        Any suggestion how to solve this?
        Thanks!

        #49414
        Olly
        Admin & Mod
          #49415
          tueddy
          Participant

            This is exactly the documentation i was looking for.
            Thanks Olly!

          Viewing 4 posts - 1 through 4 (of 4 total)
          • The topic ‘suggestion for preselect field on checkout coming from URL param’ is closed to new replies.