2012-12-12 15:35
hi there, i need to know if there´s any chance not to be redirect to the basket form after clicking "add to basket". i´ve searched the forum but only found some suggestions for older versions of quickcart. i´m running 5.2. i´ve tried to transfer those solutions to the newer version but i failed. any help would be much appreciated. thx in advance. rgds jaypee ps: i also don´t need no javascript "allert" field
» Quick.Cart v5.x 2012-12-12 17:17
The last time I tested this solution, it didn't work properly on v5. With v3 and v4 was ok.
2012-12-12 17:24
yeah, i ever think so before. want to know as well :D
2012-12-12 18:10
I have a solution, but it is not fully finished. Maybe someday...
2012-12-13 12:00
thanks so far! here it is :-) solution base upon the script from member "Wizzud". ...actions/pages_orders.php on line 35 change to: // add product to basket $oOrder->saveBasket( Array( $iProductAdd => $iQuantity ), true ); echo "<script type='text/javascript' language='javascript'>alert('Added to Basket!');window.history.back();</script>"; exit; header( 'Location: '.dirname( $aUrls['sUrl'] ).'/'.( defined( 'MOBILE' ) ? 'mobile.php' : null ).$aData['sLinkName'] ); exit; disadvantage: didn´t show the item quantity in the small basket in the headline but for me, this is not really important... maybe another member solve this "problem". regards jaypee
2012-12-16 22:27
Someone have a hint or solution for this in QCv5.2?
cgan 2012-12-21 13:21
In v5.2 you can change in actions/pages-orders.php code:
header ( 'Location: ' . dirname ( $aUrls [ 'sUrl' ] ). '/' .( defined ( 'MOBILE' ) ? 'mobile.php' : null ). $aData [ 'sLinkName' ] );
to:
if( isset( $_SERVER [ 'HTTP_REFERER' ] ) ){ $oOrder -> listProducts ( 'orders_step-1.tpl' ); // only to refresh basket data header ( 'Location: ' . $_SERVER [ 'HTTP_REFERER' ] ); } else header ( 'Location: ' . dirname ( $aUrls [ 'sUrl' ] ). '/' .( defined ( 'MOBILE' ) ? 'mobile.php' : null ). $aData [ 'sLinkName' ] );
2013-03-29 14:55
And can you advice me how to make it in Q.C version 6?
2013-03-29 15:31
order-step-1.php find this:
header ( 'Location: ' . dirname ( $aUrls [ 'sUrl' ] ). '/' . $aData [ 'sLinkName' ] );
and change to:
if( isset( $_SERVER [ 'HTTP_REFERER' ] ) ){ $oOrder -> listProducts ( ); // only to refresh basket data header ( 'Location: ' . $_SERVER [ 'HTTP_REFERER' ] ); } else header ( 'Location: ' . dirname ( $aUrls [ 'sUrl' ] ). '/' . $aData [ 'sLinkName' ] );
I guess this should work. Maybe wewior will provide you with better solution. Also there are no message, that the product was added to your basket.