Link inside product overlay circle

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Jun 21, 2016 7:21 pm
Reply with quote
Report this post
Hi, I'm trying to insert a fixed link inside the overlay circle (say, www.nyt.com, below the price).
I've already customized the layout according to your instructions
https://www.gavick.com/forums/storebox- ... ized-50519
Now I'm wondering if it could be possible, maybe with a css trick, since it seems the product link involves the entire image area...
Please, give me your advice, or at least an idea on how to put a link inside every product thumbnail (and not outside)
User avatar
Senior Boarder

teitbite
Fri Jun 24, 2016 3:08 pm
Reply with quote
Report this post
Hi

I'm afraid I do not understand. Can You please tell me exactly how this should looks like and where do You want it ?
User avatar
Moderator

GK User
Fri Jun 24, 2016 4:35 pm
Reply with quote
Report this post
Well, I'd need to add an external link to "(Spese sped.escluse)" as in this image, to every product "bubble".
http://awesomescreenshot.com/02e5z4tnc2
Do you think it could be doable?
User avatar
Senior Boarder

teitbite
Mon Jun 27, 2016 8:48 am
Reply with quote
Report this post
Hi

Everything is possible, but I'm afraid this would require some extra codding to template and VM component which is beyond our support.

From Your screen I cannot tell if it's News Show Pro module or VM category layout. Either way, You would need to use one of unused/custom fields in product to keep this url. And than force either NSP or VM to show this address in a place You want. It's a customisation I'm afraid.
User avatar
Moderator

GK User
Mon Jun 27, 2016 6:04 pm
Reply with quote
Report this post
Thanks Teitbite, it's a category view.
I've managed to display a short description, but once I insert a link there, like in this view (for "limoncello")
http://bit.ly/298SC0y
the link is displayed below...
If you confirm I'd need a customization, and there's no other way, I'll surrender.
thanks anyway
User avatar
Senior Boarder

teitbite
Thu Jun 30, 2016 12:20 pm
Reply with quote
Report this post
Hi

Should it be the same link every time ? If yes than try edit /html/com_virtuemart/category/default.php and add it in line:

Code: Select all
<a href="<?php echo $product->link; ?>" class="product-overlay"><span><span><?php echo JText::_('TPL_GK_LANG_VM_VIEW'); ?></span></span></a>


like this:

Code: Select all
<a href="<?php echo $product->link; ?>" class="product-overlay"><span><span><?php echo JText::_('TPL_GK_LANG_VM_VIEW'); ?><a href="#link">Link</a></span></span></a>
User avatar
Moderator

GK User
Thu Jun 30, 2016 2:04 pm
Reply with quote
Report this post
Teitbite, this was that code in my html/.../default.php
Code: Select all
<a href="<?php echo $product->link; ?>" class="product-overlay">
                     <span>
                        <span>
                           </ br><?php echo " ",'<span class="PricesalesPriceCat" style="color:white; font-size:12px;">'.$product->product_name.'</span>'; ?>
                        </ br><?php echo " ",'<span class="PricesalesPriceCat" style="color:white; font-size:7px;">'.$product->product_s_desc.'</span>'; ?>
                           
                           </ br><?php
                           if ($product->prices['salesPrice']>0)
                           echo " ",'<span class="PricesalesPriceCat" style="color:white; font-size:15px;">'."</ br>Prezzo: ".round($product->prices['salesPrice'],2)." &euro;".'</span>'; ?>
                           
                     
                     </span>
                     </span>
                  </a>

and this is my code after you last suggestion
Code: Select all
<a href="<?php echo $product->link; ?>" class="product-overlay">
                     <span>
                        <span>
                           </ br><?php echo " ",'<span class="PricesalesPriceCat" style="color:white; font-size:12px;">'.$product->product_name.'</span>'; ?>
<!--                           </ br><?php echo " ",'<span class="PricesalesPriceCat" style="color:white; font-size:7px;">'.$product->product_s_desc.'</span>'; ?>-->
                           </ br><?php echo JText::_('TPL_GK_LANG_VM_VIEW'); ?><a href="https://www.drupal.org">Link</a>
                           </ br><?php
                           if ($product->prices['salesPrice']>0)
                           echo " ",'<span class="PricesalesPriceCat" style="color:white; font-size:15px;">'."</ br>Prezzo: ".round($product->prices['salesPrice'],2)." &euro;".'</span>'; ?>
                           
                                       </span>
                     </span>
                  </a>


The problem is still there http://bit.ly/298SC0y
:-(
unless I did something wrong...
User avatar
Senior Boarder

teitbite
Sat Jul 02, 2016 6:27 pm
Reply with quote
Report this post
Hi

Ok. Let's start over and change approach. Remove all the modifications and add this code to /layout/blocks/head.php

Code: Select all
<script type="text/javascript">(function($) {$(document).ready(function() {
$('.product-overlay > span > span').each(function(){
$(this).append('<a href="https://www.drupal.org">Link</a>');
});
});})(jQuery)</script>
User avatar
Moderator

GK User
Mon Jul 04, 2016 9:39 am
Reply with quote
Report this post
Excellent, it works!!!
Thank you very much, do you know if there's a way to create an override in order to keep the modifications in case of template updates?
User avatar
Senior Boarder

teitbite
Thu Jul 07, 2016 1:30 pm
Reply with quote
Report this post
Hi

I'm afraid not in this case. You will need to keep in mind that this file was modified and separate it during updates.
User avatar
Moderator


cron