Post by opensab677 » Sat Mar 24, 2018 4:55 am

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

New member

Posts

Joined
Mon Sep 04, 2017 7:54 pm

Post by straightlight » Sat Mar 24, 2018 5:26 am

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


Legendary Member

Posts

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

Post by opensab677 » Sat Mar 24, 2018 3:57 pm

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

New member

Posts

Joined
Mon Sep 04, 2017 7:54 pm

Post by opensab677 » Sat Mar 24, 2018 5:16 pm

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 %}

New member

Posts

Joined
Mon Sep 04, 2017 7:54 pm

Post by FazalFariz » Tue Aug 21, 2018 5:50 pm

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

Newbie

Posts

Joined
Fri Aug 10, 2018 7:06 pm

Post by straightlight » Tue Aug 21, 2018 5:52 pm

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


Legendary Member

Posts

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

Post by gabbya » Tue Aug 25, 2020 2:43 pm

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 :-*

User avatar
New member

Posts

Joined
Sun May 06, 2012 11:39 pm

Post by madmikefalkirk » Mon Aug 23, 2021 5:53 pm

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>

New member

Posts

Joined
Fri Nov 06, 2015 6:53 pm

Post by Gergely » Mon Aug 23, 2021 6:31 pm

madmikefalkirk wrote:
Mon Aug 23, 2021 5:53 pm
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>
Make a backup and remove the bold text. Probably. But again: this is not a Journal support forum.

Active Member

Posts

Joined
Wed Sep 30, 2020 7:58 pm

Post by madmikefalkirk » Mon Aug 23, 2021 6:55 pm

i dont have journal, on my install its pretty much bare bones, will try this

New member

Posts

Joined
Fri Nov 06, 2015 6:53 pm

Post by madmikefalkirk » Mon Aug 23, 2021 6:59 pm

did not seem to change anything (cleared cashe ect and ctrl+f5)

New member

Posts

Joined
Fri Nov 06, 2015 6:53 pm

Post by madmikefalkirk » Mon Aug 23, 2021 7:02 pm

Last edited by Johnathan on Mon Aug 23, 2021 9:30 pm, edited 1 time in total.

New member

Posts

Joined
Fri Nov 06, 2015 6:53 pm

Post by Gergely » Mon Aug 23, 2021 8:11 pm

Gergely wrote:
Mon Aug 23, 2021 6:31 pm
madmikefalkirk wrote:
Mon Aug 23, 2021 5:53 pm
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>
Make a backup and remove the bold text. Probably. But again: this is not a Journal support forum.

madmikefalkirk wrote:
Mon Aug 23, 2021 6:59 pm
did not seem to change anything (cleared cache ect and ctrl+f5)
Well, that is for radio type options only. You would need to do this for all types separately.

But I'm glad you found an extension. Just go with that solution, that way you can avoid manually modifying any template files.

Active Member

Posts

Joined
Wed Sep 30, 2020 7:58 pm

Post by madmikefalkirk » Mon Aug 23, 2021 8:46 pm

it was a radio button option i was using too :-p

New member

Posts

Joined
Fri Nov 06, 2015 6:53 pm

Post by Gergely » Mon Aug 23, 2021 10:05 pm

Gergely wrote:
Mon Aug 23, 2021 8:11 pm
Gergely wrote:
Mon Aug 23, 2021 6:31 pm
madmikefalkirk wrote:
Mon Aug 23, 2021 5:53 pm
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>
Make a backup and remove the bold text. Probably. But again: this is not a Journal support forum.
Well, that is for radio type options only. You would need to do this for all types separately.
But I'm glad you found an extension. Just go with that solution, that way you can avoid manually modifying any template files.
madmikefalkirk wrote:
Mon Aug 23, 2021 7:02 pm
https://www.opencart.com/index.php?rout ... b173ce7f4a

found this ocmod for free !
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.

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.

Active Member

Posts

Joined
Wed Sep 30, 2020 7:58 pm

Post by Satya - Safiramedia » Tue Jun 21, 2022 11:54 pm

madmikefalkirk wrote:
Mon Aug 23, 2021 7:02 pm
https://www.opencart.com/index.php?rout ... n_id=12331

found this ocmod for free !

 
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 below

Attachments

attach6-error-not-work.png

attach6-error-not-work.png (33.63 KiB) Viewed 7581 times


User avatar
New member

Posts

Joined
Tue Jun 15, 2021 10:56 am
Location - Indonesia

Post by straightlight » Wed Jun 22, 2022 10:15 am

Satya - Safiramedia wrote:
Tue Jun 21, 2022 11:54 pm
madmikefalkirk wrote:
Mon Aug 23, 2021 7:02 pm
https://www.opencart.com/index.php?rout ... n_id=12331

found this ocmod for free !

 
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 below
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.

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

Post by botva » Wed May 03, 2023 6:12 pm

it's a bit simply, just delete this line

Code: Select all

<h2>{{ price }}</h2>
if you need to hide action prices, delete this line also

Code: Select all

<h2>{{ special }}</h2>

Newbie

Posts

Joined
Sat Mar 25, 2023 2:02 pm

Post by straightlight » Thu May 04, 2023 4:41 am

botva wrote:
Wed May 03, 2023 6:12 pm
it's a bit simply, just delete this line

Code: Select all

<h2>{{ price }}</h2>
if you need to hide action prices, delete this line also

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.

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: No registered users and 18 guests