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

Featured Products Question

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-25-2007, 06:04 PM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Featured Products Question

Is there a way to turn off featured products from showing up on the main page and the categories page when there are no items that are added to the featured products?

I want to do this without commenting it out of the home.tpl if possible. If not then I guess I will comment it out.
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #2  
Old 10-26-2007, 01:21 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default Re: Featured Products Question

If you have no featured products in admin, then by default nothing is going to show up anyway.
If you don't have any featured products, what are you getting to show up???
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #3  
Old 10-26-2007, 03:19 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Featured Products Question

The featured products menu with menu box title and contents of "There are no featured products."
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #4  
Old 10-26-2007, 03:45 AM
  chamberinternet's Avatar 
chamberinternet chamberinternet is offline
 

X-Wizard
  
Join Date: Sep 2005
Location: Lancashire, UK
Posts: 1,471
 

Default Re: Featured Products Question

The message is displayed via the language variable {$lng.txt_no_featured}

If you just comment that message out from featured.tpl... then it wont be shown.

This way featured products will be displayed if you have products assigned, else no message will be displayed.

Regards

Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!)
Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x
Multiple Instances of X-Cart
MySQL 5.6.37
CentOS 7.4


Chamber Internet
- Lancashire, United Kingdom
http://www.chamberelancs.co.uk
Reply With Quote
  #5  
Old 10-26-2007, 03:58 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Featured Products Question

What I am trying to do is not even show the featured items menu box. I didn't know if there is a way to shut it down without commenting it out of the home.tpl file. Like best sellers can be turned on or off, I just wanted to know if featured items menu can be turned on and off.
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #6  
Old 10-26-2007, 03:59 AM
  chamberinternet's Avatar 
chamberinternet chamberinternet is offline
 

X-Wizard
  
Join Date: Sep 2005
Location: Lancashire, UK
Posts: 1,471
 

Default Re: Featured Products Question

Well it's not a module like bestsellers, so i guess you can only comment it from the code.

Unless someone here has a better idea ?
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!)
Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x
Multiple Instances of X-Cart
MySQL 5.6.37
CentOS 7.4


Chamber Internet
- Lancashire, United Kingdom
http://www.chamberelancs.co.uk
Reply With Quote
  #7  
Old 10-26-2007, 04:02 AM
  chamberinternet's Avatar 
chamberinternet chamberinternet is offline
 

X-Wizard
  
Join Date: Sep 2005
Location: Lancashire, UK
Posts: 1,471
 

Default Re: Featured Products Question

Thinking about it now .. It might be worth the guys @ XC to convert it as a module in a future release, so it can be enabled/disabled easily

Comments ?

Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!)
Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x
Multiple Instances of X-Cart
MySQL 5.6.37
CentOS 7.4


Chamber Internet
- Lancashire, United Kingdom
http://www.chamberelancs.co.uk
Reply With Quote
  #8  
Old 10-26-2007, 04:11 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Featured Products Question

You just need to move the {if} statement around a little:

Replace this:

Code:
{capture name=dialog} {if $f_products ne ""} {if $total_pages gt 2} <br /> { include file="customer/main/navigation.tpl" } {/if} {include file="customer/main/products.tpl" products=$f_products featured="Y"} {if $total_pages gt 2} <br /> { include file="customer/main/navigation.tpl" } {/if} {else} {$lng.txt_no_featured} {/if} {/capture} {include file="dialog.tpl" title=$lng.lbl_featured_products content=$smarty.capture.dialog extra='width="100%"'}

with this:

Code:
{if $f_products ne ""} {capture name=dialog} {if $total_pages gt 2} <br /> { include file="customer/main/navigation.tpl" } {/if} {include file="customer/main/products.tpl" products=$f_products featured="Y"} {if $total_pages gt 2} <br /> { include file="customer/main/navigation.tpl" } {/if} {else} {$lng.txt_no_featured} {/capture} {include file="dialog.tpl" title=$lng.lbl_featured_products content=$smarty.capture.dialog extra='width="100%"'} {/if}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #9  
Old 10-26-2007, 07:55 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Featured Products Question

That was quite an interesting effect Balinor!

That put the featured items menu above the head template and in the center main of home where featured products go it just gave the text label for no featured products.

I do appreciate the effort though.
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #10  
Old 10-26-2007, 08:13 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Featured Products Question

Huh? Just meant update customer/main/featured.tpl, not moving things above the head template!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 11:15 PM.

   

 
X-Cart forums © 2001-2020