About removing prices next to options as in this image http://prntscr.com/ivi1rb ....I have followed this topic regarding opencart 2.x http://forum.opencart.com/viewtopic.php?t=82023, but it doesn't work on OC3.
Any suggestions?
thanks
Any suggestions?
thanks
Remove the mentioned lines entirely rather commenting them out and make a backup.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
in catalog/controller/product/product.php
$product_option_value_data[] = array(
'product_option_value_id' => $option_value['product_option_value_id'],
'option_value_id' => $option_value['option_value_id'],
'name' => $option_value['name'],
'image' => $this->model_tool_image->resize($option_value['image'], 50, 50),
'price' => $price,
'price_prefix' => $option_value['price_prefix']
);
}
removed line 328 .... 'price' => $price,
I have also changed in 'price' => '',
but doesn't work
$product_option_value_data[] = array(
'product_option_value_id' => $option_value['product_option_value_id'],
'option_value_id' => $option_value['option_value_id'],
'name' => $option_value['name'],
'image' => $this->model_tool_image->resize($option_value['image'], 50, 50),
'price' => $price,
'price_prefix' => $option_value['price_prefix']
);
}
removed line 328 .... 'price' => $price,
I have also changed in 'price' => '',
but doesn't work
Solved !
in catalog/view/theme/mytheme/template/product/product.twig
{% if option.type == 'radio' %}
<div class="form-group{% if option.required %} required {% endif %}">
<label class="control-label">{{ option.name }}</label>
<div id="input-option{{ option.product_option_id }}">
{% for option_value in option.product_option_value %}
<div class="radio">
<label>
<input type="radio" name="option[{{ option.product_option_id }}]" value="{{ option_value.product_option_value_id }}" />
{% if option_value.image %} <img src="{{ option_value.image }}" alt="{{ option_value.name }} {% if option_value.price %} {{ option_value.price_prefix }} {{ option_value.price }} {% endif %}" class="img-thumbnail" /> {% endif %}
{{ option_value.name }}
{% if option_value.price %}
>>>> SEE HERE {# ({{ option_value.price_prefix }}{{ option_value.price }}) comment this line to hide price options #}
{% endif %}
</div>
{% endfor %}
</div>
</div>
{% endif %}
in catalog/view/theme/mytheme/template/product/product.twig
{% if option.type == 'radio' %}
<div class="form-group{% if option.required %} required {% endif %}">
<label class="control-label">{{ option.name }}</label>
<div id="input-option{{ option.product_option_id }}">
{% for option_value in option.product_option_value %}
<div class="radio">
<label>
<input type="radio" name="option[{{ option.product_option_id }}]" value="{{ option_value.product_option_value_id }}" />
{% if option_value.image %} <img src="{{ option_value.image }}" alt="{{ option_value.name }} {% if option_value.price %} {{ option_value.price_prefix }} {{ option_value.price }} {% endif %}" class="img-thumbnail" /> {% endif %}
{{ option_value.name }}
{% if option_value.price %}
>>>> SEE HERE {# ({{ option_value.price_prefix }}{{ option_value.price }}) comment this line to hide price options #}
{% endif %}
</div>
{% endfor %}
</div>
</div>
{% endif %}
Can anyone explain me what to change and how to change it in order to remove the option prices showing?
I'm in OC 3 and using Journal theme
I'm in OC 3 and using Journal theme
The instructions are posted … right above. However, since you use Journal theme, contact the Journal support for assistance.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Hi
1. Log in to admin
2. Navigate to Design>Theme Editor
3. Open product/product.twig
4. Line 374 Replace {% if option_value.price and optionPrice %} to {% if not option_value.price and optionPrice %}
5. Save and go to see the change in the Product option price.
Love Opencart
1. Log in to admin
2. Navigate to Design>Theme Editor
3. Open product/product.twig
4. Line 374 Replace {% if option_value.price and optionPrice %} to {% if not option_value.price and optionPrice %}
5. Save and go to see the change in the Product option price.
Love Opencart

hello my twig file seems slightly different, tried a few bits, nothing seemed to hide the option price showing :-( no themes, only one mod which is a different option mod
{% if option.type == 'radio' %}
<div class="form-group{% if option.required %} required {% endif %}">
<label class="control-label">{{ option.name }}</label>
<div id="input-option{{ option.product_option_id }}"> {% for option_value in option.product_option_value %}
<div class="radio">
<label>
<input type="radio" name="option[{{ option.product_option_id }}]" value="{{ option_value.product_option_value_id }}" />
{% if option_value.image %} <img src="{{ option_value.image }}" alt="{{ option_value.name }} {% if option_value.price %} {{ option_value.price_prefix }} {{ option_value.price }} {% endif %}" class="img-thumbnail" /> {% endif %}
{{ option_value.name }}
{% if option_value.price %}
({{ option_value.price_prefix }}{{ option_value.price }})
{% endif %} </label>
{% if option.type == 'radio' %}
<div class="form-group{% if option.required %} required {% endif %}">
<label class="control-label">{{ option.name }}</label>
<div id="input-option{{ option.product_option_id }}"> {% for option_value in option.product_option_value %}
<div class="radio">
<label>
<input type="radio" name="option[{{ option.product_option_id }}]" value="{{ option_value.product_option_value_id }}" />
{% if option_value.image %} <img src="{{ option_value.image }}" alt="{{ option_value.name }} {% if option_value.price %} {{ option_value.price_prefix }} {{ option_value.price }} {% endif %}" class="img-thumbnail" /> {% endif %}
{{ option_value.name }}
{% if option_value.price %}
({{ option_value.price_prefix }}{{ option_value.price }})
{% endif %} </label>
Make a backup and remove the bold text. Probably. But again: this is not a Journal support forum.madmikefalkirk wrote: ↑Mon Aug 23, 2021 5:53 pmhello my twig file seems slightly different, tried a few bits, nothing seemed to hide the option price showing :-( no themes, only one mod which is a different option mod
{% if option.type == 'radio' %}
<div class="form-group{% if option.required %} required {% endif %}">
<label class="control-label">{{ option.name }}</label>
<div id="input-option{{ option.product_option_id }}"> {% for option_value in option.product_option_value %}
<div class="radio">
<label>
<input type="radio" name="option[{{ option.product_option_id }}]" value="{{ option_value.product_option_value_id }}" />
{% if option_value.image %} <img src="{{ option_value.image }}" alt="{{ option_value.name }} {% if option_value.price %} {{ option_value.price_prefix }} {{ option_value.price }} {% endif %}" class="img-thumbnail" /> {% endif %}
{{ option_value.name }}
{% if option_value.price %}
({{ option_value.price_prefix }}{{ option_value.price }})
{% endif %} </label>
Last edited by Johnathan on Mon Aug 23, 2021 9:30 pm, edited 1 time in total.
Gergely wrote: ↑Mon Aug 23, 2021 6:31 pmMake a backup and remove the bold text. Probably. But again: this is not a Journal support forum.madmikefalkirk wrote: ↑Mon Aug 23, 2021 5:53 pmhello my twig file seems slightly different, tried a few bits, nothing seemed to hide the option price showing :-( no themes, only one mod which is a different option mod
{% if option.type == 'radio' %}
<div class="form-group{% if option.required %} required {% endif %}">
<label class="control-label">{{ option.name }}</label>
<div id="input-option{{ option.product_option_id }}"> {% for option_value in option.product_option_value %}
<div class="radio">
<label>
<input type="radio" name="option[{{ option.product_option_id }}]" value="{{ option_value.product_option_value_id }}" />
{% if option_value.image %} <img src="{{ option_value.image }}" alt="{{ option_value.name }} {% if option_value.price %} {{ option_value.price_prefix }} {{ option_value.price }} {% endif %}" class="img-thumbnail" /> {% endif %}
{{ option_value.name }}
{% if option_value.price %}
({{ option_value.price_prefix }}{{ option_value.price }})
{% endif %} </label>
Well, that is for radio type options only. You would need to do this for all types separately.madmikefalkirk wrote: ↑Mon Aug 23, 2021 6:59 pmdid not seem to change anything (cleared cache ect and ctrl+f5)
But I'm glad you found an extension. Just go with that solution, that way you can avoid manually modifying any template files.
Gergely wrote: ↑Mon Aug 23, 2021 8:11 pmWell, that is for radio type options only. You would need to do this for all types separately.Gergely wrote: ↑Mon Aug 23, 2021 6:31 pmMake a backup and remove the bold text. Probably. But again: this is not a Journal support forum.madmikefalkirk wrote: ↑Mon Aug 23, 2021 5:53 pmhello my twig file seems slightly different, tried a few bits, nothing seemed to hide the option price showing :-( no themes, only one mod which is a different option mod
{% if option.type == 'radio' %}
<div class="form-group{% if option.required %} required {% endif %}">
<label class="control-label">{{ option.name }}</label>
<div id="input-option{{ option.product_option_id }}"> {% for option_value in option.product_option_value %}
<div class="radio">
<label>
<input type="radio" name="option[{{ option.product_option_id }}]" value="{{ option_value.product_option_value_id }}" />
{% if option_value.image %} <img src="{{ option_value.image }}" alt="{{ option_value.name }} {% if option_value.price %} {{ option_value.price_prefix }} {{ option_value.price }} {% endif %}" class="img-thumbnail" /> {% endif %}
{{ option_value.name }}
{% if option_value.price %}
({{ option_value.price_prefix }}{{ option_value.price }})
{% endif %} </label>
But I'm glad you found an extension. Just go with that solution, that way you can avoid manually modifying any template files.
The solution I suggested has been tested on a bare bones, no-mod, fresh vanilla opencart (3.0.3.7) installation, and it works. (Obviously, since any opportunity to render the option price is removed from the view...) If it's not working for you, the culprit is probably the "different option mod" you mentioned before.madmikefalkirk wrote: ↑Mon Aug 23, 2021 7:02 pmhttps://www.opencart.com/index.php?rout ... b173ce7f4a
found this ocmod for free !
Also, the link to the extension that worked for you is not universal. Please update this, so it can be followed! Then, if you consider the issue resolved, please add [Solved] to the topic title.
heeyy... help me somebodyyy.... i was using ocmod for freee,,, but doesn't work.. and get an errorrr for my website... like picture in the belowmadmikefalkirk wrote: ↑Mon Aug 23, 2021 7:02 pmhttps://www.opencart.com/index.php?rout ... n_id=12331
found this ocmod for free !
Attachments
attach6-error-not-work.png (33.63 KiB) Viewed 7581 times
Contact the extension developer to resolve this issue. Otherwise, you could always create a new service request in the Commercial Support section of the forum to have this issue solved as a custom job.Satya - Safiramedia wrote: ↑Tue Jun 21, 2022 11:54 pmheeyy... help me somebodyyy.... i was using ocmod for freee,,, but doesn't work.. and get an errorrr for my website... like picture in the belowmadmikefalkirk wrote: ↑Mon Aug 23, 2021 7:02 pmhttps://www.opencart.com/index.php?rout ... n_id=12331
found this ocmod for free !
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
it's a bit simply, just delete this line
if you need to hide action prices, delete this line also
Code: Select all
<h2>{{ price }}</h2>
Code: Select all
<h2>{{ special }}</h2>
For the default theme, maybe. However, the original request on the topic was in regard to Journal Framework which is not supported on the forum.botva wrote: ↑Wed May 03, 2023 6:12 pmit's a bit simply, just delete this lineif you need to hide action prices, delete this line alsoCode: Select all
<h2>{{ price }}</h2>
Code: Select all
<h2>{{ special }}</h2>
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 18 guests