Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

Как вставить http-код в стандартный модуль "Текстовый блок - HTML"?


Recommended Posts

Извините, как вставить "код подписки на новости"?

Не ожидал подвоха от стандартного модуля "Текстовый блок - HTML".

 

Пробовал двумя способами.

Способ 1. Вставляю в режиме редактора "Исходный код", нажимаю "Сохранить". Изменения не сохраняются.

Способ 2. Вставляю в режиме редактора "Исходный код".

Перед сохранением возвращаюсь в обычный (визуальный) режим редактора.

В окне редактора вижу свою форму, она выглядит адекватно.

Жму сохранить - код после сохранения превращается в простой текст.

В итоге так и отображается на странице текстом, а не формой.

 

Хотел тупо отредактировать бд через phpmyadmin, но и тут засада.

Модуль хранит содержимое в таком виде {"name":"name","module_description":{"1":{"title":"title","description":"description"}},"status":"1"}

А мой код полон кавычек и двойных и одинарных.

Надіслати
Поділитися на інших сайтах


а сам код вставки показать?

а прям в файлы шаблона?

модуль Марка имеет редактор с php вставкой.. не знаю есть ли простой html модуль с поддержкой php..

Змінено користувачем AWARO
Надіслати
Поділитися на інших сайтах


. не знаю есть ли простой html модуль с поддержкой php..

http://www.opencart.com/index.php?route=extension/extension/info&extension_id=15439

  • +1 1
Надіслати
Поділитися на інших сайтах

У меня такое ощущение что где то список всех модулей затарен..

думаю у этого списка имя - поиск))

Надіслати
Поділитися на інших сайтах


AWARO

Вставляемый код - html.

Не PHP.

<!-- SmartResponder.ru subscribe form code (begin) -->
<link rel="stylesheet" href="https://imgs.smartresponder.ru/e1bbeb24091b44f1f4048bbc87edacd11278fd23/">
<script type="text/javascript" src="https://imgs.smartresponder.ru/52568378bec6f68117c48f2f786db466014ee5a0/"></script>
<script type="text/javascript">
    _sr(function() {
        _sr('form[name="SR_form_373503_41"]').find('div#sr-preload_').prop('id', 'sr-preload_373503_41');
        _sr('#sr-preload_373503_41').css({'width':parseInt(_sr('form[name="SR_form_373503_41"]').width() + 'px'), 'height':parseInt(_sr('form[name="SR_form_373503_41"]').height()) + 'px', 'line-height':parseInt(_sr('form[name="SR_form_373503_41"]').height()) + 'px'}).show();
        if(_sr('form[name="SR_form_373503_41"]').find('input[name="script_url_373503_41"]').length) {
            _sr.ajax({
                url: _sr('input[name="script_url_373503_41"]').val() + '/' + (typeof document.charset !== 'undefined' ? document.charset : document.characterSet),
                dataType: "script",
                success: function() {
                    _sr('#sr-preload_373503_41').hide();
                }
            });
        }
    });
</script>
<div id="outer_alignment" align="center">
    <form style="width: 266px; border: 1px solid rgb(200, 200, 200); margin-left: ; border-radius: 6px;" class="sr-box" method="post" action="https://smartresponder.ru/subscribe.html" name="SR_form_373503_41">
        <input name="field_name" class="sr-name" type="text">
        <div id="sr-preload_" style="display: none; background-color: #f6f6f6; opacity: 0.5; position: absolute; z-index: 100; text-align: center; font: bold 15px Arial;">Загрузка...</div>
        <ul class="sr-box-list"><li class="sr-373503_41" style="text-align: center; background-color: rgb(248, 249, 250); border: 0px none; border-radius: 6px 6px 0px 0px; height: auto; padding: 3px 0px 20px;"><label style="font-family: arial; color: rgb(0, 0, 0); font-size: 16px; font-weight: bold; background: transparent url('https://imgs.smartresponder.ru/on/482611c44d8af61664781139351780e8d8057ab3/') repeat-x scroll center bottom; width: 100%; text-align: center; box-sizing: border-box; border-radius: 6px 6px 0px 0px; line-height: 25px; height: auto; padding: 15px 25px;" class="">Подписка на новости</label><input style="font-family: Arial; color: rgb(0, 0, 0); font-size: 12px; font-style: normal; font-weight: normal; background-color: rgb(255, 255, 255); border: medium none; box-shadow: none;" value="" name="element_header" type="hidden"></li><li class="sr-373503_41" style="text-align: center; background-color: rgb(248, 249, 250); border-radius: 0px; height: 45px;"><label class="remove_labels" style="font-weight: normal; font-family: arial; color: rgb(0, 0, 0); font-size: 12px; font-style: normal; display: none;"></label><input value="Вашe имя" style="background-image: none; font-weight: normal; font-family: arial; color: rgb(133, 133, 133); font-size: 12px; font-style: normal; border: 1px solid rgb(197, 200, 204); background-color: rgb(231, 233, 236); border-radius: 6px; height: 42px; box-shadow: none; margin-top: 0px;" name="field_name_first" type="text"></li><li class="sr-373503_41" style="text-align: center; background-color: rgb(248, 249, 250); border-radius: 0px; height: 45px;">
<label class="remove_labels" style="font-weight: normal; font-family: arial; color: rgb(0, 0, 0); font-size: 12px; font-style: normal; display: none;"></label>
<input value="Ваш email-адрес" style="background-image: none; font-weight: normal; font-family: arial; color: rgb(133, 133, 133); font-size: 12px; font-style: normal; border: 1px solid rgb(197, 200, 204); background-color: rgb(231, 233, 236); border-radius: 6px; height: 42px; box-shadow: none; margin-top: 0px;" name="field_email" class="sr-required" type="text">
            </li><li class="sr-373503_41" style="text-align: center; background-color: rgb(248, 249, 250); border-radius: 0px 0px 6px 6px; border: 0px none; height: 78px;"><table id="elem_table_subscribe" style="display: inline-table; border-collapse: separate; width: 100%; margin-top: 15px;" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="background: transparent url('https://imgs.smartresponder.ru/on/21dd34de2fd75b1d67ee9a20558b25fbfcecea9b/') no-repeat scroll left center; width: 3px; height: 47px;" id="elem_left_subscribe" valign="middle"></td><td id="elem_container_subscribe" style="vertical-align: middle;"><input style="font-family: arial; color: rgb(255, 255, 255); font-size: 14px; font-weight: bold; border: 0px solid rgb(240, 240, 240); background: transparent url('https://imgs.smartresponder.ru/on/ec2b88aa04cd89174c70c5ef0759ed2d8c789eb9/') repeat scroll left center; height: 47px; width: 100%; margin: 0px; padding: 0px 12px; box-shadow: none;" name="subscribe" value="Подписаться" type="submit"></td><td style="background: transparent url('https://imgs.smartresponder.ru/on/5fa484f95b91aa5108a77f31183744f7577d6d6c/') no-repeat scroll left center; width: 3px; height: 47px;" id="elem_right_subscribe"></td></tr></tbody></table></li></ul>
        <input name="uid" value="796375" type="hidden">
    <input name="did[]" value="965863" type="hidden"><input name="tid" value="0" type="hidden"><input name="lang" value="ru" type="hidden"><input value="https://imgs.smartresponder.ru/on/d8b7d3c30154aa37cd66ebf6ee03cc303300905f/373503_41" name="script_url_373503_41" type="hidden"></form>
</div>
<!-- SmartResponder.ru subscribe form code (end) -->
Змінено користувачем mak2
Надіслати
Поділитися на інших сайтах


  • 1 year later...

Наткнулся на похожу проблему, в OpenCart 3, в "Текстовый блок - HTML" вставлял форму через режим редактора, ничего не сохранялось, переключился в визуальный режим после вставки кода, при сохранении стало отчищаться поле "Название модуля", потому что в моей форме поле тоже называлось "name", переименовал и норм сохранилось, вот только тег form затерается

Змінено користувачем TrywaR
  • +1 1
Надіслати
Поділитися на інших сайтах


  • 3 years later...
В 29.01.2018 в 13:05, TrywaR сказал:

Наткнулся на похожу проблему, в OpenCart 3, в "Текстовый блок - HTML" вставлял форму через режим редактора, ничего не сохранялось, переключился в визуальный режим после вставки кода, при сохранении стало отчищаться поле "Название модуля", потому что в моей форме поле тоже называлось "name", переименовал и норм сохранилось, вот только тег form затерается

Спасибо огромное, казалось бы, такая элементарная вещь, а столько проблем создавала )))

Надіслати
Поділитися на інших сайтах


Створіть аккаунт або увійдіть для коментування

Ви повинні бути користувачем, щоб залишити коментар

Створити обліковий запис

Зареєструйтеся для отримання облікового запису. Це просто!

Зареєструвати аккаунт

Вхід

Уже зареєстровані? Увійдіть тут.

Вхід зараз
  • Зараз на сторінці   0 користувачів

    • Ні користувачів, які переглядиють цю сторінку

×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.