![]() |
Bestsellers with short descriptions...
I am trying to modify my bestsellers to include the short description, I have added the $bestseller.descr but it does not show any descriptions.
My question: Where is the database query for the bestsellers? I want to add descr to the list so that it will display them when prompted. I have looked at bestsellers.php but dont see it there. Here is the code for the tpl as it stands right now: Code:
Thanks a bunch for the help guys! Herb webmaster@bunnyburybaby.com |
Re: Bestsellers with short descriptions...
This is your new /skin1/modules/Bestsellers/menu_bestseller.tpl
I've correct some errors like 'thumbnailbs' -> 'thumbnail' one excess {/if} Code:
{capture name=bestsellers} and this is your LAST 20 ROWS of your new /modules/Bestsellers/bestsellers.php. You should find row with 'if ($threshold)' and replace it to end of file with Code:
if ($threshold) Enjoy! |
Re: Bestsellers with short descriptions...
Holub,
I made the changes you suggested but the module still does not show me the descriptions. Could I be doing something wrong? Here is the code for the tpl I am working with. I should have named the template in my last post, I apologize for that. This only needs to work with the bestsellers.tpl, I do not use the menu_bestseller.tpl bestsellers.tpl Code:
{* $Id: bestsellers.tpl,v 1.8.2.1 2006/11/16 13:12:29 max Exp $ *} Here is the code for my bestsellers.php after the change you suggested: Code:
<?php The descriptions are still not showing up. Not sure why. I have a short description on the product pages. Here is my /product_thumbnailbs.tpl for those interested: Code:
<img src="phpThumb.php?src={$tmbn_url|replace:' ':'%20'|replace:'http://www.bunnyburybaby.net/':''|replace:'http://www.bunnyburybaby.com/':''|replace:'images/products':'images/Products'}&w=75" alt="{$images[image].alt}" style="BORDER-RIGHT: #b7b7b7 1px solid; BORDER-TOP: #b7b7b7 1px solid; BORDER-LEFT: #b7b7b7 1px solid; BORDER-BOTTOM: #b7b7b7 1px solid" alt="$bestseller.product"> This is a 4 year old site with over 1000 products. The folks working on it before me liked to use spaces, capitals etc in the image names, urls and other places you should not. I had to put some replace commands in to correct past errors. I will moving the excess html to a css once I have the mod working. Any help you can give is much appreciated. Herb |
Re: Bestsellers with short descriptions...
Any other ideas? All are welcome!
|
Re: Bestsellers with short descriptions...
Do you have any php/mysql errors in logs? I can't find right decision without additional info. Can you provide me website address where you try to use these modifications?
|
Re: Bestsellers with short descriptions...
No errors in the logs, you can see it near the bottom of this page: http://dev.bunnyburybaby.com/home.php The first "More Best Selling Products: " section is hard coded right now, the one below it is the best sellers module as it stands right now. You can see the second set of products is missing the short description.
|
Re: Bestsellers with short descriptions...
Hm... It's very strange. I've created new files (bestsellers.php and bestsellers.tpl and inserted code I've suggested - and it's work. There is one rationale I can suppose: in version 4.1.8 this method does not work (I've tested on 4.1.9). I'll try to test it on 4.1.8.
|
Re: Bestsellers with short descriptions...
Yes, all OK. I'ts my fault, the function func_search_products was changed in 4.1.9.
There is less quality decision than previous. Please rollback changes and choose standart bestsellers.php file (without modifications). Then you should insert this code into bestsellers.php Code:
foreach ($bestsellers as $k => $v) { before lines (almost the end of file) Code:
$smarty->assign("bestsellers", $bestsellers); I've tested this on 4.1.8 and found this work properly. Feel free to ask any questions. |
Re: Bestsellers with short descriptions...
All first early worked great in my 4.1.9 project...funny how your always at the end of fixing what I'm looking for Anthony. Thanks for always contributing.
|
Re: Bestsellers with short descriptions...
How would I get the manufacturers name to display before the product name in the bestsellers.tpl?
|
All times are GMT -8. The time now is 03:14 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.