Post by joydeziners » Thu Nov 19, 2015 5:47 pm

Hello,

Please help me, how to hide the tax title and tax cost in mini cart
mini-cart.PNG

mini-cart.PNG (14.48 KiB) Viewed 1540 times


Newbie

Posts

Joined
Thu Oct 08, 2015 9:07 pm
Location - India

Post by viethemes » Thu Nov 19, 2015 9:57 pm

To do that, you can open file catalog\view\theme\{your_theme}\template\common\cart.tpl
find

Code: Select all

<?php foreach ($totals as $total) { ?>
and add below code after that

Code: Select all

<?php if ( $total['title'] == 'CA TAX:' ) continue; ?>

http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension

Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme

Extra Positions PRO, Custom JavaScript, Custom CSS and others


User avatar
Active Member

Posts

Joined
Thu Jan 08, 2015 12:17 pm


Post by Time111 » Sat Sep 02, 2017 6:12 am

viethemes wrote:
Thu Nov 19, 2015 9:57 pm
To do that, you can open file catalog\view\theme\{your_theme}\template\common\cart.tpl
find

Code: Select all

<?php foreach ($totals as $total) { ?>
and add below code after that

Code: Select all

<?php if ( $total['title'] == 'CA TAX:' ) continue; ?>
its not working, im using oc 2.0.3.1, journal theme.... any inputs welcome

New member

Posts

Joined
Tue Aug 11, 2015 7:46 am

Post by webcorvo » Tue Sep 05, 2017 5:44 pm

Open file catalog\view\theme\{your_theme}\journal2\template\journal2\checkout\cart.tpl

find

Code: Select all

<?php foreach ($totals as $total) { ?>
and add below code after that

Code: Select all

<?php if ( $total['title'] == 'CA TAX' ) continue; ?>

Opencart Developer - For custom work and support contact @ webcorvo@gmail.com


User avatar
Active Member

Posts

Joined
Mon Mar 20, 2017 11:42 pm
Location - Lisbon, Portugal

Post by Time111 » Tue Sep 05, 2017 9:22 pm

hi webcorvo,

Tried your option but still no results. Please tell me if i placed your code in wrong place or I also need to replace or delete something?

file location: /public_html/catalog/view/theme/journal2/template/journal2/checkout/cart.tpl

Code: Select all

            <tfoot>
            <?php foreach ($totals as $total) { ?>
		<?php if ( $total['title'] == 'CA TAX' ) continue; ?>
                <tr>
                    <td colspan="4" class="text-right"><?php echo $total['title']; ?>:</td>
                    <td class="text-right"><?php echo $total['text']; ?></td>
                </tr>
            <?php } ?>
            </tfoot>

New member

Posts

Joined
Tue Aug 11, 2015 7:46 am

Post by webcorvo » Tue Sep 05, 2017 9:42 pm

Hi Time111
I am sorry you have reason.

This is the file is for the cart, the one that you inicial was asking for:
public_html//catalog/view/theme/journal2/template/checkout/cart.tpl

For the checkout :
public_html/catalog/view/theme/journal2/template/journal2/checkout/cart.tpl

the code is the same for the 2 pages ;)

Opencart Developer - For custom work and support contact @ webcorvo@gmail.com


User avatar
Active Member

Posts

Joined
Mon Mar 20, 2017 11:42 pm
Location - Lisbon, Portugal

Post by Time111 » Tue Sep 05, 2017 10:06 pm

Hello webcorvo,

Sorry to inform you but even if I updated both files with code, still checkout page and mini cart showing CA TAX with value.
public_html//catalog/view/theme/journal2/template/checkout/cart.tpl
public_html/catalog/view/theme/journal2/template/journal2/checkout/cart.tpl


Is it possible it is not working due to what may be given in
System > Localisation > Taxes > Tax Classes > Tax Class Title (I mentioned) CA TAX
System > Localisation > Taxes > Tax Rates > Tax Name (I mentioned) CA TAX


......... any other place also I need to mention same name, is that effecting results?

New member

Posts

Joined
Tue Aug 11, 2015 7:46 am

Post by webcorvo » Tue Sep 05, 2017 10:15 pm

Lets make a test
on the file :
public_html//catalog/view/theme/journal2/template/checkout/cart.tpl
put this code:

Code: Select all

<?php foreach ($totals as $total) { ?>
                 <?php  var_dump($total['title']);?>

will display something like this:

string(9) "Sub-Total" string(6) "CA TAX" string(5) "Total"

Copy and paste your result and send it to me

Opencart Developer - For custom work and support contact @ webcorvo@gmail.com


User avatar
Active Member

Posts

Joined
Mon Mar 20, 2017 11:42 pm
Location - Lisbon, Portugal

Post by webcorvo » Tue Sep 05, 2017 10:23 pm

Lets make a test
on the file :
public_html//catalog/view/theme/journal2/template/checkout/cart.tpl
put this code:
Code: Select all

Code: Select all

<?php foreach ($totals as $total) { ?>
                 <?php  var_dump($total['title']);?>
will display something like this:

string(9) "Sub-Total" string(6) "CA TAX" string(5) "Total"

Copy and paste your result and send it to me

Opencart Developer - For custom work and support contact @ webcorvo@gmail.com


User avatar
Active Member

Posts

Joined
Mon Mar 20, 2017 11:42 pm
Location - Lisbon, Portugal

Post by Time111 » Tue Sep 05, 2017 10:42 pm

okay now I think, the issue is something else...... whatever changes I make in "cart.tpl" nothing is reflecting on browser. not even dump what you asked for.

this is url: http://mydomainname.com/[b]index.php?ro ... ckout/cart[/b]

I even tried to add 3 colons ::: still single colon is coming, so is it cash or some other issue. if so then what settings I should change.

Code: Select all

              <tr>
                <td class="text-right right"><strong><?php echo $total['title']; ?>:::</strong></td>
                <td class="text-right right"><?php echo $total['text']; ?></td>
              </tr>

New member

Posts

Joined
Tue Aug 11, 2015 7:46 am

Post by webcorvo » Tue Sep 05, 2017 10:48 pm

can you sand me the url of your shop?

Opencart Developer - For custom work and support contact @ webcorvo@gmail.com


User avatar
Active Member

Posts

Joined
Mon Mar 20, 2017 11:42 pm
Location - Lisbon, Portugal

Post by Time111 » Tue Sep 05, 2017 11:48 pm

webcorvo wrote:
Tue Sep 05, 2017 10:48 pm
can you sand me the url of your shop?
Please check PM

New member

Posts

Joined
Tue Aug 11, 2015 7:46 am

Post by webcorvo » Wed Sep 06, 2017 12:01 am

Time111 wrote:
Tue Sep 05, 2017 11:48 pm
webcorvo wrote:
Tue Sep 05, 2017 10:48 pm
can you sand me the url of your shop?
Please check PM
ok done, active the option on settings to receive email when you receive a PM ;)

Opencart Developer - For custom work and support contact @ webcorvo@gmail.com


User avatar
Active Member

Posts

Joined
Mon Mar 20, 2017 11:42 pm
Location - Lisbon, Portugal
Who is online

Users browsing this forum: No registered users and 76 guests