Rows and Columns

  • Posts: 62
  • Thank you received: 0
10 years 11 months ago #175064

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.3

Hi there,

In category view, the system generates 'hikashop_product hikashop_product_column_1 hikashop_product_row_1' and so on.

I am trying to put a border under each row, but the row is only dependent on each product, so its not really a row. For instance if I put a border using .hikashop_product_row_1 and so on for each row, on the last row (or first if there is only 2 or 3 items for a row I set as 3), it will only border under the products but not the row since the DIV is only under each product.

Is there any way in the code to change this, or a workaround? Because I want a border to run across 100% under each row regardless if there is total number of products filling the row or not.

Thanks.

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

  • Posts: 84303
  • Thank you received: 13698
  • MODERATOR
10 years 11 months ago #175076

Hi,

You won't be able to do that in CSS. As you say, there is no element that run accross the whole width to be able to do that.
You'll have to edit the file "listing_div" of the view "product" via the menu Display>Views and add extra HTML after the line:
$current_row++;
like this:
echo '<div style="my css between each line">my div between each line</div>';

The following user(s) said Thank You: ninjab

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

  • Posts: 62
  • Thank you received: 0
10 years 11 months ago #175198

Thanks, that was basically what I was after. I didnt know what part I was looking for since I dont really know PHP.

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

  • Posts: 62
  • Thank you received: 0
10 years 10 months ago #175414

Hi Nick,

I inputed the below code, but nothing shows us. I assume its because of the echo command? I tried removing that but seems my PHP is not parsing. Thanks.

$current_row++;
echo '<div style="my css between each line">my div between each line</div>';
				if(!HIKASHOP_RESPONSIVE) {
?>
			<div style="clear:both"></div>

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

  • Posts: 84303
  • Thank you received: 13698
  • MODERATOR
10 years 10 months ago #175433

Hi,

If you don't see any change, then it means that you're not editing the correct file.
Make sure that you're editing the listing_div file of the product view and not the category view, and that you're doing for your frontend template and not another template or you won't see the change on your products listings.

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

  • Posts: 62
  • Thank you received: 0
10 years 10 months ago #175520

I will give it a try tonight. I was editing listing_div in the category directory and not the product directly as I was thinking it was relevant to that.

Thanks a lot.

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

  • Posts: 62
  • Thank you received: 0
10 years 10 months ago #175857

HI Nick,

It wasnt working as I only had two products in the category.

Anyway I got it working now however the issue I have is that I have to put content inside the DIV to be able to control the border. If I put nothing in the DIV and enter a border for only top or bottom, I still get borders on the top and bottom for some reason.

The other issue is, if I have 3 rows of 2 making a complete 3 product column in each 2 rows, that I will also still get the border at the last row as there is no specific CSS to be able to turn off the last row.

Thanks.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 10 months ago #175909

Hi,

You potentially have to move the code to another place in the view and/or add more PHP conditions to display or not that div.

For example, to not display the div at the last row, you have to do a php count on the rows and a counter, and if count != counter so display the div, else don't display it (so not displayed for the last one).

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

  • Posts: 62
  • Thank you received: 0
10 years 10 months ago #175929

Xavier wrote: Hi,

You potentially have to move the code to another place in the view and/or add more PHP conditions to display or not that div.

For example, to not display the div at the last row, you have to do a php count on the rows and a counter, and if count != counter so display the div, else don't display it (so not displayed for the last one).


Thanks for the reply. I tried doing the below code, which parsed but the argument must not be correct. It just does "row-line" I am not a PHP coder :(
<?php

				}

				if($current_column>=$columns){

				if (count != 1){
					$current_row++;

					echo '<div id="row-line"></div>';}

				else {$current_row++;
					echo '<div id="row-line23"></div>';}
					
		if(!HIKASHOP_RESPONSIVE) {

?>

I still also get the problem with the actual div box, you mentioned to move that but I dont know where to put what code.

Thanks.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 10 months ago #175935

Hi,

We don't really support the customizations, the support is here for bug report, configuration help, etc.
So the best thing to do will be to post a request in the commercial jobs part of this forum ;)

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

Time to create page: 0.086 seconds
Powered by Kunena Forum