It would be cool to have an extra option in the "Continue shopping link" section to let it take you back to the catalog where you purchased an item from.

So if I was in a catalog called "Books", and I purchased a book from there, once I add the product to my cart, I am taken to my cart, and if I click "Continue Shopping", I'd like to go back to the list of Books i was origionally browsing.

CommentFileSizeAuthor
#8 uc_continue_shopping_fix.patch13.94 KBrszrama
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rszrama’s picture

Agreed. Someone else mentioned this yesterday at Drupalcon. I've got the logic built into the "Back" breadcrumb and may be able to move that into the Continue Shopping link. The question is how to add the setting option to the UI. Do you have any ideas?

andresc’s picture

I was thinking something along the lines of there where you have the link settings, maybe something like a radio selection to 1). go back to catalog, and 2). go to this link, or even work it like the option works, but make one check for .

rszrama’s picture

Hmm... I think the radio selection is more attractive, and particularly in Drupal 6 we'll be able to leverage the AHAH framework in the Forms API to drop down a box for the path if someone selects the custom path option. For now, I may just have to do a special check like you mention.

andresc’s picture

sounds good... shout if there's anything i can help with...

cool module btw !!

rszrama’s picture

Title: Continue Shopping link » Update cart breadcrumb and continue shopping link support
Version: 5.x-1.0-beta5 » 6.x-2.x-dev
Category: feature » task

I just don't like the way we're dealing with either one of these, both from a logic and code standpoint. Right now the code is in two separate places to handle this if the continue shopping link is a link or a button... that's just silly. Also, it doesn't support the referring page, which is also silly. The cart breadcrumb shouldn't be dynamic like it is now. The "Back" functionality should be moved into the continue shopping link (perhaps with a keyword or something), and the link should always be defined in the form builder function... just as a markup element if it's a text link. Duh...

rszrama’s picture

Assigned: Unassigned » rszrama
rszrama’s picture

I think here is the functionality I'm going to go for:

  1. The breadcrumb should be static. It's used to tell people where on the site they are, not to navigate around the site willy-nilly.
  2. If a user gets redirected to /cart by adding an item to the cart, the continue shopping element should either send them back or send them to a different URL based on the settings.
  3. If a user goes to /cart manually or some other way, the continue shopping element should send them to a specified URL since we can't say where "back" would be.
rszrama’s picture

Status: Active » Fixed
FileSize
13.94 KB

The above things are implemented with the attached patch. I've committed this and updated the settings forms to make the new settings clear. No update function is required, as I'm using existing variables. I tested this positively and will wait to see if any issues crop up during beta.

The only thing I'm not entirely fond of is the behavior if the continue shopping element is using the button type. The situation could arise where someone adds a product to their cart, leaves the cart page, and comes back to it manually later... the continue shopping button will send them to the page they first used to add the product to their cart. This is quite minor, though, so I'm not going to invest the time it would take to figure out a solution. : )

rszrama’s picture

(Oh, related to the issue with the button is the fact that if the customer updates their cart, the "back" URL used for the continue shopping link will be lost. Again, not worth the time it would take to find a fix.)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Andrew Jamieson’s picture

Status: Closed (fixed) » Active

Applied this patch and get the following error.

Warning: include_once(./sites/all/modules/ubercart/uc_cart/uc_cart.module) [function.include-once]: failed to open stream: Permission denied in C:\Program Files\wamp\www\photohire\includes\bootstrap.inc on line 601

Warning: include_once() [function.include]: Failed opening './sites/all/modules/ubercart/uc_cart/uc_cart.module' for inclusion (include_path='.;C:\php5\pear') in C:\Program Files\wamp\www\photohire\includes\bootstrap.inc on line 601

any ideas?

rszrama’s picture

Status: Active » Closed (fixed)

You shouldn't have had to apply this patch unless you were running a really old version of UC2. Be that as it may, your issue sounds like a separate support request. Please refer to the support forums on Ubercart.org.

ocassoc’s picture

We are not currently on Drupal 6. Although I know we need to get there, does a patch exist for Ubercart 1.7 or Ubercart 1.8? If not a patch, can the patch you distributed be manually updated and be expected to work on 1.7 or 1.8?

rszrama’s picture

I doubt this will be backported... it's quite a large patch, and we're really just doing maintenance on the 5.x branch, not adding features.

shivg55’s picture

Assigned: rszrama » shivg55
Status: Closed (fixed) » Needs review

how can solve ?

TR’s picture

Assigned: shivg55 » rszrama
Status: Needs review » Closed (fixed)

@shivg55: Please read up on how to report problems and how to use the issue queue:

http://drupal.org/node/314328
http://drupal.org/node/317

allanp’s picture

I don't quite understand if the original question was answered.

So if I was in a catalog called "Books", and I purchased a book from there, once I add the product to my cart, I am taken to my cart, and if I click "Continue Shopping", I'd like to go back to the list of Books i was origionally browsing.

Right now the "Continue shopping" button goes into a loop: from the cart it takes me back to the page of the individual product I just added to the cart.
Any idea how the "Continue shopping" button would always go back to the original catalog?