I have the following configuration:

Drupal 7.12 - Ubercart 3.0 - Internationalization 1.4

Internationalization settings: Language detection set to "url"
Ubercart cart settings: Add to cart redirect set to "<none>"

When I am on a product page, for instance "\en\products\product-x", and I click the "Add to cart" button, I am redirected to "\en\en\products\product-x", which obviously gives me a 404 "Page not found" error.

Not sure if this issue is uc_cart or i18n, but for some reason the language part of the url gets in there twice.

The same happens for the "Continue shopping" link on the Shopping cart page when the "Make continue shopping go back to the last item that was added to the cart." checkbox is enabled in the cart settings.

Comments

fretje’s picture

Issue summary: View changes

added same issue for "continue shopping" link

longwave’s picture

The second part of the issue is already reported in #1429756: Continue Shopping with i18n duplicates language prefix, the fix is probably the same or similar.

fretje’s picture

@longwave: This is indeed partly the same issue.
In addition to the fix of epawel in #2 in #1429756: Continue Shopping with i18n duplicates language prefix (chopping of the first 3 chars of $_SESSION['uc_cart_last_url']), I also had to chop of the first 3 chars of the returnvalue of the uc_cart_add_item function.

Like epawel already mentions in his comment, this is a very ugly hack, but it does the job...

longwave’s picture

Status: Active » Closed (duplicate)
longwave’s picture

Issue summary: View changes

added "when the "Make continue shopping go back to the last item that was added to the cart." checkbox is enabled in the cart settings."