Автор Тема: В каком файле можно изменить дизайн шаблона?  (Прочитано 20391 раз)

Игорь

  • Гость
Здравствуйте, помогите разобраться где и что ковырять (какой файл). что бы немного изменить дизайн магазина, который уже залил? Изменить пока хочу только шапку (поставить свою) и убрать кое-что лишнее.

Оффлайн anna-svit

  • Пользователь
  • **
  • Сообщений: 70
    • Просмотр профиля
Re: В каком файле можно изменить дизайн шаблона?
« Ответ #1 : Ноября 03, 2011, 03:59:40 pm »
Подскажите, пожалуйста, как можно полностью изменить дизайн для страницы с подробным описанием товара.
У меня Shop-Script «Lego Edition SP 4.6».
Нужно, чтобы на главной странице были: шапка сайта, главное горизонтальное меню, левая, правая колонка, футер. А на странице с подробным описанием товара должны быть: шапка сайта, главное горизонтальное меню, описание товара на всю страницу и футер (без левой и правой колонки).

Оффлайн anna-svit

  • Пользователь
  • **
  • Сообщений: 70
    • Просмотр профиля
Re: В каком файле можно изменить дизайн шаблона?
« Ответ #2 : Ноября 05, 2011, 02:55:43 pm »
Цитировать
Вам нужен фаил index.tpl.html
и условие
{if $main_content_template='product_detailed.tpl.html'}
сюда левое и правые дивы
{/if}
А куда именно вставлять и вместо чего?
В эту часть?:
 <!-- Start of content -->
        {include file="$main_content_template"}{if $main_content_template='product_detailed.tpl.html'}{/if}
      <!-- eof main content  -->
В таком случае страничка product_detailed.tpl.html отчасти правильно отображается, т.е. сначала идёт обычная структура, как на главной странице, а прокрутив ниже страницу мы видим другую структуру (без левой и правой колонки).
Помогите, пожалуйста!

Оффлайн anna-svit

  • Пользователь
  • **
  • Сообщений: 70
    • Просмотр профиля
Re: В каком файле можно изменить дизайн шаблона?
« Ответ #3 : Ноября 05, 2011, 08:34:31 pm »
Цитировать
:-\ ну для начало вы должны знать html если вы его не знаете то лучьше обратиться к спецам чтоб сделали за вознагрождение
вроде знаю html, а с SSF LE разобраться трудно.
Всё-таки куда в файле index.tpl.html вставить {if $main_content_template='product_detailed.tpl.html'}
сюда левое и правые дивы
{/if}
?
Вот мой код:
[spoiler]<?xml version="1.0" encoding="{$smarty.const.DEFAULT_CHARSET}"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" >

{include file="head.tpl.html"}
{include file="style.tpl.html"}

<script type="text/javascript">
var imagesarr = new Array( "pic0.png", "pic1.jpg", "pic2.jpg", "pic3.jpg");
</script>

<body background="1.jpg">

<!--[if lte IE 6]><div id="badie" class="top_err">Вами используется устаревшая версия <b>Internet Explorer.</b> Рекомендуем вам обновить ваш браузер или воспользоваться одним из современных. <a class="close" href="#"   onclick="document.getElementById('badie').style.visibility='hidden';">Скрыть</a></div><![endif]-->




<div id="container">


  <div id="header">





    <div align="right" class="div1">
<script language="JavaScript">
var los = Math.floor(Math.random() * imagesarr.length)
document.write ("<IMG SRC='"+imagesarr[los]+"'>");
</script>

<div align="center" class="div2"><a href="./"><img src="./css/css_{$smarty.const.CONF_COLOR_SCHEME}/image/logo0000.png" title="{$page_title|default:"Shop-Script FREE shopping cart solution"}" alt="{$page_title|default:"Shop-Script FREE shopping cart solution"}" /></a></div>
     
</div>
      <div class="div4">
      <div class="div5">
     <a href="./">{$smarty.const.LINK_TO_HOMEPAGE}</a>
     <a href="./{if $smarty.const.CONF_CHPU}about/{else}index.php?aux_page=aux1{/if}">{$smarty.const.ADMIN_ABOUT_PAGE}</a>
     {if $smarty.const.CONF_NEWS_ONHOME eq 0}<a href="./{if $smarty.const.CONF_CHPU}{$smarty.const.REDIRECT_NEWS}/{else}index.php?news&news={/if}">{$smarty.const.ADMIN_NEWS}</a>{/if}
          {if $smarty.const.CONF_PAGES_ONHOME eq 0}<a href="./{if $smarty.const.CONF_CHPU}{$smarty.const.REDIRECT_PAGES}/{else}index.php?pages&pages={/if}">{$smarty.const.ADMIN_PAGES}</a>{/if}
          <a href="./{if $smarty.const.CONF_CHPU}pricelist/{else}index.php?show_price=yes{/if}">{$smarty.const.STRING_PRICELIST}</a>
     <a href="./{if $smarty.const.CONF_CHPU}contact/{else}index.php?contact{/if}">{$smarty.const.STRING_CONTACT_INFORMATION}</a>
      </div>
     
    </div>
  </div>
 

<div id="begun">
 {if $smarty.const.CONF_NEWS_ONHOME eq 1 && $home_news_list}
      <marquee behavior="scroll" direction="left" scrolldelay="250" bgcolor="#eadcc0">
      <a href="./{$home_news_list[6]}">{section name=i loop=$home_news_list}
   <p style="padding-left: 10px;">
   <span style="font-size: 10px; color: #999;">[{$home_news_list[2]}]</span><br />
   {$home_news_list[1]}</a>
   
   {/section}</marquee>
   <center><a href="./{if $smarty.const.CONF_CHPU}{$smarty.const.REDIRECT_NEWS}/{else}index.php?news{/if}">{$smarty.const.ADMIN_NEWS_ALL}</a></center>
      {/if}
</div>

  <div id="column_left">
<div id="module_search">
     <form action="index.php" method="get">
       <input type="text" name="searchstring" id="mod_search_searchword" value="{if $searchstring ne ""}{$searchstring|replace:'"':'&quot;'|replace:"\'":"'"|default:""}{else}{$smarty.const.STRING_SEARCH}{/if}" onblur="if(this.value=='') this.value='search...';" onfocus="if(this.value=='{$smarty.const.STRING_SEARCH}') this.value='';" onclick="this.value = ''" />
       <a onclick="moduleSearch();" class="button"><span>{$smarty.const.STRING_GO_SEARCH}</span></a>
     </form>
          <p><a href="./search_expanded/">{$smarty.const.ADVANCED_SEARCH_LINK}</a>
        </div>

      <div class="box">
        <div class="top"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$smarty.const.ADMIN_CATEGORY_TITLE}</div>
        <div class="top_l"></div>
        <div id="category" class="middle">
     {include file="category_tree.tpl.html"}
        </div>
        <div class="bottom">&nbsp;</div>
      </div>
      <!-- brands -->
      {if $brand_list}
      <div id="brends" class="box">
   <div class="top"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$smarty.const.STRING_MANUFACTURER}</div>
   <div class="middle" style="text-align: center;">
     <select name="brand" onchange="location=this.value" style="width: 160px;">
       <option value=""> --- Не выбрано --- </option>
       {section name=i loop=$brand_list}
       <option value="http://{$smarty.const.CONF_SHOP_URL}/{$brand_list[2]}" {if $brand_list[0] === $selected_brand[0]}selected="selected"{/if}>{$brand_list[1]}</option>
       {/section}
     </select>
   </div>
   <div class="bottom">&nbsp;</div>
      </div>
      {/if}
      <!-- eof brands -->

      <!-- Tags -->
      <div class="box" id="tags_box">
   <div class="top"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$smarty.const.ADMIN_TAGS_NAME}</div>
   <div class="middle" style="text-align: center;">
     <div id="{if CONF_TAG_VIEW_SW}tag{else}texttag{/if}">
       {$tagcloud}
     </div>
   </div>
   <div class="bottom">&nbsp;</div>
      </div>
      <!-- eof: Tags -->

      {if $smarty.const.CONF_ONLINE_ON eq 1}
      <div class="box">
   <div class="top"><img src="./images/online.png" alt="{$smarty.const.STRING_ONLINE}" />{$smarty.const.STRING_ONLINE}</div>
   <div id="online" class="middle">
     {include file="online.tpl.html"}
   </div>
   <div class="bottom">&nbsp;</div>
      </div>
      {/if}

      <div class="box">
   <div class="top"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$smarty.const.ADMIN_INFORMATION}</div>
   <div id="information" class="middle">
     <ul>
       <li><a href="./{if $smarty.const.CONF_CHPU}about/{else}index.php?aux_page=aux1{/if}">{$smarty.const.ADMIN_ABOUT_PAGE}</a></li>
       <li><a href="./{if $smarty.const.CONF_CHPU}grafik/{else}index.php?aux_page=aux1{/if}">{$smarty.const.ADMIN_TIMES}</a></li>
       <li><a href="./{if $smarty.const.CONF_CHPU}contact/{else}index.php?contact{/if}">{$smarty.const.STRING_CONTACT_INFORMATION}</a></li>
       <li><a href="./{if $smarty.const.CONF_CHPU}adress/{else}index.php?aux_page=aux1{/if}">{$smarty.const.STRING_ADRESS_INFORMATION}</a></li>
       <li><a href="./{if $smarty.const.CONF_CHPU}service/{else}index.php?aux_page=aux1{/if}">{$smarty.const.ADMIN_SHIPPING_PAGE}</a></li>
       <li><a href="./{if $smarty.const.CONF_CHPU}sitemap/{else}index.php?sitemap{/if}">{$smarty.const.ADMIN_SITE_MAP}</a></li>
       <li><a href="./{if $smarty.const.CONF_CHPU}price.xls{else}core/core_xls.php{/if}">Скачать прайс в формате MS Excel</a></li>
     </ul>
   </div>
   <div class="bottom">&nbsp;</div>
      </div>
    </div>
 
  <div id="column_right">
   

    {if $smarty.const.CONF_GOOGLE_TR eq 1}
    <div id="google_translate_element" style="height: 40px; width: auto; text-align: center; margin-bottom: 20px;">
      <script  type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
    </div>
    {/if}

    {if $smarty.const.CONF_NEWS_ONHOME eq 1 && $home_news_list}
    <div id="module_news" class="box">
      <div class="top"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$smarty.const.ADMIN_NEWS}</div>
      <div class="middle">
   {section name=i loop=$home_news_list}
   <p style="padding-left: 10px;">
   <span style="font-size: 10px; color: #999;">[{$home_news_list[2]}]</span><br />
   {$home_news_list[1]}<br /></marquee>
   <a href="./{$home_news_list[6]}">{$smarty.const.ADMIN_NEWS_READ}</a>
   </p>
   <hr />
   {/section}
   <center><a href="./{if $smarty.const.CONF_CHPU}{$smarty.const.REDIRECT_NEWS}/{else}index.php?news{/if}">{$smarty.const.ADMIN_NEWS_ALL}</a></center>
      </div>
      <div class="bottom">&nbsp;</div>
    </div>
    {/if}

 

 {if $smarty.const.CONF_PAGES_ONHOME eq 1 && $home_pages_list}
    <div id="module_pages" class="box">
      <div class="top"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$smarty.const.ADMIN_PAGES}</div>
      <div class="middle">
   {section name=i loop=$home_pages_list}
   <p style="padding-left: 10px;">
   <span style="font-size: 10px; color: #999;">[{$home_pages_list[2]}]</span><br />
   {$home_pages_list[1]}<br />
   <a href="./{$home_pages_list[6]}">{$smarty.const.ADMIN_NEWS_READ}</a>
   </p>
   <hr />
   {/section}
   <center><a href="./{$smarty.const.REDIRECT_PAGES}/">{$smarty.const.ADMIN_PAGE_ALL}</a></center>
      </div>
      <div class="bottom">&nbsp;</div>
    </div>
    {/if}

    <!-- Start of hits -->
    {if $hits_to_show}
    <div class="box">
      <div class="top"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$smarty.const.PRODUCTS_BEST_CHOISE}</div>
        <div class="middle">
     {include file="hits.tpl.html"}
        </div>
      <div class="bottom">&nbsp;</div>
    </div>
    {/if}
    <!-- eof hits -->

    <!-- votes -->
    {if $smarty.const.CONF_VOTES_ON == 1 && ($vote_is || $vote_res)}
    <div id="votes" class="box">
      <div class="top"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$smarty.const.STRING_VOTE}</div>
      <div class="middle">
        <div id="votes_info" style="text-align: center;">
   {*<form method="post" action="index.php" id="votesform">
     <table style="width: 100%" cellspacing="0" cellpadding="5px">
       <tr style="text-align: left">
         <td>
      <b>{$vote_is[0][1]}{$vote_res[0][1]}</b>
      <input type="hidden" name="vote_send" value="{$vote_is[0][0]}" />
         </td>
       </tr>
            {if $vote_res}
              {section name=i loop=$vote_res}
         <tr style="text-align: left">
      <td><div style="background: #{$smarty.const.CONF_VOTE_COLOR}; white-space: nowrap; height: 15px; margin: 2px; text-align: left; width: {$vote_res[6]*160/100+10|string_format:"%d"}px">{$vote_res[4]}&nbsp;&nbsp;&nbsp;{$vote_res[6]}%</div></td>
         </tr>
         {/section}
       {else}
       {section name=i loop=$vote_is}
       <tr style="text-align: left">
         <td><input type="radio" name="vote" value="{$vote_is[3]}" />&nbsp;&nbsp;&nbsp;{$vote_is[4]}</td>
       </tr>
       {/section}
       <tr style="text-align: left">
         <td style="text-align: center">
      <a onclick="$('#votesform').submit();" class="button"><span>{$smarty.const.ADMIN_VOTES_SEND}</span></a>
         </td>
       </tr>
       {/if}
     </table>
   </form>*}
         <h3>{$vote_is[0][1]}{$vote_res[0][1]}</h3>
        {include file="votes.tpl.html"}
   </div>
      </div>
      <div class="bottom">&nbsp;</div>
    </div>
    {/if}
    <!-- eof votes -->
  </div>
 
   <div id="content"><div id="breadcrumb">
    <a href="">{$smarty.const.LINK_TO_HOMEPAGE}</a>
    {section name=i loop=$product_category_path}
    &gt; <a href="./{$product_category_path[0]}">{$product_category_path[1]}</a>
    {/section}
    </div>
       <div class="left"></div>
       <div class="right"></div> 

   
      <!-- Start of content -->
        {include file="$main_content_template"}
      <!-- eof main content  -->
        <div class="bottom_left"></div>
        <div class="bottom_right"></div>
        <div class="bottom_center"></div>
    </div>


  <div id="footer">
    <div class="div1">
   {$live_counts}&nbsp;
   <a href="feed.xml" rel="nofollow"><img src="./images/rss.png" alt="RSS экспорт новых товаров" style="width: 31px; height: 31px" /></a>&nbsp;
   <a href="http://validator.w3.org/check?uri=referer" rel="nofollow"><img src="./images/w3c.png" alt="w3c valid" style="width: 31px; height: 31px" /></a>
    </div>
    <div class="div2">Powered By <a href="http://forum.webasyst.ru/viewtopic.php?id=7757">Shop-Script</a><br /> Lego Edition SP &copy; 2010</div>
  </div>
</div>

</body>
</html>[/spoiler]
« Последнее редактирование: Ноября 05, 2011, 09:22:54 pm от pehser »

Оффлайн anna-svit

  • Пользователь
  • **
  • Сообщений: 70
    • Просмотр профиля
Re: В каком файле можно изменить дизайн шаблона?
« Ответ #4 : Ноября 05, 2011, 09:58:23 pm »
а тк вам надо под условие левый и правый див загнать
Если в файле index.tpl.html условие ставлю так:
{if $main_content_template='product_detailed.tpl.html'}
  <div id="column_left">...</div>
  <div id="column_right">...</div>
{/if}
перед:
<div id="content"></div>, то остается всё, кроме контента.
Я не туда ставлю условие?
     

Оффлайн anna-svit

  • Пользователь
  • **
  • Сообщений: 70
    • Просмотр профиля
Re: В каком файле можно изменить дизайн шаблона?
« Ответ #5 : Ноября 05, 2011, 10:12:32 pm »
СПАСИБО ОГРОМНОЕ!!! Получилось!

Оффлайн anna-svit

  • Пользователь
  • **
  • Сообщений: 70
    • Просмотр профиля
Re: В каком файле можно изменить дизайн шаблона?
« Ответ #6 : Ноября 05, 2011, 10:20:47 pm »
не правильно усвловие
надо так
{if $main_content_template!='product_detailed.tpl.html'}
Может еще подскажите, как сделать контент, т.е. часть с описанием товара, в файле product_detailed.tpl.html пошире (или на всю страницу).
Буду очень благодарна!
« Последнее редактирование: Ноября 05, 2011, 10:43:27 pm от anna-svit »

searchingman

  • Гость
Re: В каком файле можно изменить дизайн шаблона?
« Ответ #7 : Ноября 05, 2011, 10:51:47 pm »
anna-svit, смотрите .page в stylesheet.css

Оффлайн anna-svit

  • Пользователь
  • **
  • Сообщений: 70
    • Просмотр профиля
Re: В каком файле можно изменить дизайн шаблона?
« Ответ #8 : Ноября 05, 2011, 10:57:55 pm »
anna-svit, смотрите .page в stylesheet.css
Спасибо огромное! Помогло!

hellen_89

  • Гость
Re: В каком файле можно изменить дизайн шаблона?
« Ответ #9 : Января 29, 2012, 07:39:16 pm »
в версии 5.02 в файле head.tpl увидела строки для
Цитировать
<!--[if lt IE 7]>
  <link rel="stylesheet" type="text/css" href="./css/css_{$smarty.const.CONF_COLOR_SCHEME}/stylesheet/ie6.css" />
  <![endif]-->

а самого файла ie6.css нет. и в 4.6 версии нет.
может у кого остался такой файлик со старых версий, хотябы посмотреть принип кроссбраузерности, ато под ie совсем кривой сайт..

Оффлайн Юрий

  • Старожил
  • ****
  • Сообщений: 322
    • Просмотр профиля
    • Во-Сток
Re: В каком файле можно изменить дизайн шаблона?
« Ответ #10 : Января 29, 2012, 07:46:23 pm »
там вообще должно быть по идее
Цитировать
<!--[if lt IE 6]>
  <link rel="stylesheet" type="text/css" href="./css/css_{$smarty.const.CONF_COLOR_SCHEME}/stylesheet/ie6.css" />
<![endif]-->

Вроде тут присутствует все что нужно http://forum.shop-script.org/index.php?topic=2.msg2#msg2

hellen_89

  • Гость
Re: В каком файле можно изменить дизайн шаблона?
« Ответ #11 : Января 29, 2012, 09:28:00 pm »
там вообще должно быть по идее
Вроде тут присутствует все что нужно http://forum.shop-script.org/index.php?topic=2.msg2#msg2
спасибо большое, буду пробовать.
и вроде запись <!--[if lt IE 7]> - верная, т.к. lt - значит less than, легко перепутать с it

тут можно прочитать про условные комментарии к для старых версий ie
Оченб познавательно написано.
http://kobzarev.com/makeup/getting-rid-of-css-hacks-in-internet-explorer.html

Еще на торрентах скачала видеоуроки от компании "Специалист" Кроссбраузерная верстка. Очень много нового для себя узнаю..
http://rutracker.org/forum/viewtopic.php?t=3846360

MikeS

  • Гость
Re: В каком файле можно изменить дизайн шаблона?
« Ответ #12 : Февраля 08, 2012, 10:46:52 am »
Не могу найти, где задается цвет выпадающих списков, как-то: производитель, выбор доп.характкристки, например цвета. Плюс все заполняемые пользователями формы: отзыв, авторизация, поиск...
Решил все сделать в стиле черного минимализма, но белые формы бьют по глазам))
Сборка 5.0.2, пока на Денвере.

MikeS

  • Гость
Re: В каком файле можно изменить дизайн шаблона?
« Ответ #13 : Февраля 08, 2012, 12:10:25 pm »
А их никто не задовал они дефолтно белые если вам нужен другой цвет то css в руки и описывайте стили для нужных вам элементов

Это я уже понял - а есть где-нибудь описание кто-есть кто, а то я правлю stylesheet.css вслепую, т.е. меняю какой-либо параметр, например цвет заливки или ширину бОрдера, просто чтобы посмотреть какой элемент описывается в том блоке, который меняю. Попутно расставляю камменты, чтобы впоследствии не забыть что-где.

Например "выпадающий список"-"Производитель", заполняемые поля "Поиск" и "авторизация".
Подскажите, а остальные я сам по аналогии подкручу.

MikeS

  • Гость
Re: В каком файле можно изменить дизайн шаблона?
« Ответ #14 : Февраля 08, 2012, 12:35:53 pm »
Спасибо, будем разбираться...
...
хорошее начало - в мозилле мой сайт не работает ))
... в опере тоже
стили слетели, ссылки выводят на "несуществующий адрес"
залил стили по умолчанию, тоже самое.

в ие и хроме все ок.

опера 11.61
мозилла 10.0

ие 9.0
хром 16.0.912.77

это нужно дополнительно курить кроссбраузерность или это привет от Денвера?
« Последнее редактирование: Февраля 08, 2012, 03:59:29 pm от MikeS »