Pages:

NOT go to the basket after clicking ''Buy''

Nisse

No avatar

2005-04-28 15:19

Is there a way to make the script NOT go to the basket after clicking "Buy"?

Thanks!

Wizzud

No avatar

2005-04-28 16:29

Sure.
Depending on the vresion of QC your are running:

QCv0.3.0 - edit actions_client.php
QCv0.2.x - edit index.php

search down for the FIRST instance of 'addBasketProduct' and insert the following 2 lines immediately below the line containing 'addBasketProduct':

echo "<script type='text/javascript' language='javascript'>window.alert('Added to Basket');window.location='{$_SERVER['HTTP_REFERER']}';</script>";
exit;

You need the alert because otherwise your user might not realise that the item has been added to the basket and will keep pressing the button!

treewood (OpenSolution)

Avatar: treewood

2005-04-28 16:31

wizzud - it is good way but $_SERVER['HTTP_REFERER'] is not best way. manual says about it:
"Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted. "

witaj.net

Wizzud

No avatar

2005-04-28 17:10

How about this instead?:

echo "<script type='text/javascript' language='javascript'>alert('Added to Basket!');window.history.back();</script>";
exit;

Bengan

No avatar

2005-06-02 14:18

actions_client.php? No, I found the descripted line on line 17 in actions_client/orders.php and it works just fine. (Version 0.3.0)
Great feature!

wizzud

No avatar

2005-06-02 18:21

Yeh, sorry 'bout that - missed out a bit!

deleak

No avatar

2005-10-13 08:55

I was put the code but the result is empty.
Any idea ?

LeoGetz

Avatar: LeoGetz

2006-02-17 17:32

Where should I do it in your 0.3.0 loaded version Wizzud?

wizzud

No avatar

2006-02-17 17:54

LeoGetz >>
actions_client/orders.php, immediately below the first line containing 'addBasketProduct'

LeoGetz

Avatar: LeoGetz

2006-02-17 18:17

thx, but I don´t want the alert. I just want the product in the basket, and still have the same page in front of me. What should I delete if I want that?

LeoGetz

Avatar: LeoGetz

2006-02-17 18:36

I noticed a very serious problem with that function wizzud. The product is not added to basket if you are running with productAttributes. It´s only added if the product don´t have a attribute.

wizzud

No avatar

2006-02-17 19:51

Hmmm...
Best not do it then. Especially if it doesn't do what you want anyway!
Need to take another look ...

LeoGetz

Avatar: LeoGetz

2006-02-17 20:05

thx, I would be very greatful if you help me, because I want that function to work, I need it.

LeoGetz

Avatar: LeoGetz

2006-02-18 23:08

Sorry Wizzud, hehe! It works, It was my mistake. You don´t have to look into that.

~vitek

No avatar

2006-04-30 12:10

What I have to change in 1.2 version? Any ideas?

~vitek

No avatar

2006-04-30 16:40

Wizzud - I'm sure u can help ))

vitek

No avatar

2006-05-15 12:51

Guys anybody know how to make it in 1.2 version??

vitek

No avatar

2006-05-16 00:19

I've wrote to the DEVs, they've sent me to the forum. And no answer here :) Heelp!

vitek

No avatar

2006-05-18 19:09

Does developers has a solution to that?

wewior (OpenSolution)

Avatar: wewior

2006-05-19 07:20

try to change line

header'Location: '.$_SERVER['PHP_SELF'].'?p=ordersBasket' );


in actions_client/order.php

Pages:
Back to top
about us | contact