X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Access to smarty variable $current_category (https://forum.x-cart.com/showthread.php?t=58745)

chamberinternet 04-03-2011 05:10 AM

Access to smarty variable $current_category
 
Hello ...

Within version 4.1.x I was able to access the $current_category smarty variable when I was viewing the products detail page (product.php)

I can no longer do this with 4.4.x. Can anyone help on which .php files I have to make changes to in order for me to access to this smarty variable?

Many Thanks & Regards

Shafiq :sK

cflsystems 04-03-2011 07:11 AM

Re: Access to smarty variable $current_category
 
Try

$current_category = func_get_category_data($cat);
$smarty->assign("current_category, $current_category);

in product.php

You may need to load "categories" and define $cat if not available ($cat will be the product category)

chamberinternet 04-03-2011 11:04 AM

Re: Access to smarty variable $current_category
 
Thanks Steve ... That worked great :-)

Regards

Shafiq :sK


All times are GMT -8. The time now is 01:35 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.