Vire Posted June 30, 2014 Share Posted June 30, 2014 Hello there, due to the fact that we use pictures in the short description i belive the " " on the favorite product pages come from that fact. Could some one tell me where i can change that no discription get shown? Just the title of the product? Or if possible, i would like to allow pictures in the favorite product list. Link to comment Share on other sites More sharing options...
Vire Posted July 2, 2014 Author Share Posted July 2, 2014 I actually belive, its something in the controller. Any suggestions? Link to comment Share on other sites More sharing options...
NemoPS Posted July 2, 2014 Share Posted July 2, 2014 Do you mean you want to hide the short description of favorite products, in the template? If so you can try editing favoriteproducts-account.tpl Link to comment Share on other sites More sharing options...
Vire Posted July 2, 2014 Author Share Posted July 2, 2014 I dont want to hide, i want to enable pictures there, as you can see on the watch_dogs example at http://evoxity.net/ there are pictures in the short discription. I get this " " instead of the icons on the short description of facvoriteproducts. Link to comment Share on other sites More sharing options...
Vire Posted July 3, 2014 Author Share Posted July 3, 2014 This is in the controller of the favoriteproduct frontoffice -> account: class FavoriteproductsAccountModuleFrontController extends ModuleFrontController { public $ssl = true; public function init() { parent::init(); require_once($this->module->getLocalPath().'FavoriteProduct.php'); } public function initContent() { parent::initContent(); if (!Context::getContext()->customer->isLogged()) Tools::redirect('index.php?controller=authentication&redirect=module&module=favoriteproducts&action=account'); if (Context::getContext()->customer->id) { $this->context->smarty->assign('favoriteProducts', FavoriteProduct::getFavoriteProducts((int)Context::getContext()->customer->id, (int)Context::getContext()->language->id)); $this->setTemplate('favoriteproducts-account.tpl'); } } } And this is the .tpl: {capture name=path} <a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}"> {l s='My account' mod='favoriteproducts'} </a> <span class="navigation-pipe">{$navigationPipe}</span> <span class="navigation_page">{l s='My favorite products' mod='favoriteproducts'}</span> {/capture} <div id="favoriteproducts_block_account"> <h1 class="page-heading">{l s='My favorite products' mod='favoriteproducts'}</h1> {if $favoriteProducts} <ul class="row"> {foreach from=$favoriteProducts item=favoriteProduct} <li class="col-xs-12"> <div class="favoriteproduct clearfix inner-content"> <a class="product_img_link" href="{$link->getProductLink($favoriteProduct.id_product, null, null, null, null, $favoriteProduct.id_shop)|escape:'html':'UTF-8'}"> <img src="{$link->getImageLink($favoriteProduct.link_rewrite, $favoriteProduct.image, 'medium_default')|escape:'html':'UTF-8'}" alt=""/> </a> <p class="s_title_block"> <a href="{$link->getProductLink($favoriteProduct.id_product, null, null, null, null, $favoriteProduct.id_shop)|escape:'html':'UTF-8'}"> {$favoriteProduct.name|escape:'html':'UTF-8'} </a> </p> <div class="product_desc">{$favoriteProduct.description_short|strip_tags|escape:'html':'UTF-8'}</div> <div class="remove"> <a href="#" onclick="return false" rel="ajax_id_favoriteproduct_{$favoriteProduct.id_product}"> <i class="icon-remove"></i> </a> </div> </div> </li> {/foreach} </ul> {else} <p class="alert alert-warning">{l s='No favorite products have been determined just yet. ' mod='favoriteproducts'}</p> {/if} <ul class="footer_links clearfix"> <li> <a class="btn btn-default button button-small" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}"> <span> <i class="icon-chevron-left"></i>{l s='Back to your account' mod='favoriteproducts'} </span> </a> </li> </ul> </div> So .. if anyone could tell me what i have to delete i would be very thankfull. Link to comment Share on other sites More sharing options...
NemoPS Posted July 3, 2014 Share Posted July 3, 2014 This part |strip_tags Get rid of it for the description_short part in the .tpl Link to comment Share on other sites More sharing options...
Vire Posted July 3, 2014 Author Share Posted July 3, 2014 Hm, now i get the pictures displyed as html code, would it possible to activate that as well? Link to comment Share on other sites More sharing options...
Vire Posted July 4, 2014 Author Share Posted July 4, 2014 I was 100% sure that it would work if i remove "strip_tags" no i just have: <div class="product_desc">{$favoriteProduct.description_short}</div> and it still dont enable html v.v rly weird. Link to comment Share on other sites More sharing options...
NemoPS Posted July 4, 2014 Share Posted July 4, 2014 I'm bugged, really, you should get the exact content as it's not even escaped anymore. Make sure you clear cache in the back office Link to comment Share on other sites More sharing options...
Vire Posted July 4, 2014 Author Share Posted July 4, 2014 (edited) Hey Nemo1 i have no clue .. i already reloaded the site without browser cache ctrl+f5 and resetted the server cache in the BO tons of time. Also trye dto delete the favoriteproducts-account.tpl but that doesnt effect it. seems like something goes wrong. Edit: Ah well, now it works. No idea why it took ages to clear the cache but w/e. Just 1 more problem and than the customizations are finally done. Amazing feeling to be honest. Thanks to this awesome community for the helpfull, help Edited July 4, 2014 by Vire (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts