Guest grafixster Posted November 4, 2005 Share Posted November 4, 2005 I'm still not able to get the links to work in product description. Here is the lates thing I've tried. <td> {TXT_DESC} <div class="txtOutOfStock">{TXT_OUTOFSTOCK}</div> </td> I've modified it to be; <td> <a href="{TXT_DESC}">Play</a> <div class="txtOutOfStock">{TXT_OUTOFSTOCK}</div> </td> When I add a product, I put the path to the "public" folder like /demos/genre/sound.mp3 in the description field. This works fine and the link becomes availaible in the product listings as well as the product detailed info (if you click on more). If I view HTML source of the shopping cart I see this <td> <a href="/demos/beats/rap/1.mp3…">Play</a> <div class="txtOutOfStock"></div> </td> The … makes the link come; /demos/beats/rap/1.mp3%E2%80%A6 I hope that sheds some light on the prob. Thanks! Quote Link to comment Share on other sites More sharing options...
Guest estelle Posted November 5, 2005 Share Posted November 5, 2005 Hi there, So you want to modify the category view to have the product descriptions as a link? Firstly, the reason why it is displayed as a link when you view the full product info, but not in the category view, is because in the category view all the HTML tags such as <a href...> are being stripped. Also, as you noticed, … is being added to the end. Here is the code that does this. Its in includes/content/viewCat.inc.php $view_cat->assign("TXT_DESC",substr(strip_tags($productResults[$i]['description']),0,$config['productPrecis'])."…"); So you could either keep the current solution that you are working on, and just get rid of the … that is getting added to the end (and also the possible chopping of the end of the text): $view_cat->assign("TXT_DESC",strip_tags($productResults[$i]['description'])); Or you could also get rid of the strip_tags(), so that any HTML tags will also used to markup the text in the category listing, and then you could undo your other change in viewCat.tpl. $view_cat->assign("TXT_DESC",$productResults[$i]['description']); Hope this helps! Estelle. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.