PIckbazar Laravel

How to use is as single vendor?

Hello,

If you want to use this multi-vendor marketplace as a single vendor shop you have to keep in mind that you are only doing it so your user can't understand if it is a multivendor or not. sO the changes you have to do are in your shop code.

Admin changes:

1. First of all create a single shop from the admin dashboard as admin.

2. Remove the Register as store owner section from admin login. Remove the below section of code from "rest/src/components/auth/login-form.tsx" file

<div className="text-sm sm:text-base text-body text-center">     {t("form:text-no-account")}{" "}     <Link href="/register" className="ms-1 underline text-accent font-semibold transition-colors duration-200 focus:outline-none hover:text-accent-hover focus:text-accent-700 hover:no-underline focus:no-underline" >         {t("form:link-register-shop-owner")}     </Link> </div>


Shop changes: 

1. Remove the 'Become a seller" button and "shops" menu from the shop menu. Remove below code from "src/components/layouts/header-minimal.tsx" file

<Link href={`${process.env.NEXT_PUBLIC_ADMIN_URL}/register`} variant="button" target="_blank" > 
    {t('text-become-seller')} 
</Link>

and below code from "src/components/layouts/header.tsx"

<a href={`${process.env.NEXT_PUBLIC_ADMIN_URL}/register`} target="_blank" rel="noreferrer" className="inline-flex items-center justify-center flex-shrink-0 px-3 py-0 text-sm font-semibold leading-none transition duration-300 ease-in-out border border-transparent rounded outline-none h-9 bg-accent text-light hover:bg-accent-hover focus:outline-none focus:shadow focus:ring-1 focus:ring-accent-700" > {t('text-become-seller')} </a>


2. Then remove the seller section from the shop details section. Remove the below code from the "src/components/products/details/details.tsx" path

{shop?.name && ( <div className="flex items-center mt-2"> <span className="text-sm font-semibold text-heading capitalize me-6 py-1"> {t('common:text-sellers')} </span> <button onClick={() => navigate(`${ROUTES.SHOPS}/${encodeURIComponent(shop?.slug)}`) } className="text-sm text-accent tracking-wider transition underline hover:text-accent-hover hover:no-underline" > {shop?.name} </button> </div> )}


3. Now on the order details page remove the suborders section. Remove below code from "src/components/orders/order-view.tsx" path.

{order?.children?.length > 1 ? (          <div>            <h2 classname="text-xl font-bold text-heading mt-12 mb-6">              {t('text-sub-orders')}            </h2>            <div>              <div classname="flex items-start border border-gray-700 rounded p-4 mb-12">                <span classname="w-4 h-4 px-2 rounded-sm bg-dark flex items-center justify-center me-3 mt-0.5">                  <checkmark classname="w-2 h-2 text-light flex-shrink-0"></checkmark>                </span>                <p classname="text-heading text-sm">                  <span classname="font-bold">{t('text-note')}:</span>{' '}                  {t('message-sub-order')}                </p>              </div>              {Array.isArray(order?.children) && order?.children.length && (                <div classname="">                  <suborderitems items="{order?.children}"></suborderitems>                </div>              )}            </div>          </div>        ) : null}

4. Now remove the view suborders button from the my-orders page.  Now replace the below code from "src/components/orders/order-details.tsx"

<Link href="{`${ROUTES.ORDERS}/${tracking_number}`}" classname="font-semibold text-sm text-accent flex items-center transition duration-200 no-underline hover:text-accent-hover focus:text-accent-hover">                <eye width="{20}" classname="me-2"></eye>                {t('text-sub-orders')}              </Link>


use this code to replace above code

<Link href="{`${ROUTES.ORDERS}/${tracking_number}`}" classname="font-semibold text-sm text-accent flex items-center transition duration-200 no-underline hover:text-accent-hover focus:text-accent-hover">      <eye width="{20}" classname="me-2"></eye>      Details
</Link>