VM My Cart

GK User
Mon May 20, 2013 6:25 pm
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.
User avatar
Gold Boarder

GK User
Tue May 21, 2013 9:00 am
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
User avatar
Gold Boarder

GK User
Tue May 21, 2013 2:20 pm
Thanks. I will take a look.
User avatar
Gold Boarder

GK User
Tue May 21, 2013 2:35 pm
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

Konrad, question.

So will this remove the whole pop up functionality? Again, I need to remove the popup from "My Cart" link and keep it for the icon on the right.
User avatar
Gold Boarder

GK User
Wed May 22, 2013 7:43 am
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.
User avatar
Gold Boarder

GK User
Wed May 22, 2013 3:01 pm
Hi Konrad. I was able to figure it out on my own and I did exactly what you have said with few other modifications.

Thanks.
User avatar
Gold Boarder

GK User
Fri May 31, 2013 4:07 am
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.

Hi Konrad, I have also tried to make the icon on the right a direct link following the example with "Register" link, but I could not get it to work.

Could you please help me out once again?

Thanks so much.
User avatar
Gold Boarder

GK User
Tue Jun 04, 2013 4:56 am
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.

Hi Konrad, did you get a chance to look into this?

Thanks.
User avatar
Gold Boarder

GK User
Tue Jun 04, 2013 8:44 am
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>
User avatar
Platinum Boarder

GK User
Tue Jun 04, 2013 2:52 pm
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>


Hi Bkrztuk,

I appreciate you response, but this is for the cart and not registration. Either way, I tried your solution and it did not work.
User avatar
Gold Boarder

GK User
Mon Jun 10, 2013 3:16 am
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>

Hello. Any updates on this issue? :)
User avatar
Gold Boarder

GK User
Tue Jun 11, 2013 8:51 am
Could you give me your site URL ? Did you unpublish our register module to avoid pop-up window ?
User avatar
Platinum Boarder

GK User
Wed Jun 12, 2013 5:12 am
bkrztuk wrote:Could you give me your site URL ? Did you unpublish our register module to avoid pop-up window ?

Hi Bkrztuk,

Thanks for getting back to me. I am not sure why you keep referring to registration. I need to be able to click on "My Cart" icon on the right and go directly to the cart rather than having a popup.

My question is how to do that?
User avatar
Gold Boarder

GK User
Fri Jun 14, 2013 10:52 pm
Please unpublish cart module published on 'cart' position.
User avatar
Platinum Boarder

GK User
Fri Jun 14, 2013 10:56 pm
bkrztuk wrote:Please unpublish cart module published on 'cart' position.

I will try that, but I need to keep the same position. What am I accomplishing by unpublishing it?
User avatar
Gold Boarder

GK User
Mon Jun 17, 2013 8:07 am
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';
            });
         }
User avatar
Platinum Boarder

GK User
Mon Jun 17, 2013 3:12 pm
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';
            });
         }


That worked!!!! :)

So I needed to keep

Code: Select all
    <a href="#" id="btnCart">


untouched and change .js file as you mentioned and it worked.

Thank you so much. I appreciate your help.
User avatar
Gold Boarder

GK User
Sun Jun 23, 2013 6:14 am
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';
            });
         }

Hello. I am sorry to bother you again, but the solution works only for non-logged in users. When I login nothing happens when I click on cart icon on the right. Do you know what is causing this behavior?
User avatar
Gold Boarder

GK User
Mon Jun 24, 2013 9:48 am
Hi,

Please provide me na URL to your website and the log in access data (please send me a PM message).
User avatar
Administrator

GK User
Tue Jun 25, 2013 4:21 am
dziudek wrote:Hi,

Please provide me na URL to your website and the log in access data (please send me a PM message).


Hi Driudek,

Thanks for writing back. I just sent you a PM.

Thank you in advance.
User avatar
Gold Boarder

GK User
Wed Jun 26, 2013 3:53 pm
@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.
User avatar
Administrator

GK User
Wed Jun 26, 2013 4:05 pm
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,

FIXED! That was it. One of the extensions was causing it. It wasn't hard for me to figure out which one. Thanks for the hint.

How did you know if was a JavaScript conflict?
User avatar
Gold Boarder

GK User
Wed Jun 26, 2013 5:15 pm
I saw the errors in the JavaScript console ;)
User avatar
Administrator

GK User
Wed Jun 26, 2013 5:27 pm
dziudek wrote:I saw the errors in the JavaScript console ;)

Makes sense. Thank you very much.
User avatar
Gold Boarder

GK User
Tue Jul 02, 2013 5:57 am
dziudek wrote:Hi,

Please provide me na URL to your website and the log in access data (please send me a PM message).

Dziudek, hello once again. It looks like I am having another issue with the same module. So I was looking to get rid of the popup both for the icon on the right and link on top.

I wanted the user to go directly to the cart. So it looks like we removed the icon popup, but the link on top started popping up again. Could you use the same credentials I sent you earlier and check that for me, please? I really need this to be fixed.

Thank you.
User avatar
Gold Boarder

GK User
Tue Jul 02, 2013 10:05 am
OK, but please confirm: do you want to remove the popup totally and left the cart icon with link to the cart page?
User avatar
Administrator

GK User
Tue Jul 02, 2013 2:25 pm
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?

Yes, I do want to remove the popup. So cart icon on the right and the link on the top should remain on the page. I just want to have a direct link rather than a popup.

Thank you for your time.
User avatar
Gold Boarder

GK User
Wed Jul 03, 2013 10:56 am
@romgavick - please send me an FTP access using the PM, because I've discovered that you didn't send it to me or I cannot found it :/
User avatar
Administrator

GK User
Thu Jul 04, 2013 7:27 am
Please check your page now - I've modified js/gk.scripts.js file only.
User avatar
Administrator

GK User
Fri Jul 05, 2013 2:59 am
dziudek wrote:Please check your page now - I've modified js/gk.scripts.js file only.

Dziudek, I checked many pages, but the cart icon is not clickable, it is not taking to the cart at all. :(
User avatar
Gold Boarder

GK User
Fri Jul 05, 2013 1:06 pm
Please check it now - it should works fine.
User avatar
Administrator

GK User
Fri Jul 05, 2013 3:54 pm
dziudek wrote:Please check it now - it should works fine.


Dziudek, it is not working. Are testing the live site? I sent you PM...
User avatar
Gold Boarder

GK User
Fri Jul 05, 2013 5:13 pm
Yes, I've tested the live site - please refresh your browser cache. For me it is still working.
User avatar
Administrator

GK User
Fri Jul 05, 2013 5:29 pm
dziudek wrote:Yes, I've tested the live site - please refresh your browser cache. For me it is still working.


That makes sense. I totally forgot about that. It works. Great! I really appreciate your help.

Thanks.
User avatar
Gold Boarder

GK User
Fri Jul 05, 2013 5:34 pm
So the only file affected was the .js one, correct?
User avatar
Gold Boarder

GK User
Fri Jul 05, 2013 5:36 pm
Yes, only this file was modified :)
User avatar
Administrator

GK User
Fri Jul 05, 2013 7:05 pm
Great! Thank you so much. :D
User avatar
Gold Boarder

GK User
Mon Jul 22, 2013 4:01 am
dziudek wrote:Yes, only this file was modified :)



Hi dziudek,

I am sorry to bother you again, but it looks like your solution partially worked. If you add multiple products to the cart and click on the icon, it cleans up all the item in the cart. Could you please look into this?

Thank you!
User avatar
Gold Boarder

GK User
Mon Jul 22, 2013 2:01 pm
It must be a problem with VM, because my script only redirects user to the MyCart subpage.
User avatar
Administrator

GK User
Mon Jul 22, 2013 2:06 pm
dziudek wrote:It must be a problem with VM, because my script only redirects user to the MyCart subpage.

Dziudek,

Thanks for checking that for me. Do you know what should I check, cause the links on the pop up and on top right work fine?
User avatar
Gold Boarder


cron