Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

заголовок таба дополнить 2-мя переменными


krashman
 Share

Recommended Posts

хочу сделать, чтобы в табе карточки товара выводился заголовок по такому принципу:

image.thumb.png.7af9fbdcf465fde5f6faaca8c2f741b4.png

 

сейчас просто "Описание", а надо "Описание BRAND MODEL"

Соответственно нужно куда-то дописать эти две переменные:

$product_info['manufacturer']

$product_info['model']

 

в файле catalog/controller/product.php есть такая строчка, отвечающая за вывод заголовка таба:

$this->data['tab_description'] = $this->language->get('tab_description');

 

но моих знаний не хватает, чтобы эту конструкцию правильно дополнить нужными переменными.

подскажите кто-нибудь?

Link to comment
Share on other sites


 

10 минут назад, fanatic сказал:

$this->data['tab_description'] = $this->language->get('tab_description').'-'. $product_info['manufacturer'].'-'. $product_info['model'];

 

спасибо большое!

то что надо :)

 

а если конструкция более сложная:

image.thumb.png.da190fb26efe16bff5edaf397260b557.png

 

у отзывов идёт подсчёт кол-ва.

получилось влепить только после всей коснтрукции "Отзывы (3)"

а надо бы вот так:

image.thumb.png.544876df296b7667e1070c09466c1929.png

 

в product.php конструкция такой вид имеет:

$this->data['tab_review'] = sprintf($this->language->get('tab_review'), $product_info['reviews']);

но что-то мне подсказывает , что надо в другом месте в файле править

Edited by krashman
Link to comment
Share on other sites


$this->data['tab_review'] = sprintf($this->language->get('tab_review'), $product_info['manufacturer'].' '. $product_info['model'], $product_info['reviews']);

файл локализации

$_['tab_review']        = 'Отзывы %s (%s)';

 

  • +1 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.