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

how to get a product root category name?
 
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features
 
Thread Tools Search this Thread
  #1  
Old 05-04-2017, 04:04 PM
 
Eyeglasses Expert Eyeglasses Expert is offline
 

eXpert
  
Join Date: May 2010
Posts: 285
 

Default how to get a product root category name?

i am testing x-cart v4.7.
how to get a product root category name at the product page, pls?
Reply With Quote
  #2  
Old 05-04-2017, 08:34 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: how to get a product root category name?

I think X-Cart 4 doesn't pass information on the product's category to the product page template, so you should tweak product.php first: use the func_get_category_data() function to load information on the category and send it to the template with $smarty->assign('NAME_OF_SMARTY_VARIABLE', $DATA).
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #3  
Old 05-06-2017, 12:31 PM
 
Eyeglasses Expert Eyeglasses Expert is offline
 

eXpert
  
Join Date: May 2010
Posts: 285
 

Default Re: how to get a product root category name?

would you pls teach me the details? tks
Reply With Quote
  #4  
Old 05-06-2017, 01:02 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,532
 

Default Re: how to get a product root category name?

Quote:
Originally Posted by qualiteam
I think X-Cart 4 doesn't pass information on the product's category to the product page template, so you should tweak product.php first: use the func_get_category_data() function to load information on the category and send it to the template with $smarty->assign('NAME_OF_SMARTY_VARIABLE', $DATA).
Root category info should be present on all pages as it is used to display category menus.

See how $categories_menu_list is used in customer/categories.tpl.
__________________
redli.me | xcarthelp.com
custom mods and design integration
4.7 linux
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 12:52 PM.

   

 
X-Cart forums © 2001-2018