[Skip to main content](#vessel-content)

#   Too much space under product image

##

- **[Cheesydoodles](/forum/user/2480-cheesydoodles "View Cheesydoodles's Profile")**
- [![Cheesydoodles's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/2480-cheesydoodles "View Cheesydoodles's Profile") Topic Author
- [ Offline](/forum/user/2480-cheesydoodles)

Less More

- Posts: 41
- Thank you received: 0
-
-

11 years 1 week ago [\#219457](#219457) by [Cheesydoodles](/forum/user/2480-cheesydoodles "View Cheesydoodles's Profile")  *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#219457 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")* was created by *[Cheesydoodles](/forum/user/2480-cheesydoodles "View Cheesydoodles's Profile")*

-- HikaShop version -- : 2.6.0

Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.

- [ ![Screen-Shot-2015-11-04-at-12&#95;51&#95;51.jpg](/forum/attachment/27449) ](/forum/attachment/27449 "...t-12&#95;51&#95;51.jpg") [ ](/forum/attachment/27449?download=1 "...t-12&#95;51&#95;51.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

11 years 1 week ago [\#219460](#219460) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#219460 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi,

Yes, it's a configuration issue. Go in your Joomla menu manager and edit your menu item. There, in the "products settings" tab you'll find a width and a height field for the images of the listing so that you can reduce the height and that should help.

The following user(s) said Thank You: [Cheesydoodles](/forum/user/2480-cheesydoodles "View Cheesydoodles's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Cheesydoodles](/forum/user/2480-cheesydoodles "View Cheesydoodles's Profile")**
- [![Cheesydoodles's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/2480-cheesydoodles "View Cheesydoodles's Profile") Topic Author
- [ Offline](/forum/user/2480-cheesydoodles)

Less More

- Posts: 41
- Thank you received: 0
-
-

11 years 1 week ago [\#219506](#219506) by [Cheesydoodles](/forum/user/2480-cheesydoodles "View Cheesydoodles's Profile")  Replied by *[Cheesydoodles](/forum/user/2480-cheesydoodles "View Cheesydoodles's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#219506 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Sorry I don't quite understand this is not a menu item it is when I click on a category this is what is displayed also the module "recent items" it is happening there also, looked at the module settings but can't figure it out.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Cheesydoodles](/forum/user/2480-cheesydoodles "View Cheesydoodles's Profile")**
- [![Cheesydoodles's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/2480-cheesydoodles "View Cheesydoodles's Profile") Topic Author
- [ Offline](/forum/user/2480-cheesydoodles)

Less More

- Posts: 41
- Thank you received: 0
-
-

11 years 1 week ago [\#219531](#219531) by [Cheesydoodles](/forum/user/2480-cheesydoodles "View Cheesydoodles's Profile")  Replied by *[Cheesydoodles](/forum/user/2480-cheesydoodles "View Cheesydoodles's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#219531 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Found it, it was in the hikashop hidden menus as category layout, played about with the item layout and fixed now
Thank You

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 1 week ago [\#219535](#219535) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#219535 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi,

So if it is not related on the settings of the menu / module displaying this listing, this is maybe coming from a code we added in order to allow to have the same height for all the divs of a listing.
Please edit the view "product / listing_div" and remove the code: Code:

data-consistencyheight=".hikashop_subcontainer"

[ www.hikashop.com/support/documentation/s...ize-the-display.html](http://www.hikashop.com/support/documentation/support/documentation/153-customize-the-display.html)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")**
- [![saejangracer's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/41055-saejangracer "View saejangracer's Profile")
- [ Offline](/forum/user/41055-saejangracer)

Less More

- Posts: 25
- Thank you received: 2
-
-

10 years 3 weeks ago [\#253021](#253021) by [saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")  Replied by *[saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#253021 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi,

I have the data consistency attribute in product / listing_div view yet the listing page has non-consistent box sizes. Am I missing something?

Thank you ![=)](/smile.gif "=)")

---

Site building and troubleshooting
[ www.hikashop.com/forum/product-category-...product-display.html](https://www.hikashop.com/forum/product-category-display/886962-editing-view-for-custom-front-end-product-display.html) (open)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

10 years 3 weeks ago [\#253028](#253028) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#253028 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi,

I've checked your products listing page but I don't see that parameter there:
[ take.ms/37yrf](http://take.ms/37yrf)
So I don't see why you say that you have it in products/listing_div
Are you sure that you're looking at that view file for the joomla template you're using on your listing, and not for another template of your website ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")**
- [![saejangracer's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/41055-saejangracer "View saejangracer's Profile")
- [ Offline](/forum/user/41055-saejangracer)

Less More

- Posts: 25
- Thank you received: 2
-
-

10 years 2 weeks ago -  10 years 2 weeks ago [\#253890](#253890) by [saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")  Replied by *[saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#253890 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi nicolas,

Thank you for checking, under Display -&gt; Views -&gt; Front End -&gt; Protostar -&gt; Product -&gt; Listing_Div, I do have the consistent height attribute: Code:

&lt;?php } $attributes = ''; if($columns&gt;1 &amp;&amp; $this-&gt;params-&gt;get('consistencyheight',1)){ $attributes .= 'data-consistencyheight=".hikashop_subcontainer"'; } ?&gt; &lt;div class="hikashop_products" &lt;?php echo $attributes; ?&gt;&gt;

and my display option for this particular category is inherit(div). So I must be missing something for the boxes not to be same height but what am I missing?

Also I would like to do the following:

1) Display the sale end date string as "Expiring on (end date)" in the product listing view, under the product name for each product and "Ongoing" for products without sale end date, what should I add in the view file or the language file?

2) Allow the users to sort the product listing based on
a) Sale end date, nearest date to furthest date, followed by those without end date ("Ongoing"), followed by those which sale ended, nearest date to furthest date
b) Product published date, nearest to furthest date

3) Option for user to hide products which sale date ended in the product listing view

Thank you ![=)](/smile.gif "=)")

---

Site building and troubleshooting
[ www.hikashop.com/forum/product-category-...product-display.html](https://www.hikashop.com/forum/product-category-display/886962-editing-view-for-custom-front-end-product-display.html) (open)

Last edit: 10 years 2 weeks ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: [code] is nice

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

10 years 2 weeks ago [\#254033](#254033) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#254033 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi,

I found the issue I think. It comes from a javascript error.
Replace the line: Code:

if(window.hikaVotes &amp;&amp; typeOf(initVote) == 'function')

by: Code:

if(window.hikaVotes &amp;&amp; typeof(initVote) == 'function')

in the file media/com_hikashop/js/hikashop.js and that should fix the problem.

1. Something like that: Code:

&lt;?php echo hikashop_getDate($this-&gt;row-&gt;product_sale_end); ?&gt;

2. You can use the filter system to add sorting:
[ www.hikashop.com/support/documentation/1...-filter-listing.html](https://www.hikashop.com/support/documentation/100-hikashop-filter-listing.html)

3. You can use this plugin:
[ www.hikashop.com/support/forum/4-how-to/...ale-date.html#128950](https://www.hikashop.com/support/forum/4-how-to/31934-start-a-end-sale-date.html#128950)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")**
- [![saejangracer's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/41055-saejangracer "View saejangracer's Profile")
- [ Offline](/forum/user/41055-saejangracer)

Less More

- Posts: 25
- Thank you received: 2
-
-

10 years 1 week ago [\#254610](#254610) by [saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")  Replied by *[saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#254610 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi nicolas,

Thank you for your replies ![=)](/smile.gif "=)")

Realized that after changing the javascript, the container height doesn't get immediately applied correctly (see attachment), and will only display correctly after refreshing the page. Visitors may mistake that the site is faulty. Is there something else that needs to be changed for the browser to render the heights correctly on first loading?

1) As for the calling of product sale end date on the product listing view, I tried this code:

if ($this-&gt;row-&gt;product_sale_end &gt; date("j-F-Y g:i:A")) {
echo "Promotion will expire " . hikashop_getDate($this-&gt;row-&gt;product_sale_end);
}else if ($this-&gt;row-&gt;product_sale_end &lt;= date("j-F-Y g:i:A")) {
echo "Promotion expired";
}else{
echo "Ongoing";
}

but it always returns "Promotion expired" even if the product sale end date is in the future. Is there something else I need to add?

2) If I want the display to sort according to:
a) Active products arranged by product_ID in descending order
b) Expired products (product sale end date over) arranged by product_ID in descending order behind all active products
how do I do that without using filters if I don't want the user to sort it? (I think this is a simpler way than letting users sort themselves)

3) Noted your plugin, thank you ![=)](/smile.gif "=)")

---

Site building and troubleshooting
[ www.hikashop.com/forum/product-category-...product-display.html](https://www.hikashop.com/forum/product-category-display/886962-editing-view-for-custom-front-end-product-display.html) (open)

- [ ![StackedUp.png](/forum/attachment/34484) ](/forum/attachment/34484 "StackedUp.png") [ ](/forum/attachment/34484?download=1 "StackedUp.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

10 years 6 days ago [\#254634](#254634) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#254634 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi,

0. If you remove data-consistencyheight=".hikashop_subcontainer" from the listing_div view file, it will remove that problem altogether.

1. The variable $this-&gt;row-&gt;product_sale_end contains the date in unix timestamp. So instead of date("j-F-Y g:i:A"), you should use date("U") as per the php.net documentation on the date function:
[ php.net/manual/en/function.date.php](http://php.net/manual/en/function.date.php)

2. Sorting by product_id is easy. Edit your listing menu item via the Joomla menu manager and change the "ordering column" to "product_id" and the "ordering direction" setting to "descending". There is however no system to have several orderings at the same time like you ask in b. To do that, you would have to code your own plugin of the group "hikashop" and implement the onBeforeProductListingLoad trigger where you could set $order yourself:
[ www.hikashop.com/support/documentation/6...reProductListingLoad](https://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#onBeforeProductListingLoad)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")**
- [![saejangracer's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/41055-saejangracer "View saejangracer's Profile")
- [ Offline](/forum/user/41055-saejangracer)

Less More

- Posts: 25
- Thank you received: 2
-
-

10 years 6 days ago -  10 years 5 days ago [\#254739](#254739) by [saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")  Replied by *[saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#254739 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi nicolas,

0. That makes the subcontainers not have consistent height instead, how to retain the consistent height without having them stack up on first load? (The issue gets resolved on refreshing -&gt; that means Shift+F5 on Chrome will cause the subcontainers to stack, then F5 will let it display normally)

1. I've gotten that part with the code Code:

if ($this-&gt;row-&gt;product_sale_end &gt; date("U")) { echo "Promotion until " . hikashop_getDate($this-&gt;row-&gt;product_sale_end); }else if ($this-&gt;row-&gt;product_sale_end &lt;= date("U")) { echo "Promotion expired"; }else if ($this-&gt;row-&gt;product_sale_end = '') { echo "Ongoing"; }

which works except for the last part where product_sale_end is an empty value. Setting it to ($this-&gt;row-&gt;product_sale_end = 0) doesn't work either. What should I use instead for if product_sale_end has no value (so that it echoes "Ongoing")?

2. To sort the product listing by boolean [(product_sale_end &gt; date("U")) and (product_sale_end is empty) in front, followed by [(product_sale_end &lt;= date("U")], then by (product_id DESC), is that possible to frame it the SQL query of $order? Because I would like it to put the active ones [(product_sale_end &gt; date("U")) and (product_sale_end is empty)] in front but NOT sorted by the sale end date, instead sort the recordset by product_id DESC, and all the expired ones [(product_sale_end &lt;= date("U")] behind again NOT sorted by sale end date, but by product_id DESC. Instead of one recordset, there would be two - to query and return all active products and sort them, and then query and return all expired products and sort them and append them behind the query that returned all active products, is that possible with onBeforeProductListingLoad?

Thank you ![=)](/smile.gif "=)")

---

Site building and troubleshooting
[ www.hikashop.com/forum/product-category-...product-display.html](https://www.hikashop.com/forum/product-category-display/886962-editing-view-for-custom-front-end-product-display.html) (open)

Last edit: 10 years 5 days ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: [code] is nice

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

10 years 5 days ago [\#254762](#254762) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#254762 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi,

0. There is a modification in the hikashop.js file to use "min height" instead of height.
But the height consistency feature is using some javascript to calculate the height of the element and set it to all.. If the loading of some elements is not made the height can have some processing issues.

1. If you take a closer look at your code you will see that in the last "if" there is an assignation and not a correspondence check. Code:

$this-&gt;row-&gt;product_sale_end = ''

so you're modifying the variable to put it an empty string.

2. Sorting on a boolean value is not recommended because there is not enough data to indicate how two elements should be arranged ; but in MySQL queries you can use several sorting columns to not make the result too "random".
Now thanks to the trigger "onBeforeProductListingLoad" you can do a lot of things in the query like adding new fields to retrieve and change the ordering.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")**
- [![saejangracer's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/41055-saejangracer "View saejangracer's Profile")
- [ Offline](/forum/user/41055-saejangracer)

Less More

- Posts: 25
- Thank you received: 2
-
-

10 years 3 days ago [\#254957](#254957) by [saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")  Replied by *[saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#254957 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi Jerome,

0. It is OK in Chrome and mobile IE, just need to reload the page. However it doesn't work on Safari at all - stacked up and doesn't display correctly even after refreshing. Is it a problem with the parents.length and elems.length not being loaded properly? How do I get the height consistency feature to work on first load?

1. Thank you for pointing out, I have modified it and reordered the if else statements so it works now. Here's the code if it could help anyone:

if ($this-&gt;row-&gt;product_sale_end == '0') {
echo "Ongoing";
}else if ($this-&gt;row-&gt;product_sale_end &gt; date("U")) {
echo "Promotion until " . hikashop_getDate($this-&gt;row-&gt;product_sale_end);
}else if ($this-&gt;row-&gt;product_sale_end &lt;= date("U")) {
echo "Promotion expired";
}

2. I think it's a similar issue to sort a product listing based on unlimited stock, limited stock and no stock? I realised the display requires 3 queries..
a) product_sale_end &gt; date("U"), order by product_id DESC
b) product_sale_end == 0, order by product_id DESC
c) product_sale_end &lt; date ("U") &amp;&amp; != 0, order by product_id DESC
How can I get the trigger to sort the product listing according to this configuration?

3. I'm also using the Random Products module but have one issue - how to let the module select ONLY the products that have not past the product_sale_end date? That means don't display expired products.

Thank you ![=)](/smile.gif "=)")

---

Site building and troubleshooting
[ www.hikashop.com/forum/product-category-...product-display.html](https://www.hikashop.com/forum/product-category-display/886962-editing-view-for-custom-front-end-product-display.html) (open)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

10 years 3 days ago [\#254983](#254983) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#254983 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi,

0. Yes, the problem is that the height of the elements provided by the browser on the first load is wrong in some browsers because they try to optimize the loading too much and thus the images are not yet loaded when they call the javascript of the page, which normally shouldn't happen.
As Jerome said, we changed the code there to use min-height instead of height so that way, on the first load, instead of cutting elements when the height provided is wrong, it will just display as if the height wasn't consistent. If you use the latest build of HikaShop 2.6.4, the change has been done in media/com_hikashop/js/hikashop.js for that.
But we don't see any solution to have the consistency height system work all the time.

2. It's not possible to have three different sortings on the same products listing like that. As you say, this would require three queries, and thus you would actually need to have three products listing modules one below another with your plugin's onBeforeProductListingLoad function changing the query in a different way each time.

3. It's the same as point 2, you can use onBeforeProductListingLoad in order to do that.
I had developed a small plugin to do that for all the products listings on the frontend:
[ www.hikashop.com/support/forum/4-how-to/...ale-date.html#128950](https://www.hikashop.com/support/forum/4-how-to/31934-start-a-end-sale-date.html#128950)
So you can base yourself on that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")**
- [![saejangracer's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/41055-saejangracer "View saejangracer's Profile")
- [ Offline](/forum/user/41055-saejangracer)

Less More

- Posts: 25
- Thank you received: 2
-
-

10 years 1 day ago [\#255124](#255124) by [saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")  Replied by *[saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#255124 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi nicolas,

0. Updated to 2.6.4, the loading issue should be fixed ![=)](/smile.gif "=)")

2. I believe repeating the function call 3 times with the trigger activating 3 times will be complicated, as also need to maintain the display flow, instead of displaying 3 form results. An alternative would be to shift all expired products to another category automatically upon expiry (to potentially allow for implementation of add to wishlist function). However this trigger is not available under mass actions. Is there a way to configure expired products to be automatically recategorised upon expiry to another category?

3. The plugin affects all products on front end, I can remove the filters for product_sale_start and product_sale_end=0 to affect only those expired, but how to restrict it to affect only the products displayed under Random Products? Of course if the task in point 2 can be accomplished (is it with a cron task?) then there's no problem just need to draw the random products from the active category.

Thank you ![=)](/smile.gif "=)")

---

Site building and troubleshooting
[ www.hikashop.com/forum/product-category-...product-display.html](https://www.hikashop.com/forum/product-category-display/886962-editing-view-for-custom-front-end-product-display.html) (open)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

10 years 6 hours ago [\#255162](#255162) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#255162 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi,

2. 3. Then, yes, using a mass action to add the product to a category will be the best in that case.
You can do that with a mass action with a trigger like "every minute", a filter with your condition on the product_sale_end column like that: product_sale_end &lt; {time}
and an action to add a category to the product.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")**
- [![saejangracer's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/41055-saejangracer "View saejangracer's Profile")
- [ Offline](/forum/user/41055-saejangracer)

Less More

- Posts: 25
- Thank you received: 2
-
-

9 years 11 months ago [\#256025](#256025) by [saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")  Replied by *[saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#256025 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi nicolas,

I have set up the mass action as follows:

MASS ACTION 1
Data: Product
Product Triggers: Every days
Filters
1. Category columns - category_column = Billboard
2. Product columns - product_sale_end &lt;= {time}
Actions
1. Update the categories - Remove - Billboard
2. Update the categories - Add - Past Goodies

MASS ACTION 2
Similar except product_sale_end = 0 and the Actions in reverse (Remove from Past Goodies, Add to Billboard) to move those without sale end date specified (value = 0) back to Billboard, and trigger set to Every minutes so that it activates once after Mass Action 1 is triggered

When I click Process in sequence (Mass Action 1, then Mass Action 2), it works OK. But it doesn't automatically process upon the time trigger. Which means I have to manually process the action, and that defeats the purpose of automating. Or did I miss out anything in setting up the Mass Actions?

Thank you ![=)](/smile.gif "=)")

---

Site building and troubleshooting
[ www.hikashop.com/forum/product-category-...product-display.html](https://www.hikashop.com/forum/product-category-display/886962-editing-view-for-custom-front-end-product-display.html) (open)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

9 years 11 months ago [\#256049](#256049) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#256049 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi,

If the automatic trigger of the mass actions doesn't work, it's probably that you didn't setup properly the cron task.
Please follow this documentation:
[ www.hikashop.com/support/documentation/5...ashop-cron-task.html](https://www.hikashop.com/support/documentation/55-hikashop-cron-task.html)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")**
- [![saejangracer's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/41055-saejangracer "View saejangracer's Profile")
- [ Offline](/forum/user/41055-saejangracer)

Less More

- Posts: 25
- Thank you received: 2
-
-

9 years 11 months ago [\#256202](#256202) by [saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")  Replied by *[saejangracer](/forum/user/41055-saejangracer "View saejangracer's Profile")* on topic *[Too much space under product image](/forum/26-product-category-display/880258-too-much-space-under-product-image#256202 "-- HikaShop version -- : 2.6.0  Hi I am struggling with the display of images, there is a large gap between the image and the description, is this a configuration issue? I have attached a screenshot to show.")*

Hi Nicolas,

The Cron URL works: [ www.orz.com.sg/index.php?option=com\_hikashop&amp;ctrl=cron](http://www.orz.com.sg/index.php?option=com_hikashop&ctrl=cron)

I'm checking with the host provider as well.

You can see the screen grab of the Mass Action set up in the attachment - it's set to trigger everyday but it doesn't, did I set the Mass Action up incorrectly?

Thank you ![=)](/smile.gif "=)")

---

Site building and troubleshooting
[ www.hikashop.com/forum/product-category-...product-display.html](https://www.hikashop.com/forum/product-category-display/886962-editing-view-for-custom-front-end-product-display.html) (open)

- [ ![MassActionNoTrigger.jpg](/forum/attachment/34823) ](/forum/attachment/34823 "...nNoTrigger.jpg") [ ](/forum/attachment/34823?download=1 "...nNoTrigger.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODAyNTgtdG9vLW11Y2gtc3BhY2UtdW5kZXItcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.160 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
