echo $this->customer->isLogged()."-".$this->customer->getId()."-".$this->customer->getFirstName()."-".$this->customer->getLastName(); exit;
if ($this->customer->isLogged()) {
$data['firstname'] = $this->customer->getFirstName();
$data['lastname'] = $this->customer->getLastName();
} else {
$data['firstname'] = '';
$data['lastname'] = '';
}
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Modification Default</name>
<code>default</code>
<version>1.1</version>
<author>OpenCart Ltd</author>
<link>http://www.opencart.com</link>
<file path="system/{engine,library}/{action,loader,config,language}*.php|system/library/template/template.php">
<operation>
<search regex="true">
<![CDATA[~(require|include)(_once)?\(([^)]+)~]]>
</search>
<add position="replace">
<![CDATA[$1$2(modification($3)]]>
</add>
</operation>
</file>
<file path="system/library/template/twig.php">
<operation>
<search>
<![CDATA[if (is_file($file)) {]]>
</search>
<add position="replace">
<![CDATA[if (defined('DIR_CATALOG') && is_file(DIR_MODIFICATION . 'admin/view/template/' . $filename . '.twig')) {
$code = file_get_contents(DIR_MODIFICATION . 'admin/view/template/' . $filename . '.twig');
} elseif (is_file(DIR_MODIFICATION . 'catalog/view/theme/' . $filename . '.twig')) {
$code = file_get_contents(DIR_MODIFICATION . 'catalog/view/theme/' . $filename . '.twig');
} elseif (is_file($file)) {]]>
</add>
</operation>
</file>
</modification>
console.log()
ничего не возвращает, поэтому в следующий then()
передаётся undefined .then(response => {
console.log(response);
return response;
})
или.then(response => (console.log(response), response))
var scrollPos = 0;
$(window).scroll(function(){
var st = $(this).scrollTop();
if (st > scrollPos){
$('#result').html('Вниз');
} else {
$('#result').html('Вверх');
}
scrollPos = st;
});
//Находим строку
if ($product_info) {
//Добавялем
$categories = $this->model_catalog_product->getCategories($product_id);
if($categories){
$categories_info = $this->model_catalog_category->getCategory($categories[0]['category_id']);
//Только зачем Вам новый запрос всех данных категории? category_id уже тут $categories[0]['category_id']
$data['category_id'] = $categories_info['category_id'];
//В op2
}