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

Advanced Cart Mod

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 05-08-2007, 03:03 AM
 
ProMuscles ProMuscles is offline
 

Advanced Member
  
Join Date: Apr 2007
Posts: 45
 

Default Re: Advanced Cart Mod

great mod but takes up too much space
__________________
4.7.5 Gold Glory be to God!
Reply With Quote
  #12  
Old 05-21-2007, 06:49 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Advanced Cart Mod

I have played around with this minicart and like it a little better, but I still have a problem with the total not showing the discounted total. Is there a way to get parts of /modules/Fast_Lane_Checkout/cart_subtotal.tpl to work in the minicart?

ProMuscles:
Here is a change so it would work width wise on my layout. This way only takes up the same width as the standard menu template. No more neat remove button but it does have a text remove option below each item.

Code:
{* $Id: cart_subtotal.tpl,v 1.5.2.1 2006/06/16 10:47:44 max Exp $ *} <div align="right"> {assign var="subtotal" value=$cart.subtotal} {assign var="discounted_subtotal" value=$cart.discounted_subtotal} <table cellpadding="3" cellspacing="0" width="30%"> <tr> <td nowrap="nowrap"><font class="FormButton" style="text-transform: uppercase;">{$lng.lbl_subtotal}:</font></td> <td><img src="{$ImagesDir}/null.gif" width="5" height="1" alt="" /><br /></td> <td nowrap="nowrap" align="right"><font class="ProductPriceSmall">{include file="currency.tpl" value=$cart.display_subtotal}</font></td> <td nowrap="nowrap" align="right">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$cart.display_subtotal}</td> </tr> {if $cart.discount gt 0} <tr> <td nowrap="nowrap"><font class="FormButton">{$lng.lbl_discount}:</font></td> <td><img src="{$ImagesDir}/null.gif" width="5" height="1" alt="" /><br /></td> <td nowrap="nowrap" align="right"><font class="ProductPriceSmall">{include file="currency.tpl" value=$cart.discount}</font></td> <td nowrap="nowrap" align="right">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$cart.discount}</td> </tr> {/if} {if $cart.coupon_discount ne 0 and $cart.coupon_type ne "free_ship"} <tr> <td nowrap="nowrap"><font class="FormButton">{$lng.lbl_discount_coupon} <a href="cart.php?mode=unset_coupons" alt="{$lng.lbl_unset_coupon|escape}"><img src="{$ImagesDir}/clear.gif" width="11" height="11" border="0" valign="top" alt="{$lng.lbl_unset_coupon|escape}" /></a> :</font></td> <td><img src="{$ImagesDir}/null.gif" width="5" height="1" alt="" /><br /></td> <td nowrap="nowrap" align="right"><font class="ProductPriceSmall">{include file="currency.tpl" value=$cart.coupon_discount}</font></td> <td nowrap="nowrap" align="right">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$cart.coupon_discount}</td> </tr> {/if} {if $cart.discounted_subtotal ne $cart.subtotal} <tr> <td colspan="4" height="1"><img src="{$ImagesDir}/spacer_black.gif" width="100%" height="1" alt="" /><br /></td> </tr> <tr> <td nowrap="nowrap"><font class="FormButton" style="text-transform: uppercase;">{$lng.lbl_discounted_subtotal}:</font></td> <td><img src="{$ImagesDir}/null.gif" width="5" height="1" alt="" /><br /></td> <td nowrap="nowrap" align="right"><font class="ProductPriceSmall">{include file="currency.tpl" value=$cart.display_discounted_subtotal}</font></td> <td nowrap="nowrap" align="right">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$cart.display_discounted_subtotal}</td> </tr> {/if} {if $cart.taxes and $config.Taxes.display_taxed_order_totals eq "Y"} <tr> <td colspan="4" align="right"><b>{$lng.lbl_including}:</b></td> </tr> {foreach key=tax_name item=tax from=$cart.taxes} <tr class="TableSubHead"> <td nowrap="nowrap" align="right">{$tax.tax_display_name}:</td> <td><img src="{$ImagesDir}/null.gif" width="5" height="1" alt="" /><br /></td> <td nowrap="nowrap" align="right">{include file="currency.tpl" value=$tax.tax_cost_no_shipping}</td> <td nowrap="nowrap" align="right">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$tax.tax_cost_no_shipping}</td> </tr> {/foreach} {/if} {if $cart.applied_giftcerts} <tr> <td nowrap="nowrap"><font class="FormButton">{$lng.lbl_giftcert_discount}:</font></td> <td><img src="{$ImagesDir}/null.gif" width="5" height="1" alt="" /><br /></td> <td nowrap="nowrap" align="right"><font class="ProductPriceSmall">{include file="currency.tpl" value=$cart.giftcert_discount}</font></td> <td nowrap="nowrap" align="right">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$cart.giftcert_discount}</font></td> </tr> {/if} </table> {if $cart.applied_giftcerts} <br /> <br /> <font class="FormButton">{$lng.lbl_applied_giftcerts}:</font> <br /> {section name=gc loop=$cart.applied_giftcerts} {$cart.applied_giftcerts[gc].giftcert_id} <a href="cart.php?mode=unset_gc&gcid={$cart.applied_giftcerts[gc].giftcert_id}"><img src="{$ImagesDir}/clear.gif" width="11" height="11" border="0" valign="top" alt="{$lng.lbl_unset_gc|escape}" /></a> : <font class="ProductPriceSmall">{include file="currency.tpl" value=$cart.applied_giftcerts[gc].giftcert_cost}</font><br /> {/section} {/if} {if $not_logged_message eq "1"}{$lng.txt_order_total_msg}{/if} </div> <input type="hidden" name="action" value="update" /> <hr align="left" noshade="noshade" size="1" /> {if $active_modules.Special_Offers ne ""} {include file="modules/Special_Offers/customer/cart_bonuses.tpl"} {/if}
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #13  
Old 05-21-2007, 07:57 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Advanced Cart Mod

Adding to the thought process here....

instead of this in minicart.tpl:
{include file="currency.tpl" value=$minicart_total_cost}

This value is assigned through the minicart.php file via
$smarty->assign("minicart_total_cost", $MINICART["total_cost"]);

What I am needing to display is:
{include file="currency.tpl" value=$cart.display_discounted_subtotal}

This is from /modules/Fast_Lane_Checkout/cart_subtotal.tpl
But I do not know what php file assigns the cart.display_discounted_subtotal or how to incorperate it into minicart.php
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #14  
Old 05-21-2007, 11:23 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Advanced Cart Mod

I have no idea what I did but now it is not only figuring the total correct it is adding in the shipping. Too sweet.

Thanks for this mod vtonya
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #15  
Old 05-21-2007, 11:56 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Advanced Cart Mod

I know I am full for questions.....

On this line:
<td align="center">{$item.display_subtotal}</td>
I swithced to <td align="center">{include file="currency.tpl"} {$item.display_subtotal}</td>

Which gives me the $ before the amount, which worked great. If the amount is $39.90 or $12.00 it will display as $39.9 or $12.

I tried:
<td align="center">{include file="currency.tpl" $item.display_subtotal}</td>

But that only killed the mount and left just the $ symbol. How would I go about getting the full amount to display?
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #16  
Old 05-25-2007, 08:24 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default Re: Advanced Cart Mod

{include file="currency.tpl" value=$item.display_subtotal}
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote
  #17  
Old 05-25-2007, 09:56 PM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Advanced Cart Mod

I don't know whether to offer you another drink, or feel stupid because someone called inebriate found my errors!

Thanks so you very much for catching this. With that fixed I am now down to only one, pain in the neck from beating my head against the wall, screwball thing.
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #18  
Old 05-28-2007, 06:28 PM
 
pinklinoleum pinklinoleum is offline
 

Advanced Member
  
Join Date: Aug 2006
Posts: 37
 

Default Re: Advanced Cart Mod

does anyone know how to modify inebriate's thumbnail tag to show up in 4.0.18? i can't get the product images to show up!

Code:
{if $item.is_pimage eq 'W' }{assign var="imageid" value=$item.variantid}{else}{assign var="imageid" value=$item.productid}{/if} {include file="product_thumbnail.tpl" productid=$imageid image_x=100 product=$item.product tmbn_url=$item.pimage_url type=$item.is_pimage}

thanks!
__________________
XCART version 4.0.19
Reply With Quote
  #19  
Old 06-13-2007, 05:07 PM
  vtonya's Avatar 
vtonya vtonya is offline
 

Advanced Member
  
Join Date: Apr 2007
Posts: 61
 

Default Re: Advanced Cart Mod

Replace

Quote:
<td align="right" class="MiniCartTextSmall"><strong>{include file="currency.tpl" value=$item_total_cost}</strong></td>

with

Quote:

{* calculate grand total including shipping cost*}
{math assign="grandtotal" equation="minicarttotalcost+minicartshipping" minicarttotalcost=$minicart_total_cost minicartshipping=$minicart_shipping}
{* end of grand total calculation *}
<td align="right" class="MiniCartTextSmall"><strong>{include file="currency.tpl" value=$grandtotal}</strong></td>


and Total will be calculated wright
__________________
X-card Gold 4.1.7
Batch Order Mod/Order Processing
Detailed Order Management Mod
Order Audit/Profit reports
Advanced Product Search
Ajax Username Checker
Direct Product Enquiry Form
FAQ Manager
Social Bookmarking
Tabs Mod v3
MagneticOne.com All-IN-ONE X-Cart Export
Show Referrer Information on Order Details Page
www.medsmarket.net
Reply With Quote
  #20  
Old 09-16-2007, 12:34 PM
 
JeffS JeffS is offline
 

Newbie
  
Join Date: Sep 2007
Posts: 5
 

Default Re: Advanced Cart Mod

Great mod, but how do you get the width to be smaller? In the code I think it's saying '200' px wide, but when I change it to '100' nothing happens.

Anyone know how to do this?
__________________
X-Cart Gold v4.1.8

DSEFU
NewsPro
Product Forms [4-in-1]
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 06:40 AM.

   

 
X-Cart forums © 2001-2020