Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#8 | uc_continue_shopping_fix.patch | 13.94 KB | rszrama |
Comments
Comment #1
rszrama CreditAttribution: rszrama commentedAgreed. 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?
Comment #2
andresc CreditAttribution: andresc commentedI 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 .
Comment #3
rszrama CreditAttribution: rszrama commentedHmm... 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.
Comment #4
andresc CreditAttribution: andresc commentedsounds good... shout if there's anything i can help with...
cool module btw !!
Comment #5
rszrama CreditAttribution: rszrama commentedI 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...
Comment #6
rszrama CreditAttribution: rszrama commentedComment #7
rszrama CreditAttribution: rszrama commentedI think here is the functionality I'm going to go for:
Comment #8
rszrama CreditAttribution: rszrama commentedThe 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. : )
Comment #9
rszrama CreditAttribution: rszrama commented(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.)
Comment #11
Andrew Jamieson CreditAttribution: Andrew Jamieson commentedApplied 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?
Comment #12
rszrama CreditAttribution: rszrama commentedYou 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.
Comment #13
ocassoc CreditAttribution: ocassoc commentedWe 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?
Comment #14
rszrama CreditAttribution: rszrama commentedI 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.
Comment #15
shivg55 CreditAttribution: shivg55 commentedhow can solve ?
Comment #16
TR CreditAttribution: TR commented@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
Comment #17
allanp CreditAttribution: allanp commentedI don't quite understand if the original question was answered.
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?