How to get product details by product_id on any template page (i.e. cart, cart-popup etc.))

I m wondering on, how to get product details by product_id on any template page.



It's urgent, so somebody please reply.



Vivek

Hi Vivek,

You can use in tpl:


{assign var="product_data" value=product_id|fn_get_product_data}




#fn.catalog.php

function fn_get_product_data($product_id, &$auth, $lang_code = CART_LANGUAGE, $field_list = '', $get_add_pairs = true, $get_main_pair = true, $get_taxes = true, $get_qty_discounts = false, $preview = false, $features = true, $skip_company_condition = false)





Valentin

[color=#808080][size=2]part of hungryweb.net[/size][/color]

Thanks for your reply, Valentin.



That was very helpful.



I got short description, but I am trying hard to death for getting “product's selected options” into shopping-cart top popup & shopping cart main area, can you help me on that too, please ?



Vivek

Please tell me know your cs-cart version

[quote name='Vali' timestamp='1385365458' post='172278']

It's CS Cart v4.0.1 multi-vendor

[/quote]

Pardon my hastiness, but I'm kind of under the gun here, as project-deadline is very near.



So expecting fast reply from you.



Vivek