Display the product code under the product name?

  • Posts: 43
  • Thank you received: 0
12 years 10 months ago #44310

" How to display the product code on the product page ?
You need to edit the CSS of HikaShop via the interface in the configuration under the tab display in the CSS area.
There, in order to display the product code on the product page, you can remove the CSS:
.hikashop_product_code_main{ display:none; } "


Ok, now appears the code.
Where to configure the CSS code for example appear under the product name, color and size?
How do I look like this:

Product name
Cod. XXX


Porque todo aquele que persevera colherá o fruto doce da vitória.
Last edit: 12 years 10 months ago by tasag.

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

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

Hi tasag,

If you want to display the product_code under the product_name, in HikaShop > Display > Views
Edit the view "show_default" (in the good template), add :

<br />
between the two span tags in the H1 tag.

Like that:
	<h1>
		<span id="hikashop_product_name_main" class="hikashop_product_name_main">
			<?php
			if (hikashop_getCID('product_id')!=$this->element->product_id && isset ($this->element->main->product_name))
				echo $this->element->main->product_name;
			else
				echo $this->element->product_name;
			?>
		</span><br />
		<span id="hikashop_product_code_main" class="hikashop_product_code_main">
			<?php
			echo $this->element->product_code;
			?>
		</span>
	</h1>

For the CSS styling, you just have to edit the same CSS File as previous, and add for example:
.hikashop_product_code_main{ 
	color: red;
	size: 16px;
}

Last edit: 12 years 10 months ago by Xavier.

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

  • Posts: 43
  • Thank you received: 0
12 years 10 months ago #44453

My friend, thank you, you solved.
I just have one question.
I tried changing the color of the product name in "span.hikashop_product_name"
I'm in the wrong place?


Porque todo aquele que persevera colherá o fruto doce da vitória.

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

  • Posts: 83103
  • Thank you received: 13418
  • MODERATOR
12 years 10 months ago #44454

No but try with an !important as your template CSS is overriding yours otherwise.

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

  • Posts: 43
  • Thank you received: 0
12 years 10 months ago #44455

Now that I realized, the code size of the product not be lower than the actual product name.

myamarylis.com/index.php/sugerimos/product/2-sra-amarylis


Porque todo aquele que persevera colherá o fruto doce da vitória.

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

  • Posts: 43
  • Thank you received: 0
12 years 10 months ago #44456

It did not work.

{span.hikashop_product_name
text-align: center;
display: block;
margin-bottom: 12 px;
color: yellow !important;


. hikashop_product_code_main {
color: white;
size: 12px !important;


Porque todo aquele que persevera colherá o fruto doce da vitória.

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

  • Posts: 13201
  • Thank you received: 2322
12 years 9 months ago #44483

Hi tasag,

I think your template css override the HikaShop default CSS, try to edit:

Joomla > Extensions > Template manager > Tab "Templates" > Select your template (jsn_tendo_pro) > Click on "Edit css"

Here you can edit you CSS file to change the properties like :

hikashop_product_name_main{
	text-align: center;
	display: block;
	margin-bottom: 12 px;
	color: yellow;
}

hikashop_product_code_main{
	color: white;
	size: 12px !important; 
}

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

  • Posts: 43
  • Thank you received: 0
12 years 9 months ago #44493

Hello Xavier.
Thank you for your attention.

I made the change to the CSS of my theme and the product name is OK.
The product code, I con to change the color but I can not change the size.

Any other suggestions?


Xavier, how do I get before the product code appears the initial?
For example:
Cod: XXXX

Greetings.


Porque todo aquele que persevera colherá o fruto doce da vitória.
Last edit: 12 years 9 months ago by tasag.

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

  • Posts: 13201
  • Thank you received: 2322
12 years 9 months ago #44495

Try with:

font-size: 12px;

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

  • Posts: 43
  • Thank you received: 0
12 years 9 months ago #44497

Xavier, that is, it worked.
Now just need to know how to insert the initial "Cod," before the product code


Porque todo aquele que persevera colherá o fruto doce da vitória.

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

  • Posts: 43
  • Thank you received: 0
12 years 9 months ago #44498

Xavier, I've found.
Thank you for your attention.


Porque todo aquele que persevera colherá o fruto doce da vitória.

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

Time to create page: 0.082 seconds
Powered by Kunena Forum