Remove Price for one product only

  • Posts: 27
  • Thank you received: 1
3 years 6 months ago #335542

-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.9.5
-- PHP version -- : 7.4.20
-- Browser(s) name and version -- : Chrome & Version 87.0.4280.141 (Official Build) (64-bit)

We have multiple products on our shop both at cost and free. We need to be able to hide a price for one product only, but still have other products show the price or say free.
I have seen other cases where they override the "Free" text so that it does not display, but we still require this for other products. Is there any way around this.

Please let me know if there is already a forum case for this. I couldn't find any solution.

Thanks
Mike

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

  • Posts: 4816
  • Thank you received: 654
  • MODERATOR
3 years 6 months ago #335547

Hello,

There are one quick solution for this specific needs some custom Css command, follow me step by step :
1. Have a look on this tutorial to learn how to add some custom css command to your frontend file.
2. Create a page specific selector, in order to have a command css apply only where it's required.
Example :

.page_specific class .price_container_class {
          display: none; // To hide it
     }
3. In order to be able to create a good selector (with a high priority AND specificity) some advices :
.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

Last edit: 3 years 6 months ago by Philip.
The following user(s) said Thank You: mikeflan

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

Time to create page: 0.042 seconds
Powered by Kunena Forum