Cloud Print based on Location

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #21533
    Kevin
    Participant

      Is there a way to make this happen?

      Pizza company has multiple locations. Someone places an order on the website. Order is sent to the nearest location based on postal code. That location receives a printout via the Google Cloud Print extension.

      Any help would be appreciated.

      #21561
      Olly
      Admin & Mod

        the cloudprint plugin has a filter

        
        $printers = apply_filters('wppizza_gcp_filter_printers', $printers, $orderId, $order);
        

        the $order variable returns an array of order details where $order['customer']['post'] includes the postcode selected (have a look at the full array, you’ll find the key that has the postcode)
        based on that keys value , you could set the printer (i.e return the required $printers parameters) that’s supposed to be used

        you’ll probably have to make sure no “Printer ID” is set in the cloudprint plugin settings (as that would override it)

        not tested, but i think one could make this work

      Viewing 2 posts - 1 through 2 (of 2 total)
      • The topic ‘Cloud Print based on Location’ is closed to new replies.