src/ApplicationBundle/Modules/MarketPlace/Controller/MarketPlaceController.php line 45

Open in your IDE?
  1. <?php
  2. namespace ApplicationBundle\Modules\MarketPlace\Controller;
  3. use ApplicationBundle\Constants\EmployeeConstant;
  4. use ApplicationBundle\Constants\GeneralConstant;
  5. use ApplicationBundle\Controller\GenericController;
  6. use ApplicationBundle\Modules\Authentication\Constants\UserConstants; use ApplicationBundle\Modules\Api\Constants\ApiConstants;
  7. use ApplicationBundle\Modules\Buddybee\Buddybee;
  8. use ApplicationBundle\Modules\System\MiscActions;
  9. use ApplicationBundle\Modules\User\Company;
  10. use ApplicationBundle\Modules\Inventory\Inventory;
  11. use CompanyGroupBundle\Entity\EntityCreateTopic;
  12. use CompanyGroupBundle\Entity\EntityInvoice;
  13. use CompanyGroupBundle\Entity\EntityMeetingSession;
  14. use Endroid\QrCode\Builder\BuilderInterface;
  15. use Endroid\QrCodeBundle\Response\QrCodeResponse;
  16. use Ps\PdfBundle\Annotation\Pdf;
  17. use Symfony\Component\HttpFoundation\JsonResponse;
  18. use Symfony\Component\HttpFoundation\Request;
  19. use CompanyGroupBundle\Entity\EntityApplicantDetails;
  20. use Symfony\Component\Routing\Generator\UrlGenerator;
  21. class MarketPlaceController extends GenericController
  22. {
  23.     // my profile
  24.     public function MyProfileAction()
  25.     {
  26.         return $this-> render('@MarketPlace/pages/views/market_place_my_profile_details.html.twig'
  27.         array(
  28.             'page_title' => 'My Profile',
  29.         ));
  30.     }
  31.     // vendor add product
  32.     public function VendorAddProductAction()
  33.     {
  34.         return $this-> render('@MarketPlace/pages/list/market_place_vendor_add_product_list.html.twig'
  35.         array(
  36.             'page_title' => 'Add Your Product',
  37.         ));
  38.     }
  39.     // vendor edit product
  40.     public function VendorEditProductAction()
  41.     {
  42.         return $this-> render('@MarketPlace/pages/list/market_place_vendor_edit_product.html.twig'
  43.         array(
  44.             'page_title' => 'Edit Information',
  45.         ));
  46.     }
  47.     // vendor profile details
  48.     public function VendorProfileDetailstAction()
  49.     {
  50.         return $this-> render('@MarketPlace/pages/views/market_place_vendor_profile_details.html.twig'
  51.         array(
  52.             'page_title' => 'Vendor Profile',
  53.         ));
  54.     }
  55.     // my cart
  56.     public function MyCartAction(Request $request$id 0)
  57.     {
  58.         $em $this->getDoctrine()->getManager();
  59.         $companyId $this->getLoggedUserCompanyId($request);
  60.         $company_data Company::getCompanyData($em$companyId);
  61.         $products $em->getRepository('ApplicationBundle\\Entity\\InvProducts')->findOneBy(
  62.             array(
  63.                 'id' => $id
  64.             )
  65.         );
  66.         $dataArray = array(
  67.             'page_title' => 'Cart',
  68.             'company_data' => $company_data,
  69.             'products' => $products,
  70.             'brandList' => Inventory::GetBrandList($em$companyId),
  71.             'igList' => Inventory::ItemGroupList($em$companyId)
  72.         );
  73.         return $this-> render('@MarketPlace/pages/views/market_place_my_cart.html.twig',$dataArray
  74.         );
  75.     }
  76.     // empty cart
  77.     public function EmptytCartAction()
  78.     {
  79.         return $this-> render('@MarketPlace/pages/views/market_place_empty_cart.html.twig'
  80.         array(
  81.             'page_title' => 'Empty Cart',
  82.         ));
  83.     }
  84.     // checkout details
  85.     public function CheckoutDetailstAction(Request $request$id 0)
  86.     {
  87. //        $company_data = Company::getCompanyData($em, $companyId);
  88. //        $products = $em->getRepository('ApplicationBundle\\Entity\\InvProducts')->findOneBy(
  89. //            array(
  90. //                'id' => $id
  91. //            )
  92. //        );
  93.         $dataArray = array(
  94.             'page_title' => 'Checkout',
  95. //            'company_data' => $company_data,
  96. //            'products' => $products,
  97. //            'brandList' => Inventory::GetBrandList($em, $companyId),
  98. //            'igList' => Inventory::ItemGroupList($em, $companyId)
  99.         );
  100.         return $this-> render('@MarketPlace/pages/list/market_place_checkout_details.html.twig'$dataArray
  101.         );
  102.     }
  103.     // order trac
  104.     public function OrderTracAction()
  105.     {
  106.         return $this-> render('@MarketPlace/pages/views/market_place_order_trac.html.twig'
  107.         array(
  108.             'page_title' => 'Order Trac',
  109.         ));
  110.     }
  111.     // order confirm
  112.     public function OrderConfirm()
  113.     {
  114.         return $this-> render('@MarketPlace/pages/views/market_place_order_confirmed.html.twig'
  115.         array(
  116.             'page_title' => 'Order Confirm',
  117.         ));
  118.     }
  119.     // company profile
  120.     public function CompanyProfileAction()
  121.     {
  122.         return $this-> render('@MarketPlace/pages/views/market_place_company_profile.html.twig'
  123.         array(
  124.             'page_title' => 'Company Profile',
  125.         ));
  126.     }
  127.     // company profile edit
  128.     public function CompanyProfileEditAction()
  129.     {
  130.         return $this-> render('@MarketPlace/pages/views/market_place_company_profile_edit.html.twig'
  131.         array(
  132.             'page_title' => 'Company Profile Edit',
  133.         ));
  134.     }
  135. }