• Posted by TJ311 11 months ago.
  • There are 12 posts. The latest reply is from zonerdck
  • not resolved
  • WordPress version: Not Supplied
  • WP e-Commerce version: Not Supplied

Tags

The free community support forum is a place where WP e-Commerce users can work with other WP e-Commerce users to help one another get their shops up and running. There is no gaurantee that an Instinct staff member will respond to your topic within the free forum.

Acting out, swearing and threats are not tolerated, please play nice, we are all doing the best we can with the resources available.

 

  1. TJ311
    New Member

    When I submit my cart, it bumps to paypal but if I cancel, it kicks back to my transaction details page but does not show transaction canceled or anything like that. Nor does it empty my cart. Any ideas?

    Thanks!

    Posted 11 months ago #

  2. bopheim
    New Member

    Same here.. Would be nice with a page actually telling people that they canceled the order...

    Posted 9 months ago #

  3. cannyt
    New Member

    I agree

    Posted 8 months ago #

  4. bghouse
    New Member

    Has anyone had a resolution to this? I'm not getting a cancelled either, and it seems to still be recording the order as a sale in the backend.

    If happy to go fix this code myself if someone will point me in the right direction.

    Posted 5 months ago #

  5. bghouse
    New Member

    Okay, I fixed this for myself and I wanted to post the steps I followed in case this will help anyone else. I hope the code comes across okay.

    So, step # 1. I created a page in Wordpress called "Transaction Canceled". On here, I put some text about you have canceled your order... your items are still in your cart and you can checkout again... etc.

    Next, since I'm using PayPal Standard, I went to the /blog/wp-content/plugins/wp-e-commerce/merchants/paypal_multiple.php file.

    In here, you want to search for:

    // paypal connection variables

    This gets you to the section where the HTML variables passed to paypal are constructed.

    In there you will see this line:

    $data['cancel_return'] = urlencode($transact_url);

    Change this so that it goes to the page you just made like this:

    $data['cancel_return'] = urlencode('http://www.YOURWESBSITE.com/blog/products-page/transaction-canceled');

    While this won't change the behavior of an order being booked into the sales section, it will at least deliver a better experience to the consumer.

    Note, there are other ways you could do this - like defining another variable to pass or a language variable for the cancel_return. This is just the fastest way to implement the fix that I could find, not necessarily the prettiest ;-)

    Posted 5 months ago #

  6. ewaewa
    New Member

    Thanks bghouse, I'll give this a go for now but I hope this will be fixed in 3.7.6 when released.

    Posted 5 months ago #

  7. findigart
    New Member

    hello bghouse,

    i tried to implement your solution and changed paypal_multiple.php acoording to your advise however it does not affect anything. i am working with the paypal express option, could it be that this is not the file i need to change?

    thanks!!

    Posted 5 months ago #

  8. stoo
    New Member

    Hi,

    If you have access to the database you can edit the page a transaction is cancelled in the wp-options table - it's in the row where option_name = 'transact_url'.

    To change it run this SQL ( backup the table first, just in case... ):

    UPDATE wp-options
    SET option_value = 'http://www.YOURWESBSITE.com/page-to-return-to-if-cancelled'
    WHERE option_name = 'transact_url'

    doesn't help with the order status but it might be a bit easier than editing the php.

    Thank @bghouse for the idea though :)

    Posted 5 months ago #

  9. stoo
    New Member

    Hi,

    If you have access to the database you can edit the page a transaction is cancelled in the wp-options table - it's in the row where option_name = 'transact_url'.

    To change it run this SQL ( backup the table first, just in case... ):

    UPDATE wp-options
    SET option_value = 'http://www.YOURWESBSITE.com/page-to-return-to-if-cancelled'
    WHERE option_name = 'transact_url'

    doesn't help with the order status but it might be a bit easier than editing the php.

    Thank @bghouse for the idea though :)

    Posted 5 months ago #

  10. stoo
    New Member

    this site also seems to throw up a blank screen after a post - appologies for the double post above....

    Posted 5 months ago #

  11. stoo
    New Member

    If everyone could ignore the post above - I've just discovered that by changing this in the db it also changes the url when the transaction is successful......

    Posted 5 months ago #

  12. zonerdck
    New Member

    Here is an if statement that you can put at the bottom of transaction_results.php page to display what you want without having to make another page

    if($_SESSION['wpsc_previous_selected_gateway']== 'dps') {
    		$sessionid = decrypt_dps_response();
    		//exit($sessionid);
    		if($sessionid != ''){
    		//exit('<pre>'.print_r($sessionid, true).'</pre>');
    			transaction_results($sessionid, true);
    		}else{
    			_e('<div class="post">Sorry your transaction was not accepted.<br /><a href='.get_option("shopping_cart_url").'>Click here to go back to the checkout page.</a></div>');
    		}
           } else if(transaction_results($sessionid, true) == ''){
           echo '<div class="post">Sorry your transaction was not completed.<br /><a href='.get_option("shopping_cart_url").'>Click here to go back to the checkout page.</a></div>';
    	} else {
           echo '<div class="post">';
    	echo transaction_results($sessionid, true);
           echo '</div>';
    	}

    This is the statement for my results page it just redirects the user back to the checkout page. You can do whatever you want.

    } else if(transaction_results($sessionid, true) == ''){
           echo '<div class="post">Sorry your transaction was not completed.<br /><a href='.get_option("shopping_cart_url").'>Click here to go back to the checkout page.</a></div>';
    	}
    Posted 4 weeks ago #

RSS feed for this topic

Reply

You must log in to post.