When click on 'continue shopping', page goes to uc_ajax_cart/add/item. When refresh the cart page, it goes to the home page instead of the product page that i was viewing while addding to cart. Clean install with Ubercart and uc ajax cat installed only and garland theme.
Anyone has a solution, please help!

CommentFileSizeAuthor
#4 continue_shopping_url.jpg94.05 KBjoro78
page_not_found.jpg54.62 KBbellagio
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bellagio created an issue. See original summary.

bellagio’s picture

Issue summary: View changes
Bitvark’s picture

A quick "dirty" solution can be to patch ubercart/uc_cart/uc_cart.module, appending in function uc_cart_add_item:

if (strpos($_SESSION['uc_cart_last_url'], 'uc_ajax_cart/add/item') !== FALSE && $_SERVER['HTTP_REFERER'] != '') {
  $_SESSION['uc_cart_last_url'] = $_SERVER['HTTP_REFERER'];
}

to any occurrence of:
$_SESSION['uc_cart_last_url'] = current_path();

joro78’s picture

FileSize
94.05 KB

The proposed solution does not work for me :( Maybe I was not able to implement it right, thought.
However I have found an easy solution from the Shop settings (admin/store/settings/cart). You can set an URL to be used for the "Continue Shopping" link. I have also checked to use a button instead of link. You can also hide the link at all. Be sure that you have unchecked "Make continue shopping go back to the last item that was added to the cart." Now everything works fine.

bellagio’s picture

@joro78, Thank you for your suggestion. it is much better than showing blank page.