Home › Support › Image Store › Redirect after cart
-
AuthorPosts
-
January 15, 2014 at 6:11 am #56753andrewParticipant
I would make sure that after the user enter the picture into Cart, after cart successfully updated, is redirected to the payment.
I’m interested, where I see page size, select, quantity.
Otherwise, so the user loses in the system for too many steps. If you do a redirect when use click buy now. It will be more simple.January 17, 2014 at 9:11 am #56787andrewParticipantIt’s possibile redirect user for payment ? Because more step now for clients.
January 17, 2014 at 10:58 pm #56789Xpark MediaKeymasterYour question is not very clear, do you want to redirect the user just after they add a product to the cart?
To redirect users you can use javascript
<script type="text/javascript"> <!-- window.location = "http://www.google.com/" //--> </script>
or wordpress using wp_redirect()
January 18, 2014 at 2:16 am #56792andrewParticipantYes, but the problem is make when $messages == 1
if ( isset( $_COOKIE[ 'ims_message_' . COOKIEHASH ] ) ) { $messages = array( '1' => __( 'Carrello aggiornato con successo', 'ims' ), '2' => __( 'Aggiornamento con successo', 'ims' ), ); $this->message = $messages[ $_COOKIE[ 'ims_message_' . COOKIEHASH ] ]; }
Thanks support
January 20, 2014 at 8:55 pm #56798Xpark MediaKeymasterif you use the wordpress php option wp_redirect(); and set the cookie, also you can use javascript to set the cookie or display your own message.
January 21, 2014 at 1:44 am #56804andrewParticipantI’m try in this mode, but not working. Where is the error?
if ( isset( $_COOKIE[ 'ims_message_' . COOKIEHASH ] ) ) { $messages = array( '1' => __( 'Carrello aggiornato con successo', 'ims' ), '2' => __( 'Aggiornamento con successo', 'ims' ), ); $this->message = $messages[ $_COOKIE[ 'ims_message_' . COOKIEHASH ] ]; if ($messages[ $_COOKIE[ 'ims_message_' . COOKIEHASH ]] == 'true' && $messages == '1' ) { wp_redirect( 'http://www.example.com', 301 ); exit; }
January 21, 2014 at 9:08 pm #56809Xpark MediaKeymasterThe form is submitted using ajax, the code above does redirect on the ajax call but not the user page.
What you wan to do is bind a javascript function to the submit botton
$( 'body' ).delegate( 'input[name="ims-add-to-cart"]', 'click', function( e ){ $(document).bind( "ajaxComplete", function(){ window.location = "http://www.google.com/" }) }
January 22, 2014 at 5:19 am #56813andrewParticipantOh great, work perfectly. Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.