S
S
smoklew2016-03-01 15:18:49
opencart
smoklew, 2016-03-01 15:18:49

How to change the text of an empty cart?

There is no code in the checkout/cart file that is responsible for displaying the text if the cart is empty, but through F12 , this code is perfectly visible. It seems that this file should respond ..
Code:

<?php echo $header; ?>
<?php if ($attention) { ?>
<div class="attention"><?php echo $attention; ?><img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>
<?php } ?>
<?php if ($success) { ?>
<div class="success"><?php echo $success; ?><img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>
<?php } ?>
<?php if ($error_warning) { ?>
<div class="warning"><?php echo $error_warning; ?><img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>
<?php } ?>
<?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
    <div class="cart-info">
      <table>
        <thead>
          <tr>
            <td class="image"><?php echo $column_image; ?></td>
            <td class="name"><?php echo $column_name; ?></td>
            <td class="model"><?php echo $column_model; ?></td>
            <td class="quantity"><?php echo $column_quantity; ?></td>
            <td class="price"><?php echo $column_price; ?></td>
            <td class="total"><?php echo $column_total; ?></td>
          </tr>
        </thead>
        <tbody>
          <?php foreach ($products as $product) { ?>
          <tr>
            <td class="image"><?php if ($product['thumb']) { ?>
              <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" /></a>
              <?php } ?></td>
            <td class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a>
              <?php if (!$product['stock']) { ?>
              <span class="stock">***</span>
              <?php } ?>
              <div>
                <?php foreach ($product['option'] as $option) { ?>
                - <small><?php echo $option['name']; ?>: <?php echo $option['value']; ?></small><br />
                <?php } ?>
              </div>
              <?php if ($product['reward']) { ?>
              <small><?php echo $product['reward']; ?></small>
              <?php } ?></td>
            <td class="model"><?php echo $product['model']; ?></td>
            <td class="quantity"><input type="text" name="quantity[<?php echo $product['key']; ?>]" value="<?php echo $product['quantity']; ?>" size="1" />
              &nbsp;
              <input type="image" id="update" src="catalog/view/theme/default/image/update.png" alt="<?php echo $button_update; ?>" title="<?php echo $button_update; ?>" />
              &nbsp;<a href="<?php echo $product['remove']; ?>"><img src="catalog/view/theme/default/image/remove.png" alt="<?php echo $button_remove; ?>" id="remove" title="<?php echo $button_remove; ?>" /></a></td>
            <td class="price"><?php echo $product['price']; ?></td>
            <td class="total"><?php echo $product['total']; ?></td>
          </tr>
          <?php } ?>
        </tbody>
      </table>
    </div>
  </form>
 
  <div class="buttons">

    <div class="right">
      <a href="<?php echo $checkout; ?>" class="button"><?php echo $button_checkout; ?>
      </a>
    </div>

    <div class="left">
      <a href="<?php echo $continue; ?>" class="button continue_button"><?php echo $button_shopping; ?>
      </a>
    </div>
  </div>
  <?php echo $content_bottom; ?></div>

Through F12.
3c9c051fc33d4b4c8ff2c4a957555686.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Valery Stolyarchuk, 2016-03-01
@Xvento

Ask a more precise question. What text do you want to change?

B
Bogdan Gerasimenko, 2016-03-01
@Kleindberg

Most likely you are editing the wrong file, because here after there <div class="breadcrumb">is a basket form and there is nothing similar in it. It seems to me that there is a separate file or class somewhere to display this message. Try using Folder Find Text to find in the folder where all the php files are located echo which is responsible for displaying the inscription "Your basket is empty!" (it can be found in the translation file).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question