<?php

class product_page extends mainController {

    public function __construct() {
        parent::__construct(false);
        $this->load->model('auth');
        $this->modal = new authModel();
        $registry = Registry::getInstance();
        $registry->product = new Product;

    }

    public function landing() {
        $vars['error'] = false;
        $open_product_page = $this->modal->open_product_page();
        if($open_product_page){
            $this->load->view('product_page', null, true);
        }else{
            header('Refresh: 0; url=' . SITE_LINK . 'smc');
        }

    }
    public function searchBarcodeforPOS() {
        $registry = Registry::getInstance();

        $data = $registry->product->searchBarcodeforPOS($_GET['barcode'] ,null, null,null, null,'true');
        die(json_encode($data));
    }

}
