Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

[Minicart] How do I display just the subtotal?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-25-2005, 08:31 AM
  EnriqueHavoc's Avatar 
EnriqueHavoc EnriqueHavoc is offline
 

eXpert
  
Join Date: Jul 2004
Posts: 232
 

Default [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?
__________________
X-Cart 4.0.12
PHP 4.3.11
MySQL 4.0.23
Linux/Apache
Net::SSLeay 1.25
libCURL libcurl/7.12.0 OpenSSL/0.9.7a zlib/1.1.4
www.ewdhosting.com
Reply With Quote
  #2  
Old 03-27-2005, 12:54 AM
  EnriqueHavoc's Avatar 
EnriqueHavoc EnriqueHavoc is offline
 

eXpert
  
Join Date: Jul 2004
Posts: 232
 

Default

Well i guess ill keep looking then
__________________
X-Cart 4.0.12
PHP 4.3.11
MySQL 4.0.23
Linux/Apache
Net::SSLeay 1.25
libCURL libcurl/7.12.0 OpenSSL/0.9.7a zlib/1.1.4
www.ewdhosting.com
Reply With Quote
  #3  
Old 03-27-2005, 05:00 PM
 
Alphatim Alphatim is offline
 

Newbie
  
Join Date: Mar 2005
Location: Portugal, Lisboa
Posts: 4
 

Default

Hello Henrique,
Code:
{$lng.lbl_subtotal}: {$cart.display_subtotal}
__________________
X-Cart: Gold 4.0.13
OS: Linux (Fedora)
PHP: 4.3.10
MySQL: 4.0.22
Reply With Quote
  #4  
Old 02-04-2006, 01:02 AM
  thundernugs's Avatar 
thundernugs thundernugs is offline
 

Senior Member
  
Join Date: May 2003
Location: Bend, OR
Posts: 117
 

Default

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?
__________________
X-Cart Gold 4.0.17 & 4.0.18
Linux Server
Hands-On Hosting
http://www.CoreCases.com - Ipod Cases
http://www.InnovativeOutlet.com - Pet Plants and other cool stuff you need
Reply With Quote
  #5  
Old 02-04-2006, 01:11 AM
  thundernugs's Avatar 
thundernugs thundernugs is offline
 

Senior Member
  
Join Date: May 2003
Location: Bend, OR
Posts: 117
 

Default

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
__________________
X-Cart Gold 4.0.17 & 4.0.18
Linux Server
Hands-On Hosting
http://www.CoreCases.com - Ipod Cases
http://www.InnovativeOutlet.com - Pet Plants and other cool stuff you need
Reply With Quote
  #6  
Old 03-14-2006, 07:26 PM
 
spence88mph spence88mph is offline
 

Advanced Member
  
Join Date: Jan 2005
Posts: 95
 

Default

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?
__________________
-------------------
4.2.2
4.1.9
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:54 PM.

   

 
X-Cart forums © 2001-2020