How can I add the LBS or weight in the product list and Cart

How can I add the LBS or weight each in the product list just after the Code name(SEE Below)and have the total weight show up in the shopping cart???



Code: BT-T12-5 Weight: .2 LBS



or which file do I modify etc…



Please help

You would modify (or add a hook would be preferable) to

skins//customer/common_templates/product_data.tpl

search for $show_sku and either conditionalize or add the code you want referencing

{$product.weight} {$settings.General.weight_symbol}



I would probably do something like:


{if $product.weight)
{$lang.weight}: {$product.weight}{$settings.General.weight_symbol}
{/if}

[quote name='tbirnseth' timestamp='1322523811' post='126886']

You would modify (or add a hook would be preferable) to

skins//customer/common_templates/product_data.tpl

search for $show_sku and either conditionalize or add the code you want referencing

{$product.weight} {$settings.General.weight_symbol}



I would probably do something like:


{if $product.weight)
{$lang.weight}: {$product.weight}{$settings.General.weight_symbol}
{/if}


[/quote]



I wasn't sure if a hook is better … Thanks for the help

[quote name='chrisbti' timestamp='1322583274' post='126936']

I wasn't sure if a hook is better … Thanks for the help

[/quote]



What about some code for the total weight on the shipping selection page??



I use this to compare actual shipping charges.

Not sure if the total weight of the order is passed to the template since the shipping calculation is done in PHP, not Smarty. I guess you could loop through the order and compute the weight based on quantity, weight and items…

[quote name='tbirnseth' timestamp='1322523811' post='126886']

You would modify (or add a hook would be preferable) to

skins//customer/common_templates/product_data.tpl

search for $show_sku and either conditionalize or add the code you want referencing

{$product.weight} {$settings.General.weight_symbol}



I would probably do something like:


{if $product.weight)
{$lang.weight}: {$product.weight}{$settings.General.weight_symbol}
{/if}


[/quote]



I could not get this code to work…Where exactly do i put the code …



Thnx Chris

Umm, thought I'd said to search for $show_sku in skins//customer/common_templates/product_data.tpl and add the code as you want it. Short of doing it for you, that's the best I can offer from here.

[quote name='tbirnseth' timestamp='1322700902' post='127051']

Umm, thought I'd said to search for $show_sku in skins//customer/common_templates/product_data.tpl and add the code as you want it. Short of doing it for you, that's the best I can offer from here.

[/quote]



It just hangs… must be incorrect variables for “weight”



thnx for the help

The code was an example (note “something like”).

chrisbti,



Sometimes you have to feed the animals before they will fully produce! :)