<?php
namespace ApplicationBundle\Modules\MarketPlace\Controller;
use ApplicationBundle\Constants\EmployeeConstant;
use ApplicationBundle\Constants\GeneralConstant;
use ApplicationBundle\Controller\GenericController;
use ApplicationBundle\Modules\Authentication\Constants\UserConstants; use ApplicationBundle\Modules\Api\Constants\ApiConstants;
use ApplicationBundle\Modules\Buddybee\Buddybee;
use ApplicationBundle\Modules\System\MiscActions;
use ApplicationBundle\Modules\User\Company;
use ApplicationBundle\Modules\Inventory\Inventory;
use CompanyGroupBundle\Entity\EntityCreateTopic;
use CompanyGroupBundle\Entity\EntityInvoice;
use CompanyGroupBundle\Entity\EntityMeetingSession;
use Endroid\QrCode\Builder\BuilderInterface;
use Endroid\QrCodeBundle\Response\QrCodeResponse;
use Ps\PdfBundle\Annotation\Pdf;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use CompanyGroupBundle\Entity\EntityApplicantDetails;
use Symfony\Component\Routing\Generator\UrlGenerator;
class MarketPlaceController extends GenericController
{
// my profile
public function MyProfileAction()
{
return $this-> render('@MarketPlace/pages/views/market_place_my_profile_details.html.twig',
array(
'page_title' => 'My Profile',
));
}
// vendor add product
public function VendorAddProductAction()
{
return $this-> render('@MarketPlace/pages/list/market_place_vendor_add_product_list.html.twig',
array(
'page_title' => 'Add Your Product',
));
}
// vendor edit product
public function VendorEditProductAction()
{
return $this-> render('@MarketPlace/pages/list/market_place_vendor_edit_product.html.twig',
array(
'page_title' => 'Edit Information',
));
}
// vendor profile details
public function VendorProfileDetailstAction()
{
return $this-> render('@MarketPlace/pages/views/market_place_vendor_profile_details.html.twig',
array(
'page_title' => 'Vendor Profile',
));
}
// my cart
public function MyCartAction(Request $request, $id = 0)
{
$em = $this->getDoctrine()->getManager();
$companyId = $this->getLoggedUserCompanyId($request);
$company_data = Company::getCompanyData($em, $companyId);
$products = $em->getRepository('ApplicationBundle\\Entity\\InvProducts')->findOneBy(
array(
'id' => $id
)
);
$dataArray = array(
'page_title' => 'Cart',
'company_data' => $company_data,
'products' => $products,
'brandList' => Inventory::GetBrandList($em, $companyId),
'igList' => Inventory::ItemGroupList($em, $companyId)
);
return $this-> render('@MarketPlace/pages/views/market_place_my_cart.html.twig',$dataArray
);
}
// empty cart
public function EmptytCartAction()
{
return $this-> render('@MarketPlace/pages/views/market_place_empty_cart.html.twig',
array(
'page_title' => 'Empty Cart',
));
}
// checkout details
public function CheckoutDetailstAction(Request $request, $id = 0)
{
// $company_data = Company::getCompanyData($em, $companyId);
// $products = $em->getRepository('ApplicationBundle\\Entity\\InvProducts')->findOneBy(
// array(
// 'id' => $id
// )
// );
$dataArray = array(
'page_title' => 'Checkout',
// 'company_data' => $company_data,
// 'products' => $products,
// 'brandList' => Inventory::GetBrandList($em, $companyId),
// 'igList' => Inventory::ItemGroupList($em, $companyId)
);
return $this-> render('@MarketPlace/pages/list/market_place_checkout_details.html.twig', $dataArray
);
}
// order trac
public function OrderTracAction()
{
return $this-> render('@MarketPlace/pages/views/market_place_order_trac.html.twig',
array(
'page_title' => 'Order Trac',
));
}
// order confirm
public function OrderConfirm()
{
return $this-> render('@MarketPlace/pages/views/market_place_order_confirmed.html.twig',
array(
'page_title' => 'Order Confirm',
));
}
// company profile
public function CompanyProfileAction()
{
return $this-> render('@MarketPlace/pages/views/market_place_company_profile.html.twig',
array(
'page_title' => 'Company Profile',
));
}
// company profile edit
public function CompanyProfileEditAction()
{
return $this-> render('@MarketPlace/pages/views/market_place_company_profile_edit.html.twig',
array(
'page_title' => 'Company Profile Edit',
));
}
}