| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
sitemap.php customization | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() As it is now, it just lists the product names. But I would like to add the short description (products:descr) to the listing as well.
I found the fuction page of the sitemap module (modules/sitemap/func.php) and was able to swap out line 334: $select[] = "$sql_tbl[products].product AS name"; to $select[] = "$sql_tbl[products].descr AS name"; which did substitute the description for the name in the sitemap. But I would like both the name of the product and the description of the product in the sitemap, and I don't know enough about how this works to get them to both show up in the sitemap link. I tried changing the skin/common_files/modules/item_products.tpl along with the func.php file, but I'm not grasping how to do this. I want, I think, something like this in the item_products.tpl: {foreach from=$items item="item" key="num"} <li><a href="{$item.url}" title="{$item.name|escape}">{$item.name|amp} - {$item.descr|amp}</a></li> {/foreach} so it would look like this <link>54321A - Moth wing scales</link> I need some guidance on what I need to modify to get that.
__________________
x-cart 4.4.3 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() $select[] = "$sql_tbl[products].product AS name"; // keep the line
$select[] = "$sql_tbl[products].descr AS description"; // add this then in the template refer to it as $item.decsription
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#3
|
|||||||
|
|||||||
![]() Thank you, but it doesn't work
__________________
x-cart 4.4.3 |
|||||||
#4
|
|||||||||
|
|||||||||
![]() Clear cart's cache
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#5
|
|||||||
|
|||||||
![]() Thanks, found the problem, edited the wrong tpl. I wanted to edit the item_catagories_recurs.tpl, not the item_products.tpl.
Works great.
__________________
x-cart 4.4.3 |
|||||||
|
|||
X-Cart forums © 2001-2020
|