Modify display of hikashop-product_name

  • Posts: 18
  • Thank you received: 0
  • Hikashop Essential
3 years 1 week ago #339833

-- HikaShop version -- : 4.5.0
-- Joomla version -- : 4.1.0
-- PHP version -- : 7.4.26
-- Browser(s) name and version -- : Firefox 61.0.6esr

Hi there,

I'v been looking for a solution, but still without success. I try to change the font-weight and color displayed by

.hikashop_product_name

(as far as I understand
<span class="hikashop_product_name">
<a rel="nofollow" title="Edit the options of the product" onclick="return window.hikashop.openBox(this);" id="popup_product_70" class="" href="http://localhost/kaixolocal/kaixolocal/index.php/magnetische-messerbloecke/product/70-messerblock-magnetisch-nussbaum-vollholz-unikat?tmpl=component" data-hk-popup="vex" data-vex="{x:1075, y:580}">Nussbaum Vollholz</a> </span>
<a rel="nofollow" title="Edit the options of the product" onclick="return window.hikashop.openBox(this);" id="popup_product_70" class="" href="http://localhost/kaixolocal/kaixolocal/index.php/magnetische-messerbloecke/product/70-messerblock-magnetisch-nussbaum-vollholz-unikat?tmpl=component" data-hk-popup="vex" data-vex="{x:1075, y:580}">Nussbaum Vollholz</a>
</span>
correct

Tried style-custom.css and frontend-custom.css via Hikashop configuration.
Firefox shows

.../templates/tp_shop/css/compiled-185d27a0b53991b3ffa7d2241b43a7c5.css?v=2.5.15
.hikashop_products_listing .hikashop_products .hikashop_product .hikashop_product_name a {
font-size: 16px;
line-height: normal;
font-weight: normal;
margin-bottom: 4px;

and
../hikashop/css/style_custom.css?t=1646212414
.hikashop_product_name a {
color: #615040;
text-decoration: none;
font-weight: 200;

display: block;
}

As far as I understand, the tp-shop templates overrides and/or filters the css rules from hikashops style_custom.css (and frontend_custom.css too).
How can I solve this issue?

TIA
Tom

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

  • Posts: 4816
  • Thank you received: 654
  • MODERATOR
3 years 1 week ago #339844

Hello,

Please in order to better understand the context and why your css don't work can you provide an Url link to the page where we can see the issue, please.
Awaiting your element to progress on your subject.

Regards

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

  • Posts: 18
  • Thank you received: 0
  • Hikashop Essential
3 years 1 week ago #339860

Hi,

sorry, because the site with the problem mentioned runs locally on my WAMPserver, it's not possible to provide a link. Further investigations showed, that the file which overrides my settings - .../templates/tp_shop/css/compiled-185d27a0b53991b3ffa7d2241b43a7c5.css?v=2.5.15 - is generated at runtime, from the Joomlaplates 'Shop' template.

Questions
1. Is ./hikashop/css/style_custom.css the correct place to put the
.hikashop_product_name a {
color: #615040;
text-decoration: none;
font-weight: 200;
display: block;
}

settings in?

2. Is there another option to reach my goal?

TIA
Tom

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

  • Posts: 4816
  • Thank you received: 654
  • MODERATOR
3 years 1 week ago #339865

Hello,

You can use "Front-end CSS File" or "Styles for the front-end", see this documentation to see how to proceed.
And here some explanations to understand how to build high priority css command :
1. First the minimum necessary to function properly :
Check that your selector is well written, good class (or Id) html and no mistake or typo
If your command is visible in your browser inspector tool, but is overridden (css command crossed out), then his priority isn't strong enough.



2. Now, some css priority system explanation :
From less to the highest priority :
.html_class_element {command: value}
.html_class_module .html_class_element {command: value}
.html_class_page .html_class_module .html_class_element {command: value}
.html_class_page .html_class_module .html_class_element {command: value !important;}


Note, that if 2 css commands have strictly the same selector, then the last written in the css file will be the one used.
Hope this will help you to achieve what you need.
Regards

The following user(s) said Thank You: web@kaixo-design.de

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

  • Posts: 18
  • Thank you received: 0
  • Hikashop Essential
3 years 1 week ago #339880

Hi Philip,

the !important directive solved the problem.

thank you.
Tom

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

  • Posts: 4816
  • Thank you received: 654
  • MODERATOR
3 years 1 week ago #339887

Hello,

Of course the "!important" is very powerful, but take care about this, because use it too quickly can leads to issue.
Regards

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

Time to create page: 0.070 seconds
Powered by Kunena Forum