Post by -em- » Sun Mar 01, 2020 7:57 pm

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.

Attachments

options.PNG

options.PNG (26.48 KiB) Viewed 802 times


New member

Posts

Joined
Sun Dec 13, 2015 8:18 pm

Post by cyclops12 » 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 ??

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by xxvirusxx » Sun Mar 01, 2020 8:14 pm

You can add <hr> after each line: {% if option.type == 'radio' %}, {% if option.type == 'checkbox' %}, etc...

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by -em- » Sun Mar 01, 2020 9:16 pm

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

New member

Posts

Joined
Sun Dec 13, 2015 8:18 pm

Post by -em- » Sun Mar 01, 2020 9:17 pm

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.

New member

Posts

Joined
Sun Dec 13, 2015 8:18 pm

Post by xxvirusxx » 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.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by -em- » Sun Mar 01, 2020 9:46 pm

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. :D
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

New member

Posts

Joined
Sun Dec 13, 2015 8:18 pm

Post by xxvirusxx » 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.

Attachments

Screenshot_2020-03-01_15-49-51.png

Screenshot_2020-03-01_15-49-51.png (44.9 KiB) Viewed 716 times


Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by -em- » Sun Mar 01, 2020 10:01 pm

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!!! ;D 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....

Attachments

option 1.PNG

option 1.PNG (24.21 KiB) Viewed 708 times


New member

Posts

Joined
Sun Dec 13, 2015 8:18 pm

Post by -em- » Sun Mar 01, 2020 10:09 pm

As expected, same thing goes for bolding. Adding <strong> tag for {{ option.name }} in checkbox option type and done :D

One more question, how to make those lines a little darker or thicker?

New member

Posts

Joined
Sun Dec 13, 2015 8:18 pm

Post by xxvirusxx » 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;
}

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by -em- » Mon Mar 02, 2020 12:33 am

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!

New member

Posts

Joined
Sun Dec 13, 2015 8:18 pm
Who is online

Users browsing this forum: 7cswinery and 66 guests