예제 #1
0
 /**
  * NsBackorderPolicy constructor.
  * @param bool $id
  * @param null $table
  * @param null $ds
  */
 public function __construct($id = false, $table = null, $ds = null)
 {
     parent::__construct($id, $table, $ds);
     /**
      * Inventory count for policy
      */
     $this->virtualFields['inventory_count'] = "SELECT nsc.inventory_count FROM ns_product_counts nsc\n              WHERE nsc.sku = {$this->alias}.sku \n              AND nsc.ns_warehouse_id = {$this->alias}.ns_warehouse_id LIMIT 1";
     /**
      * Order count for policy
      */
     $this->virtualFields['order_count'] = "SELECT nli.order_count FROM ns_low_items nli \n              WHERE nli.sku = {$this->alias}.sku \n              AND nli.ns_warehouse_id = {$this->alias}.ns_warehouse_id LIMIT 1";
 }
예제 #2
0
 public function __construct($id = false, $table = null, $ds = null)
 {
     parent::__construct($id, $table, $ds);
     $this->virtualFields['ssn_unencrypted'] = "CAST(AES_DECRYPT({$this->alias}.ssn, '" . CONFIG_AES_KEY . "') AS CHAR(50))";
 }
예제 #3
0
 public function __construct($id = false, $table = null, $ds = null)
 {
     parent::__construct($id, $table, $ds);
     $this->virtualFields['largeimage'] = sprintf('CONCAT("https://graph.facebook.com/", %s.facebook_id, "/picture?type=large")', $this->alias);
 }