Same height for product div

  • Posts: 79
  • Thank you received: 0
9 years 5 days ago #221014

-- HikaShop version -- : 2.6.0

Hi,
You added a script I guess in update 2.6.0 to show products box as the same height. That is good. And it's works fine by default
However I override "listing.php" to show product by categories as columns and not by raw (by default)
I just added row-fluid span4 in the div to get 3 columns

<div class="hikashop_products_listing row-fluid span4">
in the listing.php
But I don't have he same height everywhere.
Is there anything I can do to get the function please?
Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 5 days ago #221026

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 79
  • Thank you received: 0
9 years 4 days ago #221202

Ok I found

data-consistencyheight=".hikashop_subcontainer"
in listing_div.php.
I removed it but it's did not really work. Actually it doesn't work on the first click on the shop link with Firefox. I need to click again for a good result. But it's more obvious with chrome I got a really bad result (see attached file)

I remember after 2.5 update got already this problem and I fix it by editing css file with :
.hikashop_products .hikashop_subcontainer.thumbnail { height: auto !important; }

But if I keep this css, my box have not the same height???

Moreover I have got a hikashop carousel module on the same page and if i remove data-cons... the carousel is not display...

Attachments:
Last edit: 9 years 4 days ago by arveni.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 3 days ago #221205

Hi,

You can potentially use this css property in order to have the same height for all your elements:

.hikashop_products .hikashop_product_price_full{
    min-height: 60px;
}

I was not able to reproduce your issue with the missing content in the divs. Please try to clear all the possible caches.

Please Log in or Create an account to join the conversation.

  • Posts: 79
  • Thank you received: 0
9 years 3 days ago #221308

I cleared all cache and try on different computer but the result is the same.
I tried your css code but it impact the first columns only. weird!!

After clearing the browser cache and comment my css

.hikashop_products .hikashop_subcontainer.thumbnail { height: auto !important; }

I have a bad result : height of my box is equal to 161px (see image 1)
I reload the same page and bingo the result is right height is equal to 263 (see image 2)

only the first columns have no impact?? and why after reload the page, result is good (however the result is never right with chrome)

I configure my shop with div dimension 1x10

PS : My shop is online so I have to edit back my css with "height: auto !important;"

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 3 days ago #221314

Hi,

I am not able to reproduce the issue on my end, every time I load the page the display is correct even on Chrome.
Do you have a cache enabled in your template or in Joomla ?

Please Log in or Create an account to join the conversation.

  • Posts: 79
  • Thank you received: 0
8 years 11 months ago #222189

Once again I cleared all cache, disable cache in joomla config, use admin tool to clear cache too,... I tried different pc and tablet and always the same result. See picture on my previous post

I used the default listing.php now

I deleted my css to show you the problem. Hope you can see something...

If I disable "category group" it happens on all products!!!

PS: I don't know if it's relative but I have an error my page

Uncaught ReferenceError: productCounter is not defined

<div class="custom"  >
	<script type="text/javascript">jQuery(document).ready(function() {
		jQuery('.hikashop_products .thumbnails .hikashop_product').each(function() {
			if (jQuery(this).hasClass('hikashop_product_row_' + productCounter)) {
				if (!jQuery(this).find('.hikashop_product_name').hasClass('heightFormatted')) {
					resizeThumbnails(productCounter);
				}
			} else {
				productCounter++;
			}
		});
	});

Last edit: 8 years 11 months ago by arveni.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 11 months ago #222209

Hi,

It is definitely related yes. If you have a javascript error on the page, the rest of the javascript (including the one to get the same height for the blocks) cannot run. Fix that javascript code (which doesn't exist by default in HikaShop) and that should solve the problem.

The following user(s) said Thank You: arveni

Please Log in or Create an account to join the conversation.

  • Posts: 79
  • Thank you received: 0
8 years 11 months ago #222428

I solved my js problem (Before the 2.6 update I added a js script from here to have the same height and I forgot to disable it...my bad...) but my initial problem remaind!!!

PS : For try I deleted all my hikashop override (html and css) and I still have my problem...

Last edit: 8 years 11 months ago by arveni. Reason: Details

Please Log in or Create an account to join the conversation.

  • Posts: 79
  • Thank you received: 0
8 years 11 months ago #222434

Okay it seems I solved my initial problem by editing thumbnail height in my products option. Before I defined the the height by

.hikashop_product_listing_image {max-height:120px; }
.

But if I keep blank this "option" there is a bug...

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 11 months ago #222464

Hi,

There is no bug.
We added in HikaShop 2.6 the "data-consistencyheight" and we will add an option in the next release in order to let users enable/disable it.

After that ; if you removed the "data-consistencyheight" and still have an issue with the height ; it is related to your CSS/JS/template but not to HikaShop.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 177
  • Thank you received: 5
7 years 7 months ago #266110

Jerome wrote: We added in HikaShop 2.6 the "data-consistencyheight" and we will add an option in the next release in order to let users enable/disable it.

Where I can find that option? I think I check all, but can't see. In "Configuration" -> "Display"? What is the exact name of that parameter?
$attributes = ($columns > 1 && $this->params->get('consistencyheight', 1)) ? ' data-consistencyheight=".hikashop_subcontainer"' : '';

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 7 months ago #266111

Hello,

Depending your HikaShop version number ; In the menu/module parameters.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.099 seconds
Powered by Kunena Forum