Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Full height -> Margin Bottom
Browse files Browse the repository at this point in the history
Full height on a gridded card breaks the margin bottom on the card;
set mb on the containing col to compensate.
  • Loading branch information
gburton committed Jul 4, 2020
1 parent 0c2b16d commit a2e7137
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<?php
while ($card_products = tep_db_fetch_array($card_products_query)) {
?>
<div class="col">
<div class="card h-100 mb-2 is-product" data-is-special="<?php echo (int)$card_products['is_special']; ?>" data-product-price="<?php echo $currencies->display_raw($card_products['final_price'], tep_get_tax_rate($card_products['products_tax_class_id'])); ?>" data-product-manufacturer="<?php echo max(0, (int)$card_products['manufacturers_id']); ?>">
<div class="col mb-2">
<div class="card h-100 is-product" data-is-special="<?php echo (int)$card_products['is_special']; ?>" data-product-price="<?php echo $currencies->display_raw($card_products['final_price'], tep_get_tax_rate($card_products['products_tax_class_id'])); ?>" data-product-manufacturer="<?php echo max(0, (int)$card_products['manufacturers_id']); ?>">
<a href="<?php echo tep_href_link('product_info.php', 'products_id=' . (int)$card_products['products_id']); ?>"><?php echo tep_image('images/' . $card_products['products_image'], htmlspecialchars($card_products['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '', true, 'card-img-top'); ?></a>
<div class="card-body">
<h5 class="card-title">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<?php
while ($card_products = tep_db_fetch_array($card_products_query)) {
?>
<div class="col">
<div class="card h-100 mb-2 is-product" data-is-special="<?php echo (int)$card_products['is_special']; ?>" data-product-price="<?php echo $currencies->display_raw($card_products['final_price'], tep_get_tax_rate($card_products['products_tax_class_id'])); ?>" data-product-manufacturer="<?php echo max(0, (int)$card_products['manufacturers_id']); ?>">
<div class="col mb-2">
<div class="card h-100 is-product" data-is-special="<?php echo (int)$card_products['is_special']; ?>" data-product-price="<?php echo $currencies->display_raw($card_products['final_price'], tep_get_tax_rate($card_products['products_tax_class_id'])); ?>" data-product-manufacturer="<?php echo max(0, (int)$card_products['manufacturers_id']); ?>">
<a href="<?php echo tep_href_link('product_info.php', 'products_id=' . (int)$card_products['products_id']); ?>"><?php echo tep_image('images/' . $card_products['products_image'], htmlspecialchars($card_products['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '', true, 'card-img-top'); ?></a>
<div class="card-body">
<h5 class="card-title">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<?php
while ($orders = tep_db_fetch_array($orders_query)) {
?>
<div class="col">
<div class="card h-100 mb-2 is-product" data-is-special="<?php echo (int)$orders['is_special']; ?>" data-product-price="<?php echo $currencies->display_raw($orders['final_price'], tep_get_tax_rate($orders['products_tax_class_id'])); ?>" data-product-manufacturer="<?php echo max(0, (int)$orders['manufacturers_id']); ?>">
<div class="col mb-2">
<div class="card h-100 is-product" data-is-special="<?php echo (int)$orders['is_special']; ?>" data-product-price="<?php echo $currencies->display_raw($orders['final_price'], tep_get_tax_rate($orders['products_tax_class_id'])); ?>" data-product-manufacturer="<?php echo max(0, (int)$orders['manufacturers_id']); ?>">
<a href="<?php echo tep_href_link('product_info.php', 'products_id=' . (int)$orders['products_id']); ?>"><?php echo tep_image('images/' . $orders['products_image'], htmlspecialchars($orders['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '', true, 'card-img-top'); ?></a>
<div class="card-body">
<h5 class="card-title">
Expand Down
4 changes: 2 additions & 2 deletions templates/default/includes/components/product_listing.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
$prod_list_contents = NULL;

while ($listing = tep_db_fetch_array($listing_query)) {
$prod_list_contents .= '<div class="col">';
$prod_list_contents .= '<div class="card h-100 mb-2 is-product" data-is-special="' . (int)$listing['is_special'] . '" data-product-price="' . $currencies->display_raw($listing['final_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '" data-product-manufacturer="' . max(0, (int)$listing['manufacturers_id']) . '">' . PHP_EOL;
$prod_list_contents .= '<div class="col mb-2">';
$prod_list_contents .= '<div class="card h-100 is-product" data-is-special="' . (int)$listing['is_special'] . '" data-product-price="' . $currencies->display_raw($listing['final_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '" data-product-manufacturer="' . max(0, (int)$listing['manufacturers_id']) . '">' . PHP_EOL;
if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) {
$prod_list_contents .= '<a href="' . tep_href_link('product_info.php', 'manufacturers_id=' . (int)$_GET['manufacturers_id'] . '&products_id=' . (int)$listing['products_id']) . '">' . tep_image('images/' . $listing['products_image'], htmlspecialchars($listing['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '', true, 'card-img-top') . '</a>' . PHP_EOL;
} else {
Expand Down

0 comments on commit a2e7137

Please sign in to comment.