Post by rivatnt12 » Fri Jan 15, 2016 11:09 am

Hello I am modifying div class of cart button in header.tpl to increase width to 50%

http://www.koongskoongs.de/shop

however, still homepage show same.
when I change div class on inspector page. it show what I imagined.

below is original code

Code: Select all

<header>
  <div class="container">
    <div class="row">
      <div class="col-sm-4">
        <div id="logo">
          <?php if ($logo) { ?>
          <a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" class="img-responsive" /></a>
          <?php } else { ?>
          <h1><a href="<?php echo $home; ?>"><?php echo $name; ?></a></h1>
          <?php } ?>
        </div>
      </div>
      <div class="col-sm-5"><?php echo $search; ?>
      </div>
      <div class="col-sm-3"><?php echo $cart; ?></div>
    </div>
  </div>
</header>
and I changed below code

Code: Select all

  <div class="col-sm-3"><?php echo $cart; ?></div>
to

Code: Select all

  <div class="col-sm-5"><?php echo $cart; ?></div>
and I updated in my FTP but. still show original div class.
do you know what I missed?
is there more somewhere I need to touch ?
Last edited by rivatnt12 on Sat Jan 16, 2016 5:16 am, edited 1 time in total.

Newbie

Posts

Joined
Sat Feb 22, 2014 6:33 am

Post by vcabreu.py » Fri Jan 15, 2016 7:44 pm

Ello, mate.
When we talk about bootstrap css, you should imagine a 100% width block of your site as a block of span "12".
On your header tpl, you got three cols, sm-4 (logo), sm-5 (search) and sm-3 (cart), 4+5+3 = 12!
If you want set your cart col from a size "3" to "5", you must remove 2 "spans" from the anterior cols, setting for example the search col to sm-3 or the logo col to sm-2, or the search to sm-4 and the logo to sm-3, so with the cart sm-5 the sum of col spans is 12.

EDIT: the span for 50% width is 6;

Example:

Code: Select all

<header>
  <div class="container">
    <div class="row">
      <div class="col-sm-4">
        <div id="logo">
          <?php if ($logo) { ?>
          <a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" class="img-responsive" /></a>
          <?php } else { ?>
          <h1><a href="<?php echo $home; ?>"><?php echo $name; ?></a></h1>
          <?php } ?>
        </div>
      </div>
      <div class="col-sm-3"><?php echo $search; ?>
      </div>
      <div class="col-sm-5"><?php echo $cart; ?></div>
    </div>
  </div>
</header>
:joker:

User avatar
Newbie

Posts

Joined
Thu Jan 14, 2016 12:30 am
Location - Americana | São Paulo | Brazil

Post by rivatnt12 » Sat Jan 16, 2016 4:24 am

Thanks. but nothing changed although I followed sum up "12" any other person. pls help me....

vcabreu.py wrote:Ello, mate.
When we talk about bootstrap css, you should imagine a 100% width block of your site as a block of span "12".
On your header tpl, you got three cols, sm-4 (logo), sm-5 (search) and sm-3 (cart), 4+5+3 = 12!
If you want set your cart col from a size "3" to "5", you must remove 2 "spans" from the anterior cols, setting for example the search col to sm-3 or the logo col to sm-2, or the search to sm-4 and the logo to sm-3, so with the cart sm-5 the sum of col spans is 12.

EDIT: the span for 50% width is 6;

Example:

Code: Select all

<header>
  <div class="container">
    <div class="row">
      <div class="col-sm-4">
        <div id="logo">
          <?php if ($logo) { ?>
          <a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" class="img-responsive" /></a>
          <?php } else { ?>
          <h1><a href="<?php echo $home; ?>"><?php echo $name; ?></a></h1>
          <?php } ?>
        </div>
      </div>
      <div class="col-sm-3"><?php echo $search; ?>
      </div>
      <div class="col-sm-5"><?php echo $cart; ?></div>
    </div>
  </div>
</header>
:joker:

Newbie

Posts

Joined
Sat Feb 22, 2014 6:33 am

Post by cyclops12 » Sat Jan 16, 2016 4:50 am

Have you refreshed your cache ?
If not goto BO/extensions/modifications and click the refresh button top right

Active Member
Online

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by rivatnt12 » Sat Jan 16, 2016 5:15 am

Hi I did it is same. but the webpage inspector show original one.
apparently, header.tpl has changed in FTP but inspector doesn't seems so.
can you see my header fields ?

http://www.koongskoongs.de/shop
cyclops12 wrote:Have you refreshed your cache ?
If not goto BO/extensions/modifications and click the refresh button top right

Newbie

Posts

Joined
Sat Feb 22, 2014 6:33 am

Post by rivatnt12 » Sat Jan 16, 2016 5:36 am

below is my original header.tpl

Code: Select all

<!DOCTYPE html>
<!--[if IE]><![endif]-->
<!--[if IE 8 ]><html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" class="ie8"><![endif]-->
<!--[if IE 9 ]><html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>">
<!--<![endif]-->
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content= "<?php echo $keywords; ?>" />
<?php } ?>
<script src="catalog/view/javascript/jquery/jquery-2.1.1.min.js" type="text/javascript"></script>
<link href="catalog/view/javascript/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" />
<script src="catalog/view/javascript/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<link href="catalog/view/javascript/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,400i,300,700" rel="stylesheet" type="text/css" />
<link href="catalog/view/theme/default/stylesheet/stylesheet.css" rel="stylesheet">
<?php foreach ($styles as $style) { ?>
<link href="<?php echo $style['href']; ?>" type="text/css" rel="<?php echo $style['rel']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script src="catalog/view/javascript/common.js" type="text/javascript"></script>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<?php foreach ($scripts as $script) { ?>
<script src="<?php echo $script; ?>" type="text/javascript"></script>
<?php } ?>
<?php foreach ($analytics as $analytic) { ?>
<?php echo $analytic; ?>
<?php } ?>
</head>
<body class="<?php echo $class; ?>">
<nav id="top">
  <div class="container">
    <?php echo $currency; ?>
    <?php echo $language; ?>
    <div id="top-links" class="nav pull-right">
      <ul class="list-inline">
        <li><a href="<?php echo $contact; ?>"><i class="fa fa-phone"></i></a> <span class="hidden-xs hidden-sm hidden-md"><?php echo $telephone; ?></span></li>
        <li class="dropdown"><a href="<?php echo $account; ?>" title="<?php echo $text_account; ?>" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $text_account; ?></span> <span class="caret"></span></a>
          <ul class="dropdown-menu dropdown-menu-right">
            <?php if ($logged) { ?>
            <li><a href="<?php echo $account; ?>"><?php echo $text_account; ?></a></li>
            <li><a href="<?php echo $order; ?>"><?php echo $text_order; ?></a></li>
            <li><a href="<?php echo $transaction; ?>"><?php echo $text_transaction; ?></a></li>
            <li><a href="<?php echo $download; ?>"><?php echo $text_download; ?></a></li>
            <li><a href="<?php echo $logout; ?>"><?php echo $text_logout; ?></a></li>
            <?php } else { ?>
            <li><a href="<?php echo $register; ?>"><?php echo $text_register; ?></a></li>
            <li><a href="<?php echo $login; ?>"><?php echo $text_login; ?></a></li>
            <?php } ?>
          </ul>
        </li>
        <li><a href="<?php echo $wishlist; ?>" id="wishlist-total" title="<?php echo $text_wishlist; ?>"><i class="fa fa-heart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $text_wishlist; ?></span></a></li>
        <li><a href="<?php echo $shopping_cart; ?>" title="<?php echo $text_shopping_cart; ?>"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $text_shopping_cart; ?></span></a></li>
        <li><a href="<?php echo $checkout; ?>" title="<?php echo $text_checkout; ?>"><i class="fa fa-share"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $text_checkout; ?></span></a></li>
      </ul>
    </div>
  </div>
</nav>



<header>
  <div class="container">
    <div class="row">
      <div class="col-sm-4">
        <div id="logo">
          <?php if ($logo) { ?>
          <a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" class="img-responsive" /></a>
          <?php } else { ?>
          <h1><a href="<?php echo $home; ?>"><?php echo $name; ?></a></h1>
          <?php } ?>
        </div>
      </div>
      <div class="col-sm-5"><?php echo $search; ?>
      </div>
      <div class="col-sm-3"><?php echo $cart; ?></div>
    </div>
  </div>
 </header>




<?php if ($categories) { ?>
<div class="container">
  <nav id="menu" class="navbar">
    <div class="navbar-header"><span id="category" class="visible-xs"><?php echo $text_category; ?></span>
      <button type="button" class="btn btn-navbar navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"><i class="fa fa-bars"></i></button>
    </div>
    <div class="collapse navbar-collapse navbar-ex1-collapse">
      <ul class="nav navbar-nav">
        <?php foreach ($categories as $category) { ?>
        <?php if ($category['children']) { ?>
        <li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle" data-toggle="dropdown"><?php echo $category['name']; ?></a>
          <div class="dropdown-menu">
            <div class="dropdown-inner">
              <?php foreach (array_chunk($category['children'], ceil(count($category['children']) / $category['column'])) as $children) { ?>
              <ul class="list-unstyled">
                <?php foreach ($children as $child) { ?>
                <li><a href="<?php echo $child['href']; ?>"><?php echo $child['name']; ?></a></li>
                <?php } ?>
              </ul>
              <?php } ?>
            </div>
            <a href="<?php echo $category['href']; ?>" class="see-all"><?php echo $text_all; ?> <?php echo $category['name']; ?></a> </div>
        </li>
        <?php } else { ?>
        <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
        <?php } ?>
        <?php } ?>
      </ul>
    </div>
  </nav>
</div>
<?php } ?>

Newbie

Posts

Joined
Sat Feb 22, 2014 6:33 am

Post by rivatnt12 » Sat Jan 16, 2016 7:18 am

Hi all. I got it. but it works.
I improvised with endorsing new col-sm serial col-sm-13.... col-sm-14....col-sm-15...
but I don't know if I did right or not. but it works. :crazy:
after click refresh button in backend in OC and it is working :)

thanks my fellow Swaggers :joker: ~

Code: Select all

<header>
<div class="container"><div class="row">
<div class="col-sm-13">
<div id="logo">
<?php if ($logo) { ?><a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" class="img-responsive" /></a>
          <?php } else { ?>
          <h1><a href="<?php echo $home; ?>"><?php echo $name; ?></a></h1>
          <?php } ?></div></div></div></div><div class="col-sm-16"><table width="710" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="350",td align="right"><div class="col-sm-14"><?php echo $search; ?></div></td>
    <td width-"10">&nbsp;</td>
    <td width="350"><div class="col-sm-15"><?php echo $cart; ?></div></td>
  </tr>
</table><br><br>
   </div>
    
    </header>

Newbie

Posts

Joined
Sat Feb 22, 2014 6:33 am
Who is online

Users browsing this forum: No registered users and 13 guests