Forums / Basic Configuration / Whoops! Sorry, but you are not allowed to perform the action requested

Whoops! Sorry, but you are not allowed to perform the action requested

Locked

Views: 5,290

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
11 Sep 2007, 11:39 AM
#1
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Whoops! Sorry, but you are not allowed to perform the action requested

I read a suggestion concerning account creation that made sense to me: A (potential) customer creates an account on the fly with items in their shopping cart. Eliminate the need for CREATE_ACCOUNT_SUCCESS page by re-directing them to the CHECKOUT_SHIPPING page after account creation. This eliminates one step, which can make the difference between closing the sale and not. I followed the advice and made the suggested changes to create_account.php: I changed this:

   zen_redirect(zen_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));

  } //endif !error
}

To this:

   zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

  } //endif !error
}

Everything went swimmingly while testing under the above circumstances. However, if I just log in and create an account without items in my cart, I received this error:

Whoops! Sorry, but you are not allowed to perform the action requested.
You are still logged in to your account and may continue shopping. Please choose a destination from a menu.

The account was indeed created, however, that error message is hardly the welcome message I have in mind. I think the CREATE_ACCOUNT_SUCCESS page is vital for someone just signing up so I certainly don't want to lose it. Is it possible to have both of these things happen?

Thanks

12 Sep 2007, 12:26 PM
#2
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Whoops! Sorry, but you are not allowed to perform the action requested

Yes, you can do both (and come to think of it, that may be the better way to go).

Here is how to do that.

Replace what you have with the following. Tested and works like a charm.

if (is_array($this->contents)) { // if items in cart, then by pass create account success
zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
} else { // no items in cart to show create account success page
zen_redirect(zen_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
}

Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information

12 Sep 2007, 12:56 PM
#3
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Re: Whoops! Sorry, but you are not allowed to perform the action requested

econcepts:

Yes, you can do both (and come to think of it, that may be the better way to go).

Here is how to do that.

Replace what you have with the following. Tested and works like a charm.

Hi Eric - Thanks for the response. It's good to know that it is possible, however I'm getting a parse error:

Parse error: syntax error, unexpected T_STRING in /public_html/shop/includes/modules/custom_Tim/create_account.php on line 446

It's almost certainly because of code placement. (Since I certainly don't know what I'm doing:huh:)

I'm unclear what to do with this bit of code //endif !error
}
as I don't see it in your sample code:

    zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

  } //endif !error
}

Should that be incorporated into this bit? If you have a moment, could you paste that entire section of code? Thanks so much!!

12 Sep 2007, 2:38 PM
#4
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Whoops! Sorry, but you are not allowed to perform the action requested

The code I gave you should totally REPLACE the line of code that reads:

zen_redirect(zen_href_link(FILENAME_CREATE_ACCOUNT _SUCCESS, '', 'SSL'));

Replace that with what I sent and you should be good. I tested it with no problems.

:)

Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information

13 Sep 2007, 12:38 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Whoops! Sorry, but you are not allowed to perform the action requested

For the sake of reference ... this functionality already exists in Zen Cart v1.3.7.x

  • add something to cart
  • start checkout
  • create an account
  • after the account is created, the "success" screen is bypassed since the cart is not empty

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Dec 2010, 12:22 PM
#6
vipgroup avatar

vipgroup

New Zenner

Join Date:
Dec 2010
Posts:
1
Plugin Contributions:
0

Re: Whoops! Sorry, but you are not allowed to perform the action requested

econcepts:

The code I gave you should totally REPLACE the line of code that reads:

zen_redirect(zen_href_link(FILENAME_CREATE_ACCOUNT _SUCCESS, '', 'SSL'));

Replace that with what I sent and you should be good. I tested it with no problems.

:)
Hi Eric, your advice sounds like the perfect solution. Please could you let me know the file and its location, as I am having the same issue. Many thanks. Jean

8 Dec 2010, 1:48 PM
#7
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Whoops! Sorry, but you are not allowed to perform the action requested

This thread is over 3 years old and relates to a very outdated version of Zen Cart (which no one should be using). The coding has changed a great deal since then. Best advice is to start a new thread of your own, explain what version you are using and what you want to accomplish.

Vger