Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Display Cart in Shadowbox when Add to cart is clicked.

Display Cart in Shadowbox when Add to cart is clicked.

Views: 1,144

Results 1 to 7 of 7
23 Feb 2012, 1:07 PM
#1
lovetheecom avatar

lovetheecom

New Zenner

Join Date:
Feb 2012
Posts:
7
Plugin Contributions:
0

Display Cart in Shadowbox when Add to cart is clicked.

Hello Zencart Ninjas. :cool:

I am trying to replicate a function seen is this site.

https://www.webtogs.com

When you add something to the cart on this site, the cart pops up in a shadow/light box style, and there is no page redirection.

Now I understand that this is possible to some degree in zencart, but i cant work out how to modify the Add to cart button functions.

I presume this could be done by using a notification system?

On some Zencarts there is a notification bar that pops up when you add something to the cart saying "Successfully added product to cart"

I am sure other people would like the same sort of functionality.

So may be good thread.

My Idea was to take this notification bar and change it to function like a shadow box, I have no issue with the layout changes needed. I just need to know how to tie into or change the addtocart function.

23 Feb 2012, 1:22 PM
#2
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Display Cart in Shadowbox when Add to cart is clicked.

You might want to start with a mod that puts the cart into the header or sidebox, such as Cart Contents Sidebox. That should give you all the cart code you need, all nice and tidy. As for getting it into a popup, I would welcome such a mod. :bigups:

Rob

23 Feb 2012, 1:24 PM
#3
lovetheecom avatar

lovetheecom

New Zenner

Join Date:
Feb 2012
Posts:
7
Plugin Contributions:
0

Re: Display Cart in Shadowbox when Add to cart is clicked.

Thanks for your input Rob.

Ok, I will try a mod out that puts the cart on the main page and see if I can come up with anything that works well.

My Main issue is getting the cart to popup when something is added to the cart.

Any other pointers/ideas would be greatly appreciated.

23 Feb 2012, 2:52 PM
#4
lovetheecom avatar

lovetheecom

New Zenner

Join Date:
Feb 2012
Posts:
7
Plugin Contributions:
0

Re: Display Cart in Shadowbox when Add to cart is clicked.

Could there be a way to use the message stack System?

23 Feb 2012, 8:46 PM
#5
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: Display Cart in Shadowbox when Add to cart is clicked.

I wonder if it would be possible to adapt the code from Zen Lightbox?

24 Feb 2012, 8:40 PM
#6
lovetheecom avatar

lovetheecom

New Zenner

Join Date:
Feb 2012
Posts:
7
Plugin Contributions:
0

Re: Display Cart in Shadowbox when Add to cart is clicked.

Ok, So i did some investigation and I think this could work.

http://www.bram.us/2007/07/30/my-code-snippet-automatically-start-lightbox-on-page-load/

Can anyone possibly give me a pointer on how I could implement this function, So that once add to cart has been clicked and the new page refreshes my lightbox loads on pageload?

Just a few nudges to the right file in question?

7 Mar 2012, 12:26 PM
#7
lovetheecom avatar

lovetheecom

New Zenner

Join Date:
Feb 2012
Posts:
7
Plugin Contributions:
0

Re: Display Cart in Shadowbox when Add to cart is clicked.

Hello Again,

So further inspection leads me to believe i am looking for the cart actions file.

Anyone willing to divulge any helpful information?