application/modules/mod_discount/models/discount_model_admin.php 1 location
|
@@ 297-312 (lines=16) @@
|
| 294 |
|
* @param integer $id |
| 295 |
|
* @return string|boolean |
| 296 |
|
*/ |
| 297 |
|
public function getProductById($id) { |
| 298 |
|
$locale = MY_Controller::getCurrentLocale(); |
| 299 |
|
$query = $this->db |
| 300 |
|
->select('name') |
| 301 |
|
->from('shop_products_i18n') |
| 302 |
|
->where('id', $id) |
| 303 |
|
->where('locale', $locale) |
| 304 |
|
->get() |
| 305 |
|
->row_array(); |
| 306 |
|
|
| 307 |
|
if ($query) { |
| 308 |
|
return $query['name']; |
| 309 |
|
} |
| 310 |
|
|
| 311 |
|
return false; |
| 312 |
|
} |
| 313 |
|
|
| 314 |
|
/** |
| 315 |
|
* Delete discount by id |
application/modules/cmsemail/models/cmsemail_model.php 1 location
|
@@ 219-230 (lines=12) @@
|
| 216 |
|
* @param string $pattern_name |
| 217 |
|
* @return string |
| 218 |
|
*/ |
| 219 |
|
public function getPaternSettings($pattern_name) { |
| 220 |
|
$locale = \MY_Controller::getCurrentLocale(); |
| 221 |
|
$query = $this->db->select('*, mod_email_paterns.id as id') |
| 222 |
|
->join('mod_email_paterns_i18n', "mod_email_paterns_i18n.id = mod_email_paterns.id and mod_email_paterns_i18n.locale = '$locale'", 'left') |
| 223 |
|
->where('mod_email_paterns.name', $pattern_name)->get('mod_email_paterns'); |
| 224 |
|
|
| 225 |
|
if ($query) { |
| 226 |
|
return $query->row_array(); |
| 227 |
|
} else { |
| 228 |
|
return ''; |
| 229 |
|
} |
| 230 |
|
} |
| 231 |
|
|
| 232 |
|
/** |
| 233 |
|
* @param int $id |
application/modules/mod_seo/models/seoexpert_model.php 1 location
|
@@ 81-93 (lines=13) @@
|
| 78 |
|
* @param bool|string $locale |
| 79 |
|
* @return bool|int |
| 80 |
|
*/ |
| 81 |
|
public function getLangIdByLocale($locale = false) { |
| 82 |
|
|
| 83 |
|
if (!$locale) { |
| 84 |
|
$locale = \MY_Controller::getCurrentLocale(); |
| 85 |
|
} |
| 86 |
|
|
| 87 |
|
$res = $this->db->select('id')->where('identif', $locale)->get('languages')->row_array(); |
| 88 |
|
if ($res) { |
| 89 |
|
return $res['id']; |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
return false; |
| 93 |
|
} |
| 94 |
|
|
| 95 |
|
/** |
| 96 |
|
* Get module settings |