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

Specific Category on Home Page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-20-2015, 02:02 AM
 
mcpilot mcpilot is offline
 

Advanced Member
  
Join Date: Dec 2004
Location: Cincinnati
Posts: 68
 

Default Specific Category on Home Page

I would like to display a specific category of products on the home page. I wish to embed the code in the welcome.tpl file where it will lay out where I want the products to display. I am having trouble locating code that will allow this. Can anyone help?
__________________
thebookfarminc.com
Version 4.7.0
Reply With Quote
  #2  
Old 07-20-2015, 03:04 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

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

Default Re: Specific Category on Home Page

Hello!

"\XLite\View\ItemsList\Product\Customer\Category\M ain" is the base widget that renders the list of products from a category.

It has PARAM_CATEGORY_ID parameter, so I believe you can render it for a specific category from a template file (however, I'm not sure for 100% as it may take some parameters from the request and from the controller that handles the current "target").

The code could be as follows (I haven't tried it):
Code:
<widget class="XLite\View\ItemsList\Product\Customer\Category\Main" categoryid="YOUR_CATEGORY_ID" />
__________________
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 07-20-2015, 03:31 AM
 
mcpilot mcpilot is offline
 

Advanced Member
  
Join Date: Dec 2004
Location: Cincinnati
Posts: 68
 

Default Re: Specific Category on Home Page

This is for x-cart 4.6.3. It looks like the code you posted above may be for litecommerce?
__________________
thebookfarminc.com
Version 4.7.0
Reply With Quote
  #4  
Old 07-21-2015, 05:17 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

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

Default Re: Specific Category on Home Page

Opps... Yes, you're right. The code above is for X-Cart 5.

I believe doing this in X-Cart 4 is a more complex task than adding a few lines into the template file. I'm not sure if I can give you a detailed instruction, though.
__________________
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
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


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 01:17 AM.

   

 
X-Cart forums © 2001-2020