Unnecessary space in the sales module div

Asked

Viewed 75 times

1

SS

I have a question for you. My problem is that the space in the display is too big if I hide the same options in the shopping cart!

My code hides the image of the product but the white space (empty) is great. I want to fix this to have a beautiful layout.

/app/design/frontend/rwd/default/template/customcart/cart/item/default.phtml [o arquivo original]

CODE:

<td class="product-cart-image">
    <?php if ($this->hasProductUrl()):?>
    <?php //hide product link of image only ?>
        <?php if(!Mage::getStoreConfig('....../option/rwd_item_image')): ?>
        <a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image">
        <?php endif; ?>
    <?php endif;?>
        <?php //hide product image only ?>
        <?php if(!Mage::getStoreConfig('...../option/rwd_item_image')): ?>
        <img src="<?php echo $this->getProductThumbnail()->resize(180); ?>" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" />
        <?php endif; ?>
    <?php if ($this->hasProductUrl()):?>
        </a>
    <?php endif;?>

This code hides the image and product link in the cart. But it is difficult to reduce the empty space. I want to remove the empty space, as I do it?

  • 1

    Friend, here everyone speaks Portuguese. So, could you please edit your question to translate it?

  • 1

    I sent a translation edition.

1 answer

1

This is a very useful tip that many beginners fight to accomplish: enable the template hints in the Magento admin.

To do this, just run the following SQL command in your database:

INSERT INTO core_config_data (scope, scope_id, path, value)
VALUES ('default', 0, 'dev/debug/template_hints', 1),
('default', 0, 'dev/debug/template_hints_blocks', 1);

And now, of course, how to disable:

UPDATE core_config_data SET value = 0 WHERE 
(scope = 'default' AND scope_id = 0 AND path = 'dev/debug/template_hints') OR
(scope = 'default' AND scope_id = 0 AND path = 'dev/debug/template_hints_blocks')

With this you can visualize where this generating unnecessary space.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.