how to remove the redirect to the cart when you click "Add to Cart"

Lelik

Avatar: Lelik

2011-12-27 18:47

how to remove the redirect to the cart when you click "Add to Cart"
I found a code that is responsible for this:
templates/pages_default.tpl

<!-- BEGIN PRODUCTS_BASKET -->
<
div class="basket"><a href="$aData[sBasketPage]iProductAdd=$aData[iProduct]&amp;iQuantity=1" rel="nofollow">$lang[Basket_add]</a></div>
<!-- 
END PRODUCTS_BASKET -->


how to convert it?

» Quick.Cart v4.x

treewood (OpenSolution)

Avatar: treewood

2011-12-27 19:22

Lelik - then where you want to redirect when product is added to cart/basket ?

baron_jon

Avatar: baron_jon

2011-12-27 19:24

http://opensolution.org/Quick.Cart/forum/?p=readTopic&nr=5266

boboo

Avatar: boboo

2011-12-27 19:39

http://opensolution.org/Quick.Cart/forum/dodaj-do-koszyka-ale-tam-nie-przeskakuj,6568.html

http://qc-plugins.kimla.de

Lelik

Avatar: Lelik

2011-12-27 21:59

treenwood, to the client was on the page, select the products

thx 4 all

cachousam

Avatar: cachousam

2012-01-21 07:37

hello
boboo, I tried your script on your given link . But the Polish translation of google is not very good and I can be wrong. Could you tell me the procedure in English.
Thanks a lot

cachousam

Avatar: cachousam

2012-01-22 09:31

Hello,
I'm sorry to insist, but it would be very nice to translate into English the procedure of post boboo. I do not know Polish,and this language is very difficult for google. This script would please me much.
Thank you all.

boboo

Avatar: boboo

2012-01-22 09:39

Do not be nervous :-)
I've improved the procedure, so it is not necessary to use the submit button in the products list. I use the link "as it is" with some changes in executing actions_client files.

Take a contact.

qc-plugins.kimla.de

cachousam

Avatar: cachousam

2012-01-23 06:46

thank you for your help.
I break my head with these files since a long time
I summarizes:

in templates/pages_defaut.tpl
added at the beginning of the file

<script type="text/javascript">
window.onload = function(){
if(window.name != "")
document.documentElement.scrollTop = window.name;
window.name = 0;
}
</script>

then in the same file find

<!-- BEGIN PRODUCTS_BASKET -->
<div class="basket">
<form method="post" action="" >
<input type="hidden" name="produkt" value="$aData[iProduct]" />
<input type="submit" class="dodaj" name="dodaj" value="$lang[Basket_add]" />
</form>
</div>
<!-- END PRODUCTS_BASKET -->

then replace
<input type="submit" class="dodaj" name="dodaj" value="$lang[Basket_add]" />

with:

<input type="submit" class="dodaj" name="dodaj" value="$lang[Basket_add]" onclick="window.name = document.documentElement.scrollTop;"/>

in the file actions-client/p.php find:

if (isset ($_POST['dodaj'])) {

replace with:

if (isset ($_POST['dodaj'])) {
$oOrder->addToBasket( $_POST['produkt'], 1 );
$oProduct =& Products::getInstance( );
$_SESSION['fOrderSummary'.LANGUAGE] += $oProduct->aProducts[$_POST['produkt']]['fPrice'];
$_SESSION['iOrderQuantity'.LANGUAGE] = $_SESSION['iOrderQuantity'.LANGUAGE] + 1;
}

I do not understand what we have to do with the file defaut.cc as you explained below

W default.css znajdź:
#products li .basket{...

i .basket zmień na: .dodaj
I poformatuj trochę, aby jakoś to wyglądało.

thank you again

My email is cachousam@yahoo.fr

boboo

Avatar: boboo

2012-01-23 08:53

The changes in .css are because I have added a button with class: dodaj
So, if You want to make it nice, add this class .dodaj or change #products li .basket{...
to #products li .dodaj{...
and format it a bit.

qc-plugins.kimla.de

Back to top
about us | contact