|
Page: | 1 |
Topic: how to remove the redirect to the cart when you click "Add to Cart"
|
|
|
Lelik
2011-12-27 18:47:40
Votes: 0
|
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]&iQuantity=1" rel="nofollow">$lang[Basket_add]</a></div> <!-- END PRODUCTS_BASKET -->
how to convert it?
» Quick.Cart v4.x
|
treewood
OpenSolution
2011-12-27 19:22:15
Votes: 0
|
Lelik - then where you want to redirect when product is added to cart/basket ?
|
|
Lelik
2011-12-27 21:59:48
Votes: 0
|
treenwood, to the client was on the page, select the products
thx 4 all
|
|
cachousam
2012-01-21 07:37:50
Votes: 0
|
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
2012-01-22 09:31:16
Votes: 0
|
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
2012-01-22 09:39:27
Votes: 0
|
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
2012-01-23 06:46:13
Votes: 0
|
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
2012-01-23 08:53:49
Votes: 0
|
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
|
|
Page: | 1 |
|
|
|