• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups

How to identify between seller and customer

General Discussion
6
9
773
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    selvaraj last edited by selvaraj 30 Jul 2019, 12:55 30 Jul 2019, 12:54

    Hi,

    How to identity difference between seller and customer

    Example

    for customer we use if(auth('customer')) and for seller how we can check ?

    Thank you

    1 Reply Last reply Reply Quote 0
    • ghermans
      ghermans last edited by 30 Jul 2019, 14:03

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • N
        Naresh-webkul last edited by 31 Jul 2019, 05:49

        Hi,

        • The seller is the one who consumes the goods. seller is a person who is the end user of the product.
        • customer is the person who buys the goods or services and pays the price.
        • every seller is a type of customer but it is not necessary that every customer also be a seller.

        you can check seller using sellerRepository following :

        $seller = $this->sellerRepository->findOneByField('customer_id', auth()->guard('customer')->user()->id);

        where we are checking that current customer is a seller or not and customer_id ,column is reference to the customer table.

        S 1 Reply Last reply 31 Jul 2019, 06:57 Reply Quote 0
        • S
          selvaraj @Naresh-webkul last edited by 31 Jul 2019, 06:57

          @Naresh-webkul Prefect, thank you

          1 Reply Last reply Reply Quote 0
          • S
            selvaraj last edited by 2 Aug 2019, 07:41

            I found this function been used in the default blade layout

            app('Webkul\Marketplace\Repositories\SellerRepository')->isSeller(auth()->guard('customer')->user()->id)

            1 Reply Last reply Reply Quote 0
            • R
              rahul last edited by 2 Aug 2019, 08:18

              Hi @selvaraj

              We have created 'isSeller' function in our repository to identify seller, you can also use this function for seller.

              Thanks

              S A 2 Replies Last reply 2 Aug 2019, 09:15 Reply Quote 0
              • S
                selvaraj @rahul last edited by 2 Aug 2019, 09:15

                @rahul Hmm yes

                1 Reply Last reply Reply Quote 0
                • 4 years later
                • A
                  Aliyaa @rahul last edited by 27 Jun 2023, 09:20

                  @rahul said in How to identify between seller and customer:

                  We have created 'isSeller' function in our repository to identify seller, you can also use this function for seller.

                  Hi guys
                  Great job on creating the 'isSeller' function! This will be incredibly useful for identifying sellers within our repository.

                  1 Reply Last reply Reply Quote 0
                  • A
                    Amitk-Webkul last edited by 28 Jun 2023, 10:14

                    Yes, It will help to identify the sellers.

                    1 Reply Last reply Reply Quote 0
                    1 out of 9
                    • First post
                      1/9
                      Last post