X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   [Minicart] How do I display just the subtotal? (https://forum.x-cart.com/showthread.php?t=13014)

EnriqueHavoc 03-25-2005 08:31 AM

[Minicart] How do I display just the subtotal?
 
I would like to know how to display just the subtotal (without tax or shipping charges) in customer/main/minicart.tpl.

Ive searched and it seems a couple people, including myself, have been wondering the answer to this for awhile.

In customer/main/cart_totals.tpl it has something to do with this code:

Quote:

{assign var="subtotal" value=$cart.subtotal}
{include file="currency.tpl" value=$cart.display_subtotal}

but since im not a coder, i cant figure out how to call it from the minicart.

Also, while were dealing with the minicart- I would also like to find out how to fix the item display to always show the true amount of items in the cart (Quantity 2 of Item A should show as Items: 2). Boomer coded a mod to do it for 3.x but as reported by someone it does not seem to work in 4.x


Both have been discussed in various threads over the past year but no definitive answers have been found, therefore I am starting a new thread. Anybody want to take another stab at it?

EnriqueHavoc 03-27-2005 12:54 AM

Well i guess ill keep looking then

Alphatim 03-27-2005 05:00 PM

Hello Henrique,
Code:

{$lng.lbl_subtotal}: {$cart.display_subtotal}

thundernugs 02-04-2006 01:02 AM

just change your minicart.tpl to this:

Code:

{* $Id: minicart.tpl,v 1.12 2004/07/06 14:00:12 svowl Exp $ *}
<TABLE border="0" cellpadding="1" cellspacing="0">
<TR>
<TD rowspan="2" width="23">
{if $minicart_total_items > 0}[img]{$ImagesDir}/cart_full.gif[/img]{else}[img]{$ImagesDir}/cart_empty.gif[/img]{/if}
</TD>
<TD class="VertMenuItems">{if $minicart_total_items > 0}{$lng.lbl_items}: </TD>
<TD class="VertMenuItems"

color="#0000ff">{$minicart_total_items}{else}<CENTER>{$lng.lbl_cart_is_empty}</CENTE

R>{/if}</TD>
</TR>
<TR>
<TD class="VertMenuItems">{if $minicart_total_items > 0}{$lng.lbl_total}: </TD>
<TD class="VertMenuItems">{include file="currency.tpl"

value=$cart.display_subtotal}{/if}</TD>
</TR>
</TABLE>
<HR size="1" NOSHADE class="VertMenuHr">


mike

UPDATE - actually this only works when under cart.php (ie during checkout) - otherwise the subtotal is $0, anyone got any ideas?

thundernugs 02-04-2006 01:11 AM

enrique, here is the mod to fix the minicart # of items issue in 4.0.x

http://forum.x-cart.com/viewtopic.php?t=25846

spence88mph 03-14-2006 07:26 PM

did anyone ever work this out

I want the minicart to show the subtotal without tax, so far I have:

$MINICART["total_cost"] = $cart["display_subtotal"];

but if you're logged in and displaying a tax free country, it alters the subtotal to the tax free price, any ideas?


All times are GMT -8. The time now is 05:25 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.