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

Add Short Desc to simple_products_list.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-05-2015, 03:29 PM
 
shaz shaz is offline
 

Senior Member
  
Join Date: Jul 2008
Location: Sydney, Australia
Posts: 174
 

Default Add Short Desc to simple_products_list.tpl

Not sure if I'm going mad....

I'm trying to add a nice easy Product Short description to common_files/customer/simple_products_list.tpl template which appears on the products_t template (i.e. the associated products tables under the individual product details).

I can't get it to appear?! I know its a Monday but what am I missing...??

Code I am using is below and just results in an empty div...

Code:
<a href="product.php?productid={$product.productid}" class="descr"><div class="descr">{$product.descr|amp}</div></a>

XC4.6.1

Thanks
Shaz
__________________
Shaz
X-Cart Developer
Sydney - Australia
Reply With Quote
  #2  
Old 11-05-2015, 04:55 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Add Short Desc to simple_products_list.tpl

are you sure descr exists in the product array? The simple list does not have all the product info to begin with
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 11-05-2015, 07:45 PM
 
shaz shaz is offline
 

Senior Member
  
Join Date: Jul 2008
Location: Sydney, Australia
Posts: 174
 

Default Re: Add Short Desc to simple_products_list.tpl

Hi Steve,

Thanks for your response. The debugging console shows it is... I've tried a few other arrays also..

Quote:
{$product} Array (72)

descr => "<div>rggrbw pa..."
fulldescr => "<div><strong>etbbet..."

Still just returns nothing....
__________________
Shaz
X-Cart Developer
Sydney - Australia
Reply With Quote
  #4  
Old 11-10-2015, 04:00 PM
  cherie's Avatar 
cherie cherie is offline
 

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

Default Re: Add Short Desc to simple_products_list.tpl

div inside link may throw a validation error.

customer/simple_products_list.tpl is called from other areas like modules/Recommends/recommends.tpl (Upselling Links). It has its own $product called from within its own foreach loop. This is a separate $product from the one on the product details page. Most likely descr is not in the simple list and would have to be added through a customization.
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote
  #5  
Old 12-13-2015, 07:44 PM
 
shaz shaz is offline
 

Senior Member
  
Join Date: Jul 2008
Location: Sydney, Australia
Posts: 174
 

Default Re: Add Short Desc to simple_products_list.tpl

Thanks Cherie, we ended up pulling the product name instead of the sdescr.

Cheers for your input
__________________
Shaz
X-Cart Developer
Sydney - Australia
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 12:04 PM.

   

 
X-Cart forums © 2001-2020