Trying To Find A File

  • Posts: 966
  • Thank you received: 11
11 years 8 months ago #126413

Where can I find the file with this class? .hikashop_product_characteristics_table

I have gone through quite a few files but cannot find it. I need to add a class to the td.

Thanks!!

Attachments:

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

  • Posts: 83993
  • Thank you received: 13605
  • MODERATOR
11 years 8 months ago #126421

It's in the file administrator/components/com_hikashop/types/characteristic.php

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

  • Posts: 966
  • Thank you received: 11
11 years 8 months ago #126432

This is not in the backend in any of the views? And if no, how can I make changes to this file so that it does not get overriden with the next upgrade?

Thank you!!

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

  • Posts: 83993
  • Thank you received: 13605
  • MODERATOR
11 years 8 months ago #126435

You can use a characteristic display override (quite complex) as explained in the developer documentation:
www.hikashop.com/support/documentation/6...r-documentation.html

But I don't see why you want to add a class...
You can already add CSS to the tds of that table without adding a class.

For example:
.hikashop_product_characteristics_table td{
color: blue;
}

Or for the label only:
.hikashop_product_characteristics_table td:first-child{
color: blue;
}

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

  • Posts: 966
  • Thank you received: 11
11 years 8 months ago #126442

Oh I may be able to get it to work then without going into the files.

What I was trying to do is get the label across the page and the options below it as per the example attached that reads "about this item". But as you can see it's squished. This is the CSS. I thought adding 100% would make the other td wrap to the next line.

.hikashop_product_characteristics_table td:first-child {
	width:100%; margin-top:20px; margin-bottom:5px; font-weight:bold; background:#F6F6F6; padding:4px 0 4px 2px; }

Thanks!!

Attachments:

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

  • Posts: 83993
  • Thank you received: 13605
  • MODERATOR
11 years 8 months ago #126445

It's a cell element. You need to change its display type first with something like display:block;

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

  • Posts: 966
  • Thank you received: 11
11 years 8 months ago #126471

I tried the display: block and other things but nothing seems to work. :(

.hikashop_product_characteristics_table td:first-child {
	display:block; margin-top:20px; margin-bottom:5px; font-weight:bold; background:#F6F6F6; padding:4px 0 4px 2px; }

What would the class be for the td with the characteristics please?

Thanks!!

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

  • Posts: 83993
  • Thank you received: 13605
  • MODERATOR
11 years 8 months ago #126510

It would be
.hikashop_product_characteristics_table td:last-child {
}

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

  • Posts: 966
  • Thank you received: 11
11 years 8 months ago #126557

I got it to work except in IE - this browser is such a pain :( Thanks anyway...

.hikashop_product_characteristics_table td:first-child, .hikashop_product_characteristics_table td.ie7_class44 {
	display:inline-block; width:100%; margin-top:12px; margin-bottom:5px; font-weight:bold; background:#F6F6F6; padding:4px 0 4px 2px; }

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

  • Posts: 26253
  • Thank you received: 4040
  • MODERATOR
11 years 8 months ago #126576

Hi,

I don't think that IE7 supports the ":first-child" css rule.

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: 966
  • Thank you received: 11
11 years 8 months ago #126578

It doesn't seem like IE8 supports it either 'cause I have IE8 (for testing) and it ignores it.
As per the attached screenshot you can see the difference trying to style the characteristics td :(

Thanks!

Attachments:

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

  • Posts: 26253
  • Thank you received: 4040
  • MODERATOR
11 years 8 months ago #126650

Hi,

At this moment modifying the table rendering could help you to have specific classes and the different columns.
It will require to make an override using the " hikashop_characteristics_html " function.
www.hikashop.com/support/documentation/6...tation.html#override

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: 966
  • Thank you received: 11
11 years 8 months ago #126867

Thanks guys....

I think the override is a bit over my head :(

Maybe this could be a future consideration to add as a view in the component.

Thanks anyway....

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

  • Posts: 26253
  • Thank you received: 4040
  • MODERATOR
11 years 8 months ago #126871

Hi,

Yes, we wanted to improve the old overrides. We already started with the images in the product page in HikaShop 2.2.2
It will be improved with next release and time.

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: 966
  • Thank you received: 11
11 years 8 months ago #126878

That would be GREAT :) :) :)

Thanks!

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

  • Posts: 966
  • Thank you received: 11
11 years 8 months ago #127240

I so hate IE it's not even funny :(

I was looking at the file: administrator/components/com_hikashop/types/characteristic.php

I was thinking that if I moved both content (the characteristics header and characteristics) in one TD that it may help me style it better to conform to IE.

I made some changes but no luck - so is it not possible or could it be that I am just missing something? I HAD made the change in the section below but put it back to the original.

<table class="hikashop_product_characteristics_table">';
	$config =& hikashop_config();
	foreach($this->characteristics as $characteristic){
		$main_html.='<tr>';
		$values = array();
		if(!empty($characteristic->values)){
			foreach($characteristic->values as $k => $value){
				if(!$config->get('show_out_of_stock',1)){
					$hasQuantity = false;
					foreach($element->variants as $variant){
						foreach($variant->characteristics as $variantCharacteristic){
							if($variantCharacteristic->characteristic_id==$value->characteristic_id){
								if($variant->product_quantity != 0 || $element->product_id==$variant->product_id){
									$hasQuantity = true;
								}
							}
						}
					}
					if(!$hasQuantity) continue;
				}
				$values[$k]=$value->characteristic_value;
			}
		}

		$html=$this->display($characteristic->characteristic_id,@$characteristic->default->characteristic_id,$values,$params->get('characteristic_display'));
		if($params->get('characteristic_display_text')){
			$html=$characteristic->characteristic_value.'</td><td>'.$html;
		}
		$main_html.='<td>'.$html.'</td></tr>';
	}
	$main_html.='</table>

Thanks!!

Last edit: 11 years 8 months ago by Jerome.

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

  • Posts: 26253
  • Thank you received: 4040
  • MODERATOR
11 years 8 months ago #127370

Hi

Replace

$main_html.='<td>'.$html.'</td></tr>';
With
$main_html.='<td class="key">'.$html.'</td></tr>';
So the first cell will have the class "key".

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.
Last edit: 11 years 8 months ago by Jerome.

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

  • Posts: 966
  • Thank you received: 11
11 years 8 months ago #127432

I guess you misunderstood my question. As per the attached pic, the top and bottom content - that is circled - are in their own TD. I was wondering how to move them into ONE TD and, if that would cause an issue.

Attachments:

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

  • Posts: 83993
  • Thank you received: 13605
  • MODERATOR
11 years 8 months ago #127449

You would have to change the code:
$html=$characteristic->characteristic_value.'</td><td>'.$html;
to:
$html=$characteristic->characteristic_value.$html;
and they would display in the same td.

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

  • Posts: 966
  • Thank you received: 11
11 years 8 months ago #127578

Thanks nicolas that is what I was referring to.

Really sorry to bother you, but can you tell me which part of the code has the "Select a Size" text? I would like to put a div around that.
Please see the attached pic.

Attachments:

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

Time to create page: 0.072 seconds
Powered by Kunena Forum