<?php

class ControllerAppiOrder extends Controller
{

    public function index()
    {

        echo 'yes';
        $barcode="868268976059200U6";

      $query =  $this->db->query("select * from product_url where barcode like '".$barcode."' or stock_code like '%".$barcode."%'");
        if($query->num_rows){

            $this->load->model("entegrasyon/addproduct");
            $user_info= $this->db->query("SELECT * FROM `oc_user_database` ud left join oc_user u on(ud.database_id=u.user_database_id) where ud.name='" . USERNAME . "'")->row;

            $url='https://www.trendyol.com/'.$query['url'];
            $product_info = $this->model_entegrasyon_addproduct->get_product($url, $user_info);

            print_r($product_info);

        }

    }



}