Closed (fixed)
Project:
Ubercart
Version:
6.x-2.x-dev
Component:
Cart/checkout
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
11 Feb 2011 at 23:40 UTC
Updated:
19 Oct 2011 at 16:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
neclimdulPosting patches late friday is apparently not working for me. Here's the patch.
Comment #2
longwaveLooks like the drupal_match_path() call doesn't match just "cart", is this correct?
Comment #3
neclimdulThat's correct. It matches anything under cart. This maybe a little overkill but it was easier that 4 calls to match the previous 4 pages.
$pages = array('cart', 'cart/checkout', 'cart/checkout/review', 'cart/checkout/complete');Also, it personally made more sense as anything under cart/ would be linked to the cart and dynamic so should avoid caching. Its easy enough to convert to the 4 explicit matches though.
Comment #4
longwaveNo, what I meant was doesn't
drupal_match_path($_GET['q'], 'cart/*')miss the main shopping cart page at /cart ? (as it doesn't have a trailing slash) - perhaps it should bedrupal_match_path($_GET['q'], 'cart\ncart/*')instead?Comment #5
neclimduloh interesting, I'll check
Comment #6
tr commentedChanged status to reflect #4 and #5.
Comment #7
longwaveSeems like it would be simpler and more readable to just use
if (arg(0) == 'cart') { ... }here.Comment #8
neclimdulI generally loath to use arg() but I can't argue that it seems a good fit here. Updated patch.
Comment #9
neclimdulRerolled around some whitespace changes.
Been running happily for 6 months now so... since maintainer response was positive and the code is well tested in CacheExclude and the only functionality change was maintainer requested I'm going to go ahead and mark this RTBC. Sorry if I'm overstepping my bounds there.
Comment #10
longwaveCommitted. Not ported to 7.x because #1285818: Remove uc_cart_exit() and cache-safe cart block should solve this instead.