Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add to basket without reload


samsam92

Recommended Posts

Posted

Hi,

 

After searching the forums I didn't find this problem.

 

In fact, in my shop, in the product listing page I have a button that allow to add directly the product to the basket.

 

When I click this button, it refreshs the page and insert correctly the product to the shopping cart box.

 

What I would like to do is to avoid refreshing the page, and adds the product directly to the shopping cart box instantanetly.

 

I hope the explanation is enough clear.

 

To avoid refreshing the listing page when I add a product and puts it directly to the cart box.

 

Does anyone have any suggestion ?

 

Thanx a lot !

 

Sam

Posted

i think you are gonna struggle with that one

it refreshes so it can run the 'add to basket' code

without a refresh it will not realise that you want to add to basket so it will not do it.

 

you can stop it re-directing to the shopping basket after it has added though.

if you go to the admin area and (i think) 'my store' there is an option that says-redirect to shopping basket - set this to false.

always here to offer some useless advice....

Posted
What I would like to do is to avoid refreshing the page, and adds the product directly to the shopping cart box instantanetly.
Refreshing the page is how it communicates between the browser and the server. Without it, the browser event (clicking on the buy_now button) can't affect the server (which holds the cart info). There may be something that you can do in javascript to handle the notification, but I don't know of a current contribution for that.

 

Hth,

Matt

Always back up before making changes.

Posted

Thanx for your answers.

 

I know how it works, I thought about a javascript solution but I'm unable to develop such a script.

 

Maybe I'll found a solution, I'll keep you in touch

 

Thanx a lot

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...