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)
-   -   Add Short Desc to simple_products_list.tpl (https://forum.x-cart.com/showthread.php?t=73028)

shaz 11-05-2015 03:29 PM

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

cflsystems 11-05-2015 04:55 PM

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

shaz 11-05-2015 07:45 PM

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....

cherie 11-10-2015 04:00 PM

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.

shaz 12-13-2015 07:44 PM

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 :)


All times are GMT -8. The time now is 11:51 AM.

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