BryanB Posted February 5, 2010 Share Posted February 5, 2010 I'm trying to add the product name and description in the shopping cart above where it says "subtotal" I've tried using this code but it wont display: {$product.name}-{$product.description} I'd like to include it here, as it is not included if you link directly to a product. This is on /cart.php?a=view and here is my viewcart.tpl lines 9-28 <p class="ordersummary">{$product.name}-{$product.description}<br /> {$LANG.ordersubtotal}: {$subtotal}<br /> {if $promotioncode}{$promotiondescription}: {$discount}<br />{/if} {if $taxrate}{$taxname} @ {$taxrate}%: {$taxtotal}<br />{/if} {if $taxrate2}{$taxname2} @ {$taxrate2}%: {$taxtotal2}<br />{/if} <b>{$LANG.ordertotalduetoday}: {$total}</b><br /> {if $totalrecurringmonthly || $totalrecurringquarterly || $totalrecurringsemiannually || $totalrecurringannually || $totalrecurringbiennially} {$LANG.ordertotalrecurring}: {if $totalrecurringmonthly}{$totalrecurringmonthly} {$LANG.orderpaymenttermmonthly}, {/if} {if $totalrecurringquarterly}{$totalrecurringquarterly} {$LANG.orderpaymenttermquarterly}, {/if} {if $totalrecurringsemiannually}{$totalrecurringsemiannually} {$LANG.orderpaymenttermsemiannually}, {/if} {if $totalrecurringannually}{$totalrecurringannually} {$LANG.orderpaymenttermannually}, {/if} {if $totalrecurringbiennially}{$totalrecurringbiennially} {$LANG.orderpaymenttermbiennially}, {/if}{/if} </p> <center> <p>Not the correct amount? Click here to start over: <input type="button" value="{$LANG.orderstartover}" onclick="window.location='cart.php?a=startover'" /> </p> </center> Any ideas? 0 Quote Link to comment Share on other sites More sharing options...
m00 Posted February 5, 2010 Share Posted February 5, 2010 (edited) You are missing the foreach: <p class="ordersummary"> [b]{foreach key=num item=product from=$products}[/b] {$product.productinfo.name}-{$product.productinfo.description}<br /> [b]{/foreach}[/b] {$LANG.ordersubtotal}: {$subtotal}<br /> {if $promotioncode}{$promotiondescription}: {$discount}<br />{/if} {if $taxrate}{$taxname} @ {$taxrate}%: {$taxtotal}<br />{/if} {if $taxrate2}{$taxname2} @ {$taxrate2}%: {$taxtotal2}<br />{/if} <b>{$LANG.ordertotalduetoday}: {$total}</b><br /> {if $totalrecurringmonthly || $totalrecurringquarterly || $totalrecurringsemiannually || $totalrecurringannually || $totalrecurringbiennially} {$LANG.ordertotalrecurring}: {if $totalrecurringmonthly}{$totalrecurringmonthly} {$LANG.orderpaymenttermmonthly}, {/if} {if $totalrecurringquarterly}{$totalrecurringquarterly } {$LANG.orderpaymenttermquarterly}, {/if} {if $totalrecurringsemiannually}{$totalrecurringsemian nually} {$LANG.orderpaymenttermsemiannually}, {/if} {if $totalrecurringannually}{$totalrecurringannually} {$LANG.orderpaymenttermannually}, {/if} {if $totalrecurringbiennially}{$totalrecurringbiennial ly} {$LANG.orderpaymenttermbiennially}, {/if}{/if} </p> <center> <p>Not the correct amount? Click here to start over: <input type="button" value="{$LANG.orderstartover}" onclick="window.location='cart.php?a=startover'" /> </p> </center> (I don't know if the description works, I'm not sure if the variable exists) Edited February 5, 2010 by m00 0 Quote Link to comment Share on other sites More sharing options...
BryanB Posted February 5, 2010 Author Share Posted February 5, 2010 That worked, description too. Thanks! 0 Quote Link to comment Share on other sites More sharing options...
bunhosting Posted February 6, 2010 Share Posted February 6, 2010 is it me or am i missing a viewcart.tpl file in my template folder? 0 Quote Link to comment Share on other sites More sharing options...
m00 Posted February 6, 2010 Share Posted February 6, 2010 is it me or am i missing a viewcart.tpl file in my template folder? Yes, you are missing it there. It's in the /templates/orderforms/<your order form>/ folder. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.