• Good day! How can I add a code (table) to all product pages and new product pages?
    <table>
    <tbody>
    <tr>
    <td>Тип размещения.</td>
    </tr>
    </tbody>
    </table>

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 23 total)
  • Stef

    (@serafinnyc)

    Simply add your table to either long description field or short description field. However, if the theme you are using is responsive your going to want to make sure you add responsive table code.

    Thread Starter Сергей

    (@derevnya)

    If I add a new product, this code was already on the product page! The code must be on the new product pages. How can I do it?

    Stef

    (@serafinnyc)

    are you wrapping it with open and closing tags?

    <pre><code>
    <table>
       <tbody><tr>
          <td>Тип размещения.</td>
       </tbody></tr>
    </table>
    </code></pre>

    By the way your table is incorrectly formatted. I fixed it here. Switch around your closing TR tag.

    Thread Starter Сергей

    (@derevnya)

    Where should I add this code? Adding a new product, the table (code) was automatically added to the product page!

    Stef

    (@serafinnyc)

    Sorry, but what you’re saying doesn’t make any sense to me. Where do you want it to appear? Send me a screenshot with an arrow of where you want it to appear on the product page.

    Thread Starter Сергей

    (@derevnya)

    When adding a new product, the table should be automatically added.

    Stef

    (@serafinnyc)

    I got that part already. But where? Where on the page? And is that field going to change at all?

    • This reply was modified 7 years ago by Stef.
    Thread Starter Сергей

    (@derevnya)

    In the field of a long description.

    Thread Starter Сергей

    (@derevnya)

    This is an addition!

    Stef

    (@serafinnyc)

    The only way I know how to get inside that div is to override the description.php file or you can hook in with this just before the tabs.

    add_action( 'woocommerce_after_single_product_summary' , 'ssd_add_below_prod_gallery', 5 );
     
    function ssd_add_below_prod_gallery() {
       echo '<table><tbody><tr><td>Тип размещения.</td></tbody></tr></table></code></pre>';
    }

    Not sure why you want a Table it’s not needed if this is all your adding but if you’re going to add more to the table then I get it.

    You may need to add CSS depending on your theme.

    Thread Starter Сергей

    (@derevnya)

    I will be able to point on different pages, different text of the goods. Will the text be saved? This code will not be lost when updating the topic?

    Thread Starter Сергей

    (@derevnya)

    This is the whole table!

    <table>
    <tbody>
    <tr>
    <td>Тип размещения</td>
    <td style=”text-align: center;”>Люкс с видом на море</td>
    <td style=”text-align: center;”>Семейный люкс</td>
    <td style=”text-align: center;”>Делюкс с собственной террасой</td>
    <td style=”text-align: center;”>Двухместный номер с двумя раздельными кроватями (с балконом)</td>
    <td></td>
    </tr>
    <tr>
    <td>Цена – сутки/месяц</td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td>Площадь номера</td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td>Особенность номера</td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td>Скидки</td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td></td>
    <td style=”text-align: center;”><span style=”color: #008000;”>ЗАБРОНИРОВАТЬ</span></td>
    <td style=”text-align: center;”><span style=”color: #008000;”>ЗАБРОНИРОВАТЬ</span></td>
    <td style=”text-align: center;”><span style=”color: #008000;”>ЗАБРОНИРОВАТЬ</span></td>
    <td style=”text-align: center;”><span style=”color: #008000;”>ЗАБРОНИРОВАТЬ</span></td>
    <td></td>
    </tr>
    <tr>
    <td>В номерах</td>
    <td colspan=”4″></td>
    </tr>
    <tr>
    <td>Ванная комната</td>
    <td colspan=”4″></td>
    </tr>
    <tr>
    <td>Питание</td>
    <td colspan=”4″></td>
    </tr>
    <tr>
    <td>Кухня</td>
    <td colspan=”4″></td>
    </tr>
    <tr>
    <td>Удобства в номере</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Детская кровать, дополнительное спальное место</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Кондиционер</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Вид из окна</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Стиральная машина/прачечная</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Услуги по уборке</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Парковка</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Интернет</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Баня/сауна</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Бассейн</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Балкон</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Парковка</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Предоплата</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Отмена бронирования</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Врач/Аптека</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Площадка для отдыха</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Площадка для барбекю/мангала/летняя кухня</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Спорт</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Трансфер</td>
    <td></td>
    </tr>
    <tr>
    <td>Достопримечательности/Экскурсии</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>Для гостей с ограниченными возможностями</td>
    <td colspan=”3″></td>
    </tr>
    <tr>
    <td>С Домашними животными</td>
    <td colspan=”3″></td>
    </tr>
    </tbody>
    </table>

    Stef

    (@serafinnyc)

    I have no idea why you’re doing this. You are better off hiring a developer to assist you. This is beyond forum support now. This is what I asked you up above but you didn’t answer. No you will not be able to add different text to this.

    You are better off creating and using custom fields or a plugin called Advanced Custom Fields.

    Thread Starter Сергей

    (@derevnya)

    Thanks for the support!

    Thread Starter Сергей

    (@derevnya)

    Can I add table code to additional styles? I want to add to the product page, In the area of ​​a long description.

    body {
    margin: 0;
    background: #F4F1F8;
    }
    table {
    border-collapse: collapse;
    line-height: 1.1;
    font-family: “Lucida Sans Unicode”, “Lucida Grande”, sans-serif;
    background: radial-gradient(farthest-corner at 50% 50%, white, #DCECF8);
    color: #0C213B;
    }
    caption {
    font-family: annabelle, cursive;
    font-weight: bold;
    font-size: 2em;
    padding: 10px;
    color: #F3CD26;
    text-shadow: 1px 1px 0 rgba(0,0,0,.3);
    }
    caption:before, caption:after {
    content: “\274B”;
    color: #A9E2CC;
    margin: 0 10px;
    }
    th {
    padding: 10px;
    border: 1px solid #A9E2CC;
    }
    td {
    font-size: 0.8em;
    padding: 5px 7px;
    border: 1px solid #A9E2CC;
    }
    .first {
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    }

Viewing 15 replies - 1 through 15 (of 23 total)

The topic ‘table’ is closed to new replies.