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)
-   -   Featured products on home page (https://forum.x-cart.com/showthread.php?t=63277)

Nolimits 04-13-2012 07:58 AM

Featured products on home page
 
Hi,

can anybody help me with the problem I've trying to solve for 2 weeks.
I need to show featured products from 3 different categories on the front page.

I know that if I use
Code:

{capture name=dialog}               
    { include file="customer/main/products.tpl" products=$f_products featured="Y" }           
{/capture} 
           
{ include file="customer/dialog.tpl" title=$lng.lbl_featured_products content=$smarty.capture.dialog sort=true additional_class="products-dialog dialog-featured-list" }



this will show featured products on the home page but not from specific category.
But my task is to show featured products from specific category :/

Please help - I'm stuck on this for a very long time.

Thx in advance!

Toora Designs 04-13-2012 08:30 AM

Re: Featured products on home page
 
You can mange featured products from XC backend under categories. When you scroll down to the bottom you will see "Featured products"

For more info... http://help.x-cart.com/index.php?title=X-Cart:Featured_Products

Nolimits 04-13-2012 08:45 AM

Re: Featured products on home page
 
Thx for reply but I don't think you understood my problem.
I know I can add (general )featured products on the home page.

But I need featured products from specific categories.
So if I go to the "Catalog->Categories", select desired category, scroll to the bottom of the page and add "Featured product" - how can I add this product to the home page (along with other featured products from other categories)?

Or I can ask this question differently...
How can I define featured products category in this import
Code:

{capture name=dialog}                     
    {include file="customer/main/products.tpl" products=$f_products featured="Y"}
{/capture}               

{include file="customer/dialog.tpl" title=$lng.lbl_featured_products content=$smarty.capture.dialog sort=true additional_class="products-dialog dialog-featured-list"}


   


It is evident that
Code:

{include file="customer/main/products.tpl" products=$f_products featured="Y"}


imports featured products to the page (home, or any other) - but category ID of these featured products is "0" and I need it to be specific ID(s)

So is it somehow possible to add some category property into this import?
Something like
Code:

{include file="customer/main/products.tpl" cat=123 products=$f_products featured="Y"}


or something similar?

Thx in advance!

cflsystems 04-13-2012 09:01 AM

Re: Featured products on home page
 
Quote:

Originally Posted by Nolimits
But I need featured products from specific categories.
So if I go to the "Catalog->Categories", select desired category, scroll to the bottom of the page and add "Featured product" - how can I add this product to the home page (along with other featured products from other categories)?


You don't go to specific category - stay at the root and add feature products from whichever category you want. They will show on front page only

Nolimits 04-13-2012 09:07 AM

Re: Featured products on home page
 
I know that, but what if want (and I want :) ) to distinguish featured products by category?
So I need (for example) 3 imports like this:
Code:


{include file="customer/main/products.tpl" products=$f_products featured="Y"}


In case I add products in category id == "0" (featured products with no category) I'll get 3 exact the same results. And I don't want that :/

Thx!

Toora Designs 04-13-2012 09:07 AM

Re: Featured products on home page
 
Yup Steve is right
refer to this page http://help.x-cart.com/index.php?title=X-Cart:Featured_Products#Adding_Featured_Products

Nolimits 04-13-2012 09:13 AM

Re: Featured products on home page
 
Sorry for the confusion.

What I need is to have three separate instances of the
{ include file="customer/main/products.tpl" products=$f_products featured="Y" }
On our home page, each instance will list the featured products from a different category.


The question is:

1. How can I declare which category the featured products are pulled from?
2. How can I have 3 separate instance of the featured products, pull from different categories.

Thx!

cflsystems 04-13-2012 09:22 AM

Re: Featured products on home page
 
You can add all products you want and set pos field then use an if/else statement for which products to show on which instance based on pos field numbers

Nolimits 04-13-2012 09:59 AM

Re: Featured products on home page
 
I guess the Q i have is what would be the "if/else statement for which products to show on which instance " can you provide an example?

Thx so much. Help is appreciated.


Quote:

Originally Posted by cflsystems
You can add all products you want and set pos field then use an if/else statement for which products to show on which instance based on pos field numbers


cherie 04-17-2012 04:30 PM

Re: Featured products on home page
 
You can't do this in templates alone. $f_products is only for the current category or home page. You would have to get into the php to do some queries to get the featured products defined in those categories.

Learner 06-09-2013 11:31 PM

Re: Featured products on home page
 
i use x-cart-4.5.4platinum. how can i show all categories featured products in home page??plz help me.

gozindagi 10-22-2013 04:41 AM

Re: Featured products on home page
 
Quote:

Originally Posted by Learner
i use x-cart-4.5.4platinum. how can i show all categories featured products in home page??plz help me.

I also want to show categories featured products at home page in Reboot template.Please help me also.


All times are GMT -8. The time now is 02:44 PM.

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