Bob Passaro

My feedback

  1. 2 votes
    Vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      You have left! (?) (thinking…)
      Bob Passaro shared this idea  · 
    • 4 votes
      Vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        Signed in as (Sign out)
        You have left! (?) (thinking…)
        Bob Passaro commented  · 

        Are you talking about the Vendor fields in LS? when the product gets imported from LS you have access to the Vendor ID, but not the name of the Vendor. We handled this by writing a separate plugin to make another API call to use the Vendor ID get the name of the Vendor.

        The trouble is, there is not a hook where I want one in the function that saves an imported product to Woocommerce -- so you either have to hack the LS POS plugin (never a good idea because it will be removed with the LS plugin updates) find another way around (which there probably is, but I haven't worked on yet.) But the core piece is the following, Let me know if you want more info on what you have to do with this:

        /**
        * Fetch the name of a manufacturer from Lightspeed POS using the vendor ID
        *
        * @param int $vendor_ID ( from the Lightspeed item, the ID of the Vendor that is set in Lightspeed)
        *
        * @return string
        *
        */
        function newt_fetch_designer_name_from_LS( $vendor_ID ) {
        // The url to fetch the manufacturer details from
        $url = "https://api.merchantos.com/API/Account/" . get_option( 'wclsi_account_id' ) . "/Vendor/" . $vendor_ID . ".json";
        $curl = curl_init();

        curl_setopt($curl, CURLOPT_URL, $url);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
        curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: Bearer " . get_option( 'wclsi_oauth_token' ),
        'Accept: application/json'
        ));

        $response = curl_exec($curl);
        curl_close($curl);

        $data = json_decode($response, TRUE);
        $name = $data['Vendor']['name'];

        return $name;
        }

      • 11 votes
        Vote
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          Signed in as (Sign out)
          You have left! (?) (thinking…)
          Bob Passaro commented  · 

          Looks like this was done! Awesome. Thanks.

          Bob Passaro shared this idea  · 
        • 16 votes
          Vote
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            Signed in as (Sign out)
            You have left! (?) (thinking…)
            Bob Passaro supported this idea  · 
            Bob Passaro commented  · 

            Related to this: after reloading products from LS in order to get ready import newly added products into Woocommerce, it would be great if you could sort the table by "date loaded" as opposed to date imported or date synced. I work on a store with a similar situation (11,000 products in LS and about 1,000 on the website). When new products are entered in LS, we currently have to search by product title to find them one at a time in order to import them. It's not horrible since they usually add about 20 new products at a time, but having all newly *Loaded* products at the top of the table would be so much easier.

          Feedback and Knowledge Base