Skip to main content

div class for product columns

More
9 years 3 months ago - 9 years 3 months ago #272311 by ronron
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.5

hi

i went to edit this view product/listing_div.php

i added a few classes to as so
Code:
<<?php echo (HK_GRID_THUMBNAILS !== false && HK_GRID_THUMBNAILS != '') ? 'li' : 'div'; ?> class="col-xs-6 col-sm-6 col-lg-<?php echo $span; ?> hikashop_product hikashop_product_column_<?php echo $current_column; ?> hikashop_product_row_<?php echo $current_row; ?>">

my issue is the <?php echo $span; ?> part is always col-sm-4. i realize that the 4 is the number of columns is set on the page. How can i change col-sm-4 to col-lg- or col-md.

can the settings on the product listing menu apply on col-lg so i can just add clasees for smaller screens

thanks
Last edit: 9 years 3 months ago by ronron.

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

More
9 years 3 months ago #272321 by nicolas
Hi,

You can have several of them, that's not a problem. And no, col-sm-4 is not the number of columns. In a boostrap grid layout, the area width is cut in 12 pieces and this number 4 means that each column will take 4 pieces. So it should actually display the listing in three columns if you have col-sm-4.

There are no settings to apply additional classes, but you can do it directly in the view file like you already did.
The following user(s) said Thank You: ronron

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

More
9 years 3 months ago - 9 years 3 months ago #272453 by ronron
thank you

my issue now is to make the columns behave as follows
Code:
<<?php echo (HK_GRID_THUMBNAILS !== false && HK_GRID_THUMBNAILS != '') ? 'li' : 'div'; ?> class="col-xs-6 col-sm-6 col-lg-<?php echo $span; ?> hikashop_product hikashop_product_column_<?php echo $current_column; ?> hikashop_product_row_<?php echo $current_row; ?>">

if i use the code above this is the result
Code:
class="col-xs-6 col-lg-col-sm-3 hikashop_product hikashop_product_column_1 hikashop_product_row_1"

it seems that <?php echo $span; ?> is equal to col-sm-3

how can i change col-sm-3 to col-lg-3?
Last edit: 9 years 3 months ago by ronron.

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

More
9 years 3 months ago #272469 by nicolas
Hi,

Just change the line:
$span = constant('HK_GRID_COL_'.$span);
to:
$span = 'col-lg-'.$span;
in listing_div.

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

Time to create page: 0.158 seconds
Powered by Kunena Forum