undesigned Posted March 24, 2016 Share Posted March 24, 2016 (edited) How to insert an URL with Product more details in quick view? `` After the button Add to cart. Which are the form for the URL? See attach. Edited March 24, 2016 by undesigned (see edit history) Link to comment Share on other sites More sharing options...
shokinro Posted March 28, 2016 Share Posted March 28, 2016 try this code <a href="{$link->getProductLink($product->id_product, $product->link_rewrite)}">More Details</a> Link to comment Share on other sites More sharing options...
undesigned Posted March 28, 2016 Author Share Posted March 28, 2016 try this code <a href="{$link->getProductLink($product->id_product, $product->link_rewrite)}">More Details</a> I`ve tried to put the cod in product_list.tpl - Quick View but i get 500 Server Error. Any ideas? Link to comment Share on other sites More sharing options...
shokinro Posted March 28, 2016 Share Posted March 28, 2016 if it is on product list page, you can try use this <a href="{$link->getProductLink($product.id_product, $product.link_rewrite)}">More Details</a> Link to comment Share on other sites More sharing options...
undesigned Posted April 6, 2016 Author Share Posted April 6, 2016 Thank you shokinro. I`ve tried in product_list.tpl in Quick view section but without success. Where must to insert it? Link to comment Share on other sites More sharing options...
shokinro Posted April 6, 2016 Share Posted April 6, 2016 does not link shows up on the page? is the link URL incorrect? or any error message? usually it should work please also try to set Smarty "force compile" and "No cache" to make sure your changes are taken in effect. at back office - Advanced Parameters - Performances Link to comment Share on other sites More sharing options...
Juke29 Posted August 25, 2017 Share Posted August 25, 2017 (edited) The solution you were looking for in order to display a link to the full product page in quick view iframe is : <a href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}{$product->id}-{$product->link_rewrite}-{$product->ean13}.html">More Details</a> When you do a <pre>{$product|@print_r}</pre> you get all that you need. The problem is that it will refresh the page inside the iframe and load product full page inside the iframe... So I searched in the JS what was making the clicking event on the image trigger a product page load. And I found this in mytheme/js/product.js: if (typeof(contentOnly) !== 'undefined' && contentOnly) { $(document).on('click', '.fancybox', function(e){ e.preventDefault(); }); $(document).on('click', '#image-block', function(e){ e.preventDefault(); var productUrl = window.document.location.href + ''; var data = productUrl.replace(/[\?|&]content_only=1/, ''); if (window.parent.page_name == 'search') data += ((data.indexOf('?') < 0) ? '?' : '&') + 'HTTP_REFERER=' + encodeURIComponent(window.parent.document.location.href); window.parent.document.location.href = data; return; }); } I don't know why when I added my link's ID, the function did not wok. I ran out of time for now and I did not care to keep the image click. So I renamed my "More details" link ID into #image-block in my mytheme/product.tpl and that's it. It is my temporary solution: {if !$content_only} <span class="moredetails"><span>>></span> <a href="#more_info_block">{l s='More details'}</a> </span> {elseif $content_only} <span class="moredetails"><span>>></span> <a id="image-block" href="#">{l s='More details'}</a> </span> {/if} If it is not displaying the quick view window ($content_only) I show my #image-block ID on my <a> link. Of course an ID should be unique, so I did quite the same with the ID of the image container on quick view pages: <div id="{if !$content_only}image-block{else}image-block-a{/if}" class="clearfix"> And I applied my css rules on both image-block and image-block-a too, so that it is not broken on quick view or on product page. .pb-left-column #image-block, .pb-left-column #image-block-a {/*Whatever styles you need, I use default-bootstrap theme*/} Edited August 25, 2017 by Juke29 (see edit history) Link to comment Share on other sites More sharing options...
mskbro Posted December 6, 2019 Share Posted December 6, 2019 (edited) In PS1.6.0.9 i added code below with my id in product.tpl {if $content_only} <div id="goto-product-page">{l s='More details'}</div> {/if} and added this id to js function in product.js $(document).on('click', '#image-block, #goto-product-page', function(e){ e.preventDefault(); var productUrl = window.document.location.href + ''; var data = productUrl.replace('content_only=1', ''); window.parent.document.location.href = data; return; }); plus style in product.css #goto-product-page { font-size: 12px; cursor: pointer; } and all works fine Edited December 6, 2019 by mskbro (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now