Post by dani888 » Tue Oct 09, 2018 2:02 am

Hello everyone
How can I decrease the size of the text box
What is red wants to be no longer
Thank you

Attachments

review2.jpg

review2.jpg (67.28 KiB) Viewed 924 times


Active Member

Posts

Joined
Wed Feb 14, 2018 1:47 am

Post by cyclops12 » Tue Oct 09, 2018 2:51 am

Have a look in your product.twig for the review section then change the relevant <div class="col-sm-12"> to something smaller
Example: <div class="col-sm-6">

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by dani888 » Wed Oct 10, 2018 1:54 am

Hello
We found more <div class = "col-sm-12">
I do not know what to delete and if it does not affect other columns
Css code can not be changed
Thank you

Active Member

Posts

Joined
Wed Feb 14, 2018 1:47 am

Post by cyclops12 » Wed Oct 10, 2018 4:20 am

In catalog/view/theme/YOUR_THEME/template/product/product.twig find

Code: Select all

<div class="tab-pane" id="tab-review">
              <form class="form-horizontal" id="form-review">
                <div id="review"></div>
                <h2>{{ text_write }}</h2>
                {% if review_guest %}
                <div class="form-group required">
                  <div class="col-sm-12">
                    <label class="control-label" for="input-name">{{ entry_name }}</label>
                    <input type="text" name="name" value="{{ customer_name }}" id="input-name" class="form-control" />
                  </div>
                </div>
                <div class="form-group required">
                  <div class="col-sm-12">
                    <label class="control-label" for="input-review">{{ entry_review }}</label>
                    <textarea name="text" rows="5" id="input-review" class="form-control"></textarea>
                    <div class="help-block">{{ text_note }}</div>
                  </div>
                </div>
                <div class="form-group required">
                  <div class="col-sm-12">
                    <label class="control-label">{{ entry_rating }}</label>
                    &nbsp;&nbsp;&nbsp; {{ entry_bad }}&nbsp;
                    <input type="radio" name="rating" value="1" />
                    &nbsp;
                    <input type="radio" name="rating" value="2" />
                    &nbsp;
                    <input type="radio" name="rating" value="3" />
                    &nbsp;
                    <input type="radio" name="rating" value="4" />
                    &nbsp;
                    <input type="radio" name="rating" value="5" />
                    &nbsp;{{ entry_good }}</div>
                </div>
These are the three "col-sm-12" to change.
For the captcha you need to goto catalog/view/theme/YOUR_THEME/template/extension/captcha/ WHATEVER CAPTCHA FILE YOU ARE USING (normally basic.twig and look for

Code: Select all

<div class="col-sm-10">
change these values to suit

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by dani888 » Sun Oct 14, 2018 12:34 am

Hello
Thanks for your help. Now it works.
I still have a problem.
How can I reduce the size of my comment?
And the Continue button is too far away how can I move it?
Thank you

Attachments

Review 3.jpg

Review 3.jpg (67.61 KiB) Viewed 842 times


Active Member

Posts

Joined
Wed Feb 14, 2018 1:47 am

Post by cyclops12 » Sun Oct 14, 2018 2:09 am

Well if you wanted to reduce the size of all of the boxes you should have said, it would have been easier.
Remove all previous edits from product.twig.
Now in the same file find

Code: Select all

 <div class="tab-pane" id="tab-review">
              <form class="form-horizontal" id="form-review">
                <div id="review"></div>
                <h2>{{ text_write }}</h2>
                {% if review_guest %}
                <div class="form-group required">
                  <div class="col-sm-12">
                    <label class="control-label" for="input-name">{{ entry_name }}</label>
                    <input type="text" name="name" value="{{ customer_name }}" id="input-name" class="form-control" />
                  </div>
                </div>
                <div class="form-group required">
                  <div class="col-sm-12">
                    <label class="control-label" for="input-review">{{ entry_review }}</label>
                    <textarea name="text" rows="5" id="input-review" class="form-control"></textarea>
                    <div class="help-block">{{ text_note }}</div>
                  </div>
                </div>
                <div class="form-group required">
                  <div class="col-sm-12">
                    <label class="control-label">{{ entry_rating }}</label>
                    &nbsp;&nbsp;&nbsp; {{ entry_bad }}&nbsp;
                    <input type="radio" name="rating" value="1" />
                    &nbsp;
                    <input type="radio" name="rating" value="2" />
                    &nbsp;
                    <input type="radio" name="rating" value="3" />
                    &nbsp;
                    <input type="radio" name="rating" value="4" />
                    &nbsp;
                    <input type="radio" name="rating" value="5" />
                    &nbsp;{{ entry_good }}</div>
                </div>
                {{ captcha }}
                <div class="buttons clearfix">
                  <div class="pull-right">
                    <button type="button" id="button-review" data-loading-text="{{ text_loading }}" class="btn btn-primary">{{ button_continue }}</button>
                  </div>
                </div>
                {% else %}
                {{ text_login }}
                {% endif %}
              </form>
            </div>
Replace with

Code: Select all

 <div class="col-sm-9">
 <div class="tab-pane" id="tab-review">
              <form class="form-horizontal" id="form-review">
                <div id="review"></div>
                <h2>{{ text_write }}</h2>
                {% if review_guest %}
                <div class="form-group required">
                  <div class="col-sm-12">
                    <label class="control-label" for="input-name">{{ entry_name }}</label>
                    <input type="text" name="name" value="{{ customer_name }}" id="input-name" class="form-control" />
                  </div>
                </div>
                <div class="form-group required">
                  <div class="col-sm-12">
                    <label class="control-label" for="input-review">{{ entry_review }}</label>
                    <textarea name="text" rows="5" id="input-review" class="form-control"></textarea>
                    <div class="help-block">{{ text_note }}</div>
                  </div>
                </div>
                <div class="form-group required">
                  <div class="col-sm-12">
                    <label class="control-label">{{ entry_rating }}</label>
                    &nbsp;&nbsp;&nbsp; {{ entry_bad }}&nbsp;
                    <input type="radio" name="rating" value="1" />
                    &nbsp;
                    <input type="radio" name="rating" value="2" />
                    &nbsp;
                    <input type="radio" name="rating" value="3" />
                    &nbsp;
                    <input type="radio" name="rating" value="4" />
                    &nbsp;
                    <input type="radio" name="rating" value="5" />
                    &nbsp;{{ entry_good }}</div>
                </div>
                {{ captcha }}
                <div class="buttons clearfix">
                  <div class="pull-right">
                    <button type="button" id="button-review" data-loading-text="{{ text_loading }}" class="btn btn-primary">{{ button_continue }}</button>
                  </div>
                </div>
                {% else %}
                {{ text_login }}
                {% endif %}
              </form>
            </div>
           </div>
Now we have just wrapped the whole element in a sized div
You can change the <div class="col-sm-9"> with whatever suits

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by dani888 » Fri Oct 19, 2018 1:20 am

Hello
After I modified, the following error occurred
I do not know what to change
Thank you

Fatal error: Uncaught exception 'Twig_Error_Syntax' with message 'Unexpected end of template in "oc-light/template/product/product.twig" at line 637.' in C:\xampp\htdocs\opencart\system\library\template\Twig\TokenStream.php:59 Stack trace: #0 C:\xampp\htdocs\opencart\system\library\template\Twig\TokenParser\If.php(40): Twig_TokenStream->next() #1 C:\xampp\htdocs\opencart\system\library\template\Twig\Parser.php(187): Twig_TokenParser_If->parse(Object(Twig_Token)) #2 C:\xampp\htdocs\opencart\system\library\template\Twig\Parser.php(100): Twig_Parser->subparse(NULL, false) #3 C:\xampp\htdocs\opencart\system\library\template\Twig\Environment.php(619): Twig_Parser->parse(Object(Twig_TokenStream)) #4 C:\xampp\htdocs\opencart\system\library\template\Twig\Environment.php(671): Twig_Environment->parse(Object(Twig_TokenStream)) #5 C:\xampp\htdocs\opencart\system\library\template\Twig\Environment.php(396): Twig_Environment->compileSource('{{ header }}\n<d...', 'oc-light/templa...') #6 C:\xampp\htdocs\opencart\system\storage\modificat in C:\xampp\htdocs\opencart\system\library\template\Twig\TokenStream.php on line 59

Active Member

Posts

Joined
Wed Feb 14, 2018 1:47 am

Post by cyclops12 » Fri Oct 19, 2018 3:13 am

Sorry my bad try this....find in same file

Code: Select all

<div class="tab-pane" id="tab-review">
              <form class="form-horizontal" id="form-review">
                <div id="review"></div>
                <h2>{{ text_write }}</h2>
                {% if review_guest %}
                <div class="form-group required">
                  <div class="col-sm-12">
                    <label class="control-label" for="input-name">{{ entry_name }}</label>
                    <input type="text" name="name" value="{{ customer_name }}" id="input-name" class="form-control" />
                  </div>
                </div>
                <div class="form-group required">
                  <div class="col-sm-12">
                    <label class="control-label" for="input-review">{{ entry_review }}</label>
                    <textarea name="text" rows="5" id="input-review" class="form-control"></textarea>
                    <div class="help-block">{{ text_note }}</div>
                  </div>
                </div>
                <div class="form-group required">
                  <div class="col-sm-12">
                    <label class="control-label">{{ entry_rating }}</label>
                    &nbsp;&nbsp;&nbsp; {{ entry_bad }}&nbsp;
                    <input type="radio" name="rating" value="1" />
                    &nbsp;
                    <input type="radio" name="rating" value="2" />
                    &nbsp;
                    <input type="radio" name="rating" value="3" />
                    &nbsp;
                    <input type="radio" name="rating" value="4" />
                    &nbsp;
                    <input type="radio" name="rating" value="5" />
                    &nbsp;{{ entry_good }}</div>
                </div>
                {{ captcha }}
                <div class="buttons clearfix">
                  <div class="pull-right">
                    <button type="button" id="button-review" data-loading-text="{{ text_loading }}" class="btn btn-primary">{{ button_continue }}</button>
                  </div>
                </div>
                {% else %}
                {{ text_login }}
                {% endif %}
              </form>
            </div>
And replace with

Code: Select all

 <div class="tab-pane" id="tab-review">
			 <div class="col-sm-9">
              <form class="form-horizontal" id="form-review">
                <div id="review"></div>
                <h2>{{ text_write }}</h2>
                {% if review_guest %}
                <div class="form-group required">
                  <div class="col-sm-12">
                    <label class="control-label" for="input-name">{{ entry_name }}</label>
                    <input type="text" name="name" value="{{ customer_name }}" id="input-name" class="form-control" />
                  </div>
                </div>
                <div class="form-group required">
                  <div class="col-sm-12">
                    <label class="control-label" for="input-review">{{ entry_review }}</label>
                    <textarea name="text" rows="5" id="input-review" class="form-control"></textarea>
                    <div class="help-block">{{ text_note }}</div>
                  </div>
                </div>
                <div class="form-group required">
                  <div class="col-sm-12">
                    <label class="control-label">{{ entry_rating }}</label>
                    &nbsp;&nbsp;&nbsp; {{ entry_bad }}&nbsp;
                    <input type="radio" name="rating" value="1" />
                    &nbsp;
                    <input type="radio" name="rating" value="2" />
                    &nbsp;
                    <input type="radio" name="rating" value="3" />
                    &nbsp;
                    <input type="radio" name="rating" value="4" />
                    &nbsp;
                    <input type="radio" name="rating" value="5" />
                    &nbsp;{{ entry_good }}</div>
                </div>
                {{ captcha }}
                <div class="buttons clearfix">
                  <div class="pull-right">
                    <button type="button" id="button-review" data-loading-text="{{ text_loading }}" class="btn btn-primary">{{ button_continue }}</button>
                  </div>
                </div>
				</div>
                {% else %}
                {{ text_login }}
                {% endif %}
              </form>
            </div>
			

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by dani888 » Sat Oct 20, 2018 1:15 am

Hello
If I copy all the code it does not work
I just picked up the lines that I saw modified and I added the code
Now it works but it has Related products.
What else do I have to do?
Thank you

Attachments

Related products.jpg

Related products.jpg (48.24 KiB) Viewed 750 times


Active Member

Posts

Joined
Wed Feb 14, 2018 1:47 am

Post by cyclops12 » Sat Oct 20, 2018 4:05 am

Right now i have found out you are using a different theme remove all previous edits i suggested then....
In your product.twig find

Code: Select all

 <div class="tab-pane" id="tab-review">
Add directly underneath

Code: Select all

<div class="row">
			<div class="col-sm-6">
Then find

Code: Select all

{% else %}
                {{ text_login }}
                {% endif %}
Add directly above

Code: Select all

</div>
				</div>

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by dani888 » Sun Oct 21, 2018 2:00 am

Hello
This is my code product.twig
We did not find the following code line
<div class="tab-pane" id="tab-review">
Thank you

<ul class="nav nav-tabs">
<li class="active"><a href="#tab-description" data-toggle="tab">{{ tab_description }}</a></li>
{% if attribute_groups %}
<li><a href="#tab-specification" data-toggle="tab">{{ tab_attribute }}</a></li>
{% endif %}
{% if review_status %}
<li><a href="#tab-review" data-toggle="tab">{{ tab_review }}</a></li>
{% endif %}
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab-description">{{ description }}</div>
{% if attribute_groups %}
<div class="tab-pane" id="tab-specification">
<table class="table table-bordered">
{% for attribute_group in attribute_groups %}
<thead>
<tr>
<td colspan="2"><strong>{{ attribute_group.name }}</strong></td>
</tr>
</thead>
<tbody>
{% for attribute in attribute_group.attribute %}
<tr>
<td>{{ attribute.name }}</td>
<td>{{ attribute.text }}</td>
</tr>
{% endfor %}
</tbody>
{% endfor %}
</table>
</div>
{% endif %}
{% if review_status %}
<form class="form-horizontal" id="form-review">
<div id="review"></div>
<h2>{{ text_write }}</h2>
{% if review_guest %}
<div class="form-group required">
<div class="col-sm-12">
<label class="control-label" for="input-name">{{ entry_name }}</label>
<input type="text" name="name" value="{{ customer_name }}" id="input-name" class="form-control" />
</div>
</div>
<div class="form-group required">
<div class="col-sm-12">
<label class="control-label" for="input-review">{{ entry_review }}</label>
<textarea name="text" rows="5" id="input-review" class="form-control"></textarea>
<div class="help-block">{{ text_note }}</div>
</div>
</div>
<div class="form-group required">
<div class="col-sm-12">
<label class="control-label">{{ entry_rating }}</label>
&nbsp;&nbsp;&nbsp; {{ entry_bad }}&nbsp;
<input type="radio" name="rating" value="1" />
&nbsp;
<input type="radio" name="rating" value="2" />
&nbsp;
<input type="radio" name="rating" value="3" />
&nbsp;
<input type="radio" name="rating" value="4" />
&nbsp;
<input type="radio" name="rating" value="5" />
&nbsp;{{ entry_good }}</div>
</div>
{{ captcha }}
<div class="buttons clearfix">
<div class="pull-right">
<button type="button" id="button-review" data-loading-text="{{ text_loading }}" class="btn btn-primary">{{ button_continue }}</button>
</div>
</div>
{% else %}
{{ text_login }}
{% endif %}
</form>
</div>
{% endif %}</div>

Active Member

Posts

Joined
Wed Feb 14, 2018 1:47 am

Post by straightlight » Sun Oct 21, 2018 2:33 am

We did not find the following code line
<div class="tab-pane" id="tab-review">

Code: Select all

{% if review_status %}
              <div class="tab-pane" id="tab-review">
                <form class="form-horizontal" id="form-review">
                  <div id="review"></div>
For OC v3.1x release, it would be:

Code: Select all

<div class="tab-pane fade" id="tab-review" role="tabpanel" aria-labelledby="review-tab">
If you do not see this line, then you are using a custom theme. Either post your URL or contact the extension theme developer to resolved this issue.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: JNeuhoff, nonnedelectari and 104 guests