Post by RizoMan » Wed Jul 29, 2020 11:42 am

Hi!
I have this
Image

But i want this, Hide shipping method price ONLY if it equals 0.
Image

New member

Posts

Joined
Sun Apr 26, 2020 6:26 am

Post by pprmkr » Wed Jul 29, 2020 2:10 pm

Install using Extensions - Installer
Refresh Extensions - Modifications

When helpful: show appriciation

Attachments


User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by letxobnav » Wed Jul 29, 2020 2:13 pm

in catalog/view/theme/default/template/checkout/shipping_method.php

you could change:

Code: Select all

{{ quote.title }} - {{ quote.text }}</label>
to:

Code: Select all

{{ quote.title }}{% if quote.cost > 0.00 %} - {{ quote.text }}{% endif %}</label>

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by RizoMan » Wed Jul 29, 2020 2:46 pm

Solved by myself.

change to this in the catalog->view->theme->default->template->checkout->shipping_method.twig

Image

New member

Posts

Joined
Sun Apr 26, 2020 6:26 am

Post by RizoMan » Wed Jul 29, 2020 2:48 pm

letxobnav wrote:
Wed Jul 29, 2020 2:13 pm
in catalog/view/theme/default/template/checkout/shipping_method.php

you could change:

Code: Select all

{{ quote.title }} - {{ quote.text }}</label>
to:

Code: Select all

{{ quote.title }}{% if quote.cost > 0.00 %} - {{ quote.text }}{% endif %}</label>
Sorry!!

While making my answer you raised yours hahaha,
Anyway, come to the same conclusion, thanks for responding!

New member

Posts

Joined
Sun Apr 26, 2020 6:26 am

Post by thekrotek » Wed Jul 29, 2020 2:49 pm

letxobnav wrote:
Wed Jul 29, 2020 2:13 pm
in catalog/view/theme/default/template/checkout/shipping_method.php
Editing core files is always a bad idea.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by letxobnav » Wed Jul 29, 2020 2:59 pm

only you mention core files.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by letxobnav » Wed Jul 29, 2020 3:01 pm

Anyway, come to the same conclusion, thanks for responding!
no, quote.text is a string including the currency code so quote.text != 0 is always true.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan
Who is online

Users browsing this forum: No registered users and 13 guests