Possible to have moving cart icon with Joomla 3?

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
Wed Jun 12, 2013 8:11 am
Reply with quote
Report this post
Hi,

I'm building a site based on Gamebox and Joomla 3.1. It didn't include the shopping cart icon that appears in the Joomla 2.5 demo:

http://demo.gavick.com/joomla25/storebox/

... so I uncommented a few lines of code to make it appear (I also changed it to say "Reserve" since it's for a hotel site.)

It appears properly, but I noticed a great effect on the Joomla 2.5 demo site. When I scroll down the page, the cart icon moves along too, always appearing in the same upper-right corner. This doesn't happen on my client's Joomla 3.1 - if I scroll down, the icon moves up along with the rest of the page and is lost from view. Any idea how I can have the cart move like in the Joomla 2.5 demo, so it's always visible even when people scroll down?

Cheers,
Chris

reserve.jpg
User avatar
Fresh Boarder

GK User
Wed Jun 12, 2013 8:15 am
Reply with quote
Report this post
Here's a picture of the floating cart icon from the Joomla 2.5 demo site.
User avatar
Fresh Boarder

GK User
Wed Jun 19, 2013 7:15 pm
Reply with quote
Report this post
Sorry, should have posted this in the "Storebox" forum - just noticed I put it in "Gamebox" accidentally. Perhaps a moderator can move it...
User avatar
Fresh Boarder

teitbite
Thu Jun 20, 2013 11:29 am
Reply with quote
Report this post
Hi

Topic moved as requested. This icon was made for Virtuemart, so since there is no Virtuemart for joomla 3.0 available so it was not needed :) please show me Your site now.
User avatar
Moderator

GK User
Thu Jun 20, 2013 5:58 pm
Reply with quote
Report this post
teitbite wrote:Hi

Topic moved as requested. This icon was made for Virtuemart, so since there is no Virtuemart for joomla 3.0 available so it was not needed :) please show me Your site now.


It's under development and I can't post the link publicly yet; I'll send you a private message with the link.

Thanks!
Chris
User avatar
Fresh Boarder

teitbite
Fri Jun 21, 2013 6:46 pm
Reply with quote
Report this post
Hi

Please try to add this code to the end of /js/gk.scripts.js file:

Code: Select all
      if(document.id('gkPopupCart')) {
         var btn = document.id('btnCart');
         
         window.addEvent('scroll', function(e) {
            var scroll = window.getScroll().y;
            var max = document.id('gkMainWrap').getSize().y;
            var final = 0;
            if(scroll > 70) {
               if(scroll < max - 122) {
                  final = scroll - 50;
               } else {
                  final = max - 172;
               }
            } else {
               final = 20;
            }
            btn.setStyle('top', final + "px");
         });
         
         popup_cart = document.id('gkPopupCart');
         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 });
         var wait_for_results = true;
         var wait = false;
      }
User avatar
Moderator

GK User
Fri Jun 21, 2013 9:20 pm
Reply with quote
Report this post
teitbite wrote:Hi

Please try to add this code to the end of /js/gk.scripts.js file:


Thanks! That was very helpful. At first it didn't work, but then I placed it INSIDE the last function in that file and it worked (I had to make a few other changes too - if anyone else is interested, see attached screen captures).

Chris

inserted.jpg

default.jpg

css.jpg
User avatar
Fresh Boarder

GK User
Fri Jun 21, 2013 9:21 pm
Reply with quote
Report this post
Here's the final screenshot showing how I got it working (I could only attach three to my previous reply.)

Chris

commented.jpg
User avatar
Fresh Boarder

teitbite
Sat Jun 22, 2013 10:53 pm
Reply with quote
Report this post
Hi

Thank You for shearing the solutions with us :)
User avatar
Moderator

GK User
Sat Feb 08, 2014 4:19 am
Reply with quote
Report this post
Can you enable screenshots?
User avatar
Fresh Boarder

GK User
Sat Feb 08, 2014 4:50 am
Reply with quote
Report this post
yelyzaveta wrote:Can you enable screenshots?


Perhaps one of the moderators can figure out why the screen captures are no longer displaying? Unfortunately I don't have copies of them (I make dozens of screen captures per week)...

Chris
User avatar
Fresh Boarder

teitbite
Tue Feb 11, 2014 7:25 pm
Reply with quote
Report this post
Hi

I'm sorry, but we have changed a forum system and old images attached was not possible to move to a new system.
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.