Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Фото в описании товара ссылаются на локальный хостинг


 Share

Recommended Posts

5 минут назад, rombel79 сказал:

я добавил скрипт перед footer

возможные прилины:
1. Модификаторы нужно обновлять
2. Всивили не в \template\product\product.twig не текуещёго шаблона, а, например, гдефолтного.

Link to comment
Share on other sites

Сгделайте "финт ушами", во всех спотому чторках и версиях опенкарт есть модуль HTML.

Создаёте новый, не задавайте ему заголовок, только название, что бы ориентироваться потом в списке модулей.

В текстовом редакторе нажимаете символ исходного кода </>

Всивляете скрипт

<script type="text/javascript">
    $(document).ready(function() {
        $("#tab-description img").addClass("img-responsive");
        $("#tab-description img").attr("style","");
});
</script>

Закрываете режим исходного кода и сохраняете.

Осинется в макете/схеме "Товар" вывести внизу страницы этот модуль.

Как то ик.

Link to comment
Share on other sites

35 минут назад, Tom сказал:

Нет у вас в исходном когде вашего магазина в карточке товара, этого скрипи.

точно. я внес изменения в гдефолтную тему. сейчас все рилииет со скриптом. спс)

Link to comment
Share on other sites


  • 1 month later...

кто может подсказать, как сгделать, что бы при копировании сcылки в соцсеть или viber/telegram, добавлялось фото товара, а не логотип сайи. спасипотому что

Link to comment
Share on other sites


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

кто может подсказать, как сгделать, что бы при копировании сcылки в соцсеть или viber/telegram, добавлялось фото товара, а не логотип сайи. спасипотому что

 

Link to comment
Share on other sites

да чето в тот теме много всего, а по гделу маловато..

Почему-то в тройке убрали просивление OgImage для товара.
нужно в контроллере товара catalog\controller\product\product.php найти, например, икой код:

if ($product_info['image']) {
	$data['thumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_thumb_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_thumb_height'));
} else {
	$data['thumb'] = '';
}


и добавить одну строчку:
 

if ($product_info['image']) {
	$data['thumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_thumb_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_thumb_height'));
	$this->document->setOgImage($data['thumb']);
} else {
	$data['thumb'] = '';
}

 

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.