Dear Gavick,
Could you explain how to make the "My Cart" link to the cart directly and remove the modal pop up. I do want to leave the modal popup when user clicks on the cart image on the right, though.
Thank you.
Konrad M wrote:Hi,
here you have topic with explanation how remove register popup and direct link to register form. With my cart do same things https://www.gavick.com/forums/140/regis ... up#p114215
<a href="#" id="btnCart">
Konrad M wrote:So in your case you just need to go to layouts/default/.php and find:
- Code: Select all
<a href="#" id="btnCart">
and then remove id attribute and put url to your cart in href attribute.
Konrad M wrote:So in your case you just need to go to layouts/default/.php and find:
- Code: Select all
<a href="#" id="btnCart">
and then remove id attribute and put url to your cart in href attribute.
<a href="your/register/url" id="btnRegister">Register</a>
bkrztuk wrote:You just need to modify the same file and set URL to register page like below :
- Code: Select all
<a href="your/register/url" id="btnRegister">Register</a>
bkrztuk wrote:You just need to modify the same file and set URL to register page like below :
- Code: Select all
<a href="your/register/url" id="btnRegister">Register</a>
bkrztuk wrote:Could you give me your site URL ? Did you unpublish our register module to avoid pop-up window ?
bkrztuk wrote:Please unpublish cart module published on 'cart' position.
if(document.id('gkVmCartSmall')) {
document.id('gkVmCartSmall').addEvent('click', function(e) {
new Event(e).stop();
if(!wait) {
new Request.HTML({
url: $GK_URL + 'index.php?tmpl=cart',
onRequest: function() {
document.id('gkVmCartSmall').addClass('loading');
wait = true;
},
onComplete: function() {
var timer = (function() {
if(!wait_for_results) {
popup_overlay.fade(0.45);
popup_cart_fx.start({'opacity':1, 'height': popup_cart_h});
opened_popup = 'cart';
wait_for_results = true;
wait = false;
clearInterval(timer);
document.id('gkVmCartSmall').removeClass('loading');
new Fx.Scroll(window).toTop();
}
}).periodical(200);
},
onSuccess: function(nodes, xml, text) {
document.id('gkAjaxCart').innerHTML = text;
popup_cart.setStyle('display', 'block');
popup_cart_h = popup_cart.getElement('.gkPopupWrap').getSize().y;
popup_cart_fx = new Fx.Morph(popup_cart, {duration:200, transition: Fx.Transitions.Circ.easeInOut}).set({'opacity': 0, 'height': 0 });
wait_for_results = false;
wait = false;
}
}).send();
}
});
}
if(document.id('gkVmCartSmall')) {
document.id('gkVmCartSmall').addEvent('click', function(e) {
window.location.href = 'here/paste/your/cart/url';
});
}
bkrztuk wrote:So in this case you need to modify template Javascript code, there is no other way. Please open file template/js/gk.script.js and replace this code :
- Code: Select all
if(document.id('gkVmCartSmall')) {
document.id('gkVmCartSmall').addEvent('click', function(e) {
new Event(e).stop();
if(!wait) {
new Request.HTML({
url: $GK_URL + 'index.php?tmpl=cart',
onRequest: function() {
document.id('gkVmCartSmall').addClass('loading');
wait = true;
},
onComplete: function() {
var timer = (function() {
if(!wait_for_results) {
popup_overlay.fade(0.45);
popup_cart_fx.start({'opacity':1, 'height': popup_cart_h});
opened_popup = 'cart';
wait_for_results = true;
wait = false;
clearInterval(timer);
document.id('gkVmCartSmall').removeClass('loading');
new Fx.Scroll(window).toTop();
}
}).periodical(200);
},
onSuccess: function(nodes, xml, text) {
document.id('gkAjaxCart').innerHTML = text;
popup_cart.setStyle('display', 'block');
popup_cart_h = popup_cart.getElement('.gkPopupWrap').getSize().y;
popup_cart_fx = new Fx.Morph(popup_cart, {duration:200, transition: Fx.Transitions.Circ.easeInOut}).set({'opacity': 0, 'height': 0 });
wait_for_results = false;
wait = false;
}
}).send();
}
});
}
with :
- Code: Select all
if(document.id('gkVmCartSmall')) {
document.id('gkVmCartSmall').addEvent('click', function(e) {
window.location.href = 'here/paste/your/cart/url';
});
}
<a href="#" id="btnCart">
bkrztuk wrote:So in this case you need to modify template Javascript code, there is no other way. Please open file template/js/gk.script.js and replace this code :
- Code: Select all
if(document.id('gkVmCartSmall')) {
document.id('gkVmCartSmall').addEvent('click', function(e) {
new Event(e).stop();
if(!wait) {
new Request.HTML({
url: $GK_URL + 'index.php?tmpl=cart',
onRequest: function() {
document.id('gkVmCartSmall').addClass('loading');
wait = true;
},
onComplete: function() {
var timer = (function() {
if(!wait_for_results) {
popup_overlay.fade(0.45);
popup_cart_fx.start({'opacity':1, 'height': popup_cart_h});
opened_popup = 'cart';
wait_for_results = true;
wait = false;
clearInterval(timer);
document.id('gkVmCartSmall').removeClass('loading');
new Fx.Scroll(window).toTop();
}
}).periodical(200);
},
onSuccess: function(nodes, xml, text) {
document.id('gkAjaxCart').innerHTML = text;
popup_cart.setStyle('display', 'block');
popup_cart_h = popup_cart.getElement('.gkPopupWrap').getSize().y;
popup_cart_fx = new Fx.Morph(popup_cart, {duration:200, transition: Fx.Transitions.Circ.easeInOut}).set({'opacity': 0, 'height': 0 });
wait_for_results = false;
wait = false;
}
}).send();
}
});
}
with :
- Code: Select all
if(document.id('gkVmCartSmall')) {
document.id('gkVmCartSmall').addEvent('click', function(e) {
window.location.href = 'here/paste/your/cart/url';
});
}
dziudek wrote:Hi,
Please provide me na URL to your website and the log in access data (please send me a PM message).
dziudek wrote:@romgavick - do you have any modules/plugins available only for the logged in users? Because there is some JavaScript conflict, which is caused probably by the extension available only for the logged users.
dziudek wrote:I saw the errors in the JavaScript console
dziudek wrote:Hi,
Please provide me na URL to your website and the log in access data (please send me a PM message).
dziudek wrote:OK, but please confirm: do you want to remove the popup totally and left the cart icon with link to the cart page?
dziudek wrote:Please check your page now - I've modified js/gk.scripts.js file only.
dziudek wrote:Please check it now - it should works fine.
dziudek wrote:Yes, I've tested the live site - please refresh your browser cache. For me it is still working.
dziudek wrote:Yes, only this file was modified
dziudek wrote:It must be a problem with VM, because my script only redirects user to the MyCart subpage.