Page 1 of 1
[SOLVED] - Make changes in available options
Posted: Sun Mar 01, 2020 7:57 pm
by -em-
Greetings,
I want to make a few changes in the available options, like bold titles and separate them with lines.
As shown in the picture, what is highlighted needs to be bold and where there is the red line, needs to be added a separation line.
Is it possible? I tried myself but had no luck so far.
Thanks in advance.
Re: Make changes in available options
Posted: Sun Mar 01, 2020 8:00 pm
by cyclops12
A link to your site will help others help you
What have you already tried ?
Have you cleared ALL caches ??
Re: Make changes in available options
Posted: Sun Mar 01, 2020 8:14 pm
by xxvirusxx
You can add <hr> after each line: {% if option.type == 'radio' %}, {% if option.type == 'checkbox' %}, etc...
Re: Make changes in available options
Posted: Sun Mar 01, 2020 9:16 pm
by -em-
cyclops12 wrote: ↑Sun Mar 01, 2020 8:00 pm
A link to your site will help others help you
What have you already tried ?
Have you cleared ALL caches ??
The website link and product page is
here
I have tried to edit product.twig in public_html/catalog/view/theme/simplica/template/product but no changes appeared.
"Have you cleared ALL caches ??"
It may sound as a stupid question, but should I clear all the caches?
Thank you
Re: Make changes in available options
Posted: Sun Mar 01, 2020 9:17 pm
by -em-
xxvirusxx wrote: ↑Sun Mar 01, 2020 8:14 pm
You can add <hr> after each line:
{% if option.type == 'radio' %},
{% if option.type == 'checkbox' %}, etc...
done, but no changes.
Re: Make changes in available options
Posted: Sun Mar 01, 2020 9:18 pm
by xxvirusxx
Don't forget to refresh Ocmod modifications, clear Theme cache and Sass cache from Dashboard, right top gear.
Re: Make changes in available options
Posted: Sun Mar 01, 2020 9:46 pm
by -em-
xxvirusxx wrote: ↑Sun Mar 01, 2020 9:18 pm
Don't forget to refresh Ocmod modifications, clear Theme cache and Sass cache from Dashboard, right top gear.
well now I can see all the changes I'm making.
Still, adding lines exactly where I want isn't so easy. Same for bolding text.
Code: Select all
<div id="product"> {% if options %}
<hr>
<h3>{{ text_option }}</h3>
{% for option in options %}
{% if option.type == 'select' %}
<div class="form-group{% if option.required %} required {% endif %}">
<label class="control-label" for="input-option{{ option.product_option_id }}">{{ option.name }}</label>
<select name="option[{{ option.product_option_id }}]" id="input-option{{ option.product_option_id }}" class="form-control">
<option value="">{{ text_select }}</option>
{% for option_value in option.product_option_value %}
<option value="{{ option_value.product_option_value_id }}">{{ option_value.name }}
{% if option_value.price %}
({{ option_value.price_prefix }}{{ option_value.price }})
{% endif %} </option>
{% endfor %}
</select>
</div>
{% endif %}
For example if HR is placed as shown above, a line is added after each drop down list option
Re: Make changes in available options
Posted: Sun Mar 01, 2020 9:51 pm
by xxvirusxx
-em- wrote: ↑Sun Mar 01, 2020 9:46 pm
Still, adding lines exactly where I want isn't so easy.
Like this?
For bold, size...you can make CSS changes.
Re: Make changes in available options
Posted: Sun Mar 01, 2020 10:01 pm
by -em-
xxvirusxx wrote: ↑Sun Mar 01, 2020 9:51 pm
-em- wrote: ↑Sun Mar 01, 2020 9:46 pm
Still, adding lines exactly where I want isn't so easy.
Like this?
For bold, size...you can make CSS changes.
I did it!!!

You helped me a lot with the thene refresh!!!
If you see the picture, there is a text line "OCHI DREPT" which is made as a checkbox option whithout options so it appeares as a title. I had only to add a line before it and voi la, done.
Now for the text bolding....
Re: Make changes in available options
Posted: Sun Mar 01, 2020 10:09 pm
by -em-
As expected, same thing goes for bolding. Adding <strong> tag for {{ option.name }} in checkbox option type and done
One more question, how to make those lines a little darker or thicker?
Re: [SOLVED] - Make changes in available options
Posted: Sun Mar 01, 2020 10:28 pm
by xxvirusxx
You can replace
<hr> with
<hr class="my_hr"> then in you theme css you can use:
Code: Select all
hr.my_hr{
border-top: 6px solid #8c8b8b;
}
Re: [SOLVED] - Make changes in available options
Posted: Mon Mar 02, 2020 12:33 am
by -em-
xxvirusxx wrote: ↑Sun Mar 01, 2020 10:28 pm
You can replace
<hr> with
<hr class="my_hr"> then in you theme css you can use:
Code: Select all
hr.my_hr{
border-top: 6px solid #8c8b8b;
}
Will try for sure.
Thanks!