Jump to content
PrabuSS

Add More details link on quick view pop up

Recommended Posts

Hi

 

I would like to add "More detail" link on product quick view pop up. This "More detail" link will take through the users to respective product detail page. Now i'm using separate template file called product-quickview.tpl for quick view popup.

 

How do add this "More detail" in this file?

 

I've tried like this in my product-quickview.tpl

<a href="{$link->getProductLink($product.id_product, $product.link_rewrite)}">More Details</a>

But its messed up my quickview pop up design. Please any one?

 

PS  Version : 1.6.1.7

 

URL : https://www.applesupported.nl/presta_test

Share this post


Link to post
Share on other sites

Try var_dump on $product.id_product then you will see why it's not working.

Hi

 

Could you please make it clear? How do i do this?

Share this post


Link to post
Share on other sites

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 by Juke29 (see edit history)

Share this post


Link to post
Share on other sites

To be honest:

I don't understand the advantage of quick view. On one hand it's not or not much quicker than the standard view. On the other hand it leads so problems, dead links and other issues. So my question is: Why use this feature?

Share this post


Link to post
Share on other sites

for your info

in PS 1.7  catalog/_partials/quickview.tpl

<a href="{$product.url}">More details</a>

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More