You were trying to use a relative anchor.
Last edited by ahtisham454 on Sat Jan 26, 2013 2:37 pm, edited 2 times in total.
Has anyone been able to get anchors working on the pop up fancybox for the Terms and Conditions during checkout?
I tried adding the code below to the header and it corrected normal anchor usage but it made the links in the fancybox direct to the home page where previously at least they were linking to the correct anchor on the Terms and Conditions page.
The problem I have with this is that if a customer clicks on a link within the pop up fancybox there is the chance that you may lose them and they abandon the cart.
If possible I would like to either somehow enable anchors in the fancybox or another method would be disable links completely within the Terms and Conditions fancybox. Any suggestions?
Edit: I actually found a solution that works to remove links on the fancybox (no more diverted and potentially lost customers). A little off track for the original thread but thought I would place it here in case it helps anyone.
In the file: catalog/view/javascript/jquery/fancybox/jquery.fancybox-1.3.4.css
Add this to the stylesheet...
This also did not disable the next arrows for product images as they appear to be within a different class. Haven't found any negatives to doing this, unless anyone can suggest any?
I tried adding the code below to the header and it corrected normal anchor usage but it made the links in the fancybox direct to the home page where previously at least they were linking to the correct anchor on the Terms and Conditions page.
Code: Select all
<!--START Anchor Redirect-->
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("a[ href ^= '#' ]").each(function() {
var href = window.location + jQuery(this).attr('href').replace('/#.*/i','');
jQuery(this).attr('href',href);
});
});
</script>
<!--END Anchor Redirect-->
If possible I would like to either somehow enable anchors in the fancybox or another method would be disable links completely within the Terms and Conditions fancybox. Any suggestions?
Edit: I actually found a solution that works to remove links on the fancybox (no more diverted and potentially lost customers). A little off track for the original thread but thought I would place it here in case it helps anyone.
In the file: catalog/view/javascript/jquery/fancybox/jquery.fancybox-1.3.4.css
Add this to the stylesheet...
Code: Select all
#fancybox-content a {
display: none;
}
Thank you, this solved the issue for me.keclap wrote:I believe I've managed to solve this problem. Posting it here in case someone will need it someday
Link should be created this way:Of course do not forget to set anchor somewhere in document:Code: Select all
<a href="<?php echo $_SERVER["REQUEST_URI"]; ?>#anchor">link</a>
Code: Select all
<a name="anchor">Jump here</a>
Who is online
Users browsing this forum: No registered users and 190 guests