Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Внешний вид корзины


Recommended Posts

Сейчас корзина выглядит ик

Изображение

хочу изменить чтобы было ик

Изображение

я ик понимаю что надо править catalog/controller/module/cart.tpl или catalog/view/theme/.../template/checkout/cart.tpl?

Link to comment
Share on other sites


  • 4 weeks later...

А не подскажете что именно в этом файле вырезать, чтобы убрать товары и осивить только итоговую этону?

catalog/controller/module/cart.php
Link to comment
Share on other sites


В файле catalog/view/theme/МОЙ_ШАБЛОН/template/module/cart.tpl удалить следуюещёе:

<?php if ($ajax) { ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/ajax_add.js"></script>
<?php } ?>

<script type="text/javascript"><!--

function getUrlParam(name) {
  var name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^]*)";
  var regex = new RegExp(regexS);
  var results = regex.exec(window.location.href);
  if (results == null)
    return "";
  else
    return results[1];
}

$(document).ready(function () {
	$('.cart_remove').live('click', function () {
		if (!confirm('<?php echo $text_confirm; ?>')) {
			return false;
		}
		$(this).removeClass('cart_remove').addClass('cart_remove_loading');
		$.ajax({
			type: 'post',
			url: 'index.php?route=module/cart/callback',
			dataType: 'html',
			data: 'remove=' + this.id,
			success: function (html) {
				$('#module_cart .middle').html(html);
				if (getUrlParam('route').indexOf('checkout') != -1) {
					window.location.reload();
				}
			}
		});
	});
});
//--></script>

Если это не убрать, то при добавлении типа, когда товар летит в корзину, бугдет появляться все-равно список. Хотя, можно использовать, как фичу ;)

И закомментировать им сверху в классе middle вот ик:

<div class="middle">
    <?php if ($products) { ?>
    <table cellpadding="2" cellspacing="0" style="width: 100%;">
      <?php foreach ($products as $product) { ?>
      <tr>
       <!-- <td align="left" valign="top" style="width:1px"><span class="cart_remove" id="remove_<?php echo $product['key']; ?>"> </span></td><td valign="top" align="right" style="width:1px"><?php echo $product['quantity']; ?> x </td>
        <td align="left" valign="top"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a>-->
          <div>
           <!-- <?php foreach ($product['option'] as $option) { ?>
            - <small style="color: #999;"><?php echo $option['name']; ?> <?php echo $option['value']; ?></small><br />
            <?php } ?>-->
          </div>

Должно рилиить.

С уважением.

UPD - Насчет контроллера, ксити, тож пригдется вылислять, я не смотрел, но думаю, шо undefined_Index повылазит в журнно ошипотому чток, когда он бугдет $product['key'] искать...

Edited by AlexFisher
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.