<none> is a legal value for the "Add to cart redirect" setting in /admin/store/settings/cart, behaving as described when adding products to the cart. However, it appears that <none&gt is literally interpreted when products have checkout nodes, redirecting to example.com/%3Cnone%3E and returning page not found.

Comments

FranCarstens’s picture

Ditto

GreyHawk’s picture

Ditto that ditto.

"Add to cart" then goes to show the saved node, instead of the shopping cart. I want the cart to be the default target instead, but the setting is being ignored.

tommy kaneko’s picture

I also had this problem. Here's a fix. Go to the file uc_node_checkout.module

Around line 407 to 409, you should see this:

      // Redirect non-administrators to the shopping cart after edits.
      if (variable_get('uc_node_checkout_submit_redirect', TRUE) && !user_access('edit any '. $type .' content')) {
        $form['#redirect'] = variable_get('uc_add_item_redirect', 'cart');

Replace the above lines with the following

      // Redirect non-administrators to the shopping cart after edits.
      if (variable_get('uc_node_checkout_submit_redirect', TRUE) && !user_access('edit any '. $type .' content')) {
 
	$redirect = variable_get('uc_add_item_redirect', 'cart');
        if ($redirect != '<none>') {
        	$form['#redirect'] = $redirect;
        }
        else {
        	$form['#redirect'] = 'cart';
        }

The snippet above will check to see if the uc_add_item_redirect variable has a value of '', in which case it will redirect to your cart.

Hope it helps.

aaronbauman’s picture

Version: 6.x-2.0-beta3 » 6.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new1.29 KB
aidanlis’s picture

Anyone want to role this against -dev for me?

aidanlis’s picture

Status: Needs review » Fixed

Rewrote the patch, thanks, this is now in -dev.

Status: Fixed » Closed (fixed)

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