Post by RJonesUSC » Thu Mar 17, 2011 5:03 am

Hi, I'm working on a project that requires a quick way of removing all items from the cart. Ideally, with a click of a button in the cart module. The placing of the button and all that is simple but what actually needs to be done to remove the contents of the cart? I've tried putting in a serialized empty array for the cart field for that user but the cart contents are still displayed in the module. Is there some sort of cache that I need to clear out as well? What would be the easiest way to do this and what steps are involved?

Thanks in advance

New member

Posts

Joined
Tue Feb 15, 2011 4:03 am

Post by Buildanewcomputer » Thu Mar 17, 2011 10:48 am

Hello,


I think you need to use the AJAX portion of the cart. i was able to make the remove button for each product remove automatically with the confirm? message window. This work needs to be done in cart.tpl in your template folder.

Hope this helps.


Posts

Joined
Thu Mar 17, 2011 9:19 am

Post by RJonesUSC » Thu Mar 17, 2011 1:32 pm

Thanks Buildanewcomputer, I'll start there. If you wouldn't mind, could you share the code you used to do that?

New member

Posts

Joined
Tue Feb 15, 2011 4:03 am

Post by SXGuy » Thu Mar 17, 2011 4:09 pm


Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by RJonesUSC » Thu Mar 17, 2011 10:07 pm

Yeah, I tried that but it doesn't seem to work with the latest release.

New member

Posts

Joined
Tue Feb 15, 2011 4:03 am

Post by Buildanewcomputer » Fri Mar 18, 2011 9:32 am

Here you go.

I mad a thread about it. All you need to do is re-point it to a button.

http://forum.opencart.com/viewtopic.php?f=20&t=28790


Posts

Joined
Thu Mar 17, 2011 9:19 am

Post by RJonesUSC » Sat Mar 19, 2011 1:11 am

Thanks Buildanewcomputer. Until this thread I hadn't even noticed the little remove buttons to the left of every item. I'm sure I can use that to somehow make a one click remove all button at the bottom of that module. Thanks for the tip.

New member

Posts

Joined
Tue Feb 15, 2011 4:03 am
Who is online

Users browsing this forum: No registered users and 62 guests