[Skip to main content](#vessel-content)

#   how to disable shop function \*after\* order?

##

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

10 years 11 months ago -  10 years 11 months ago [\#221327](#221327) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[how to disable shop function \*after\* order?](/forum/27-checkout/880304-how-to-disable-shop-function-after-order?start=20#221327 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.5.23  Hi, i have a webshop for invitees only. My shoppers are already registred (by import) and allowed to shop only once. So, i need to disable the access to the shop after they haved shopped.  Perhaps by changing the acl groups after the last step of the checkout process? for instance by removing the shopper from the shopper group and placing the shopper in the group &quot;has-already-shopped&quot;.  Would this be possible?")*

Hi,

My bad, I don't know wahat I was thinking about, this new version should work correctly:

*This attachment is hidden for guests.
Please log in or register to see it.*

ps: you have to do the tests in frontend.

Last edit: 10 years 11 months ago by [Xavier](/forum/user/4105-xavier "View Xavier's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg4MDMwNC1ob3ctdG8tZGlzYWJsZS1zaG9wLWZ1bmN0aW9uLWFmdGVyLW9yZGVyP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[proo4509](/forum/user/37936-proo4509 "View proo4509's Profile")**
- [![proo4509's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/37936-proo4509 "View proo4509's Profile") Topic Author
- [ Offline](/forum/user/37936-proo4509)

Less More

- Posts: 79
- Thank you received: 0
-
-

10 years 11 months ago -  10 years 11 months ago [\#221436](#221436) by [proo4509](/forum/user/37936-proo4509 "View proo4509's Profile")  Replied by *[proo4509](/forum/user/37936-proo4509 "View proo4509's Profile")* on topic *[how to disable shop function \*after\* order?](/forum/27-checkout/880304-how-to-disable-shop-function-after-order?start=20#221436 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.5.23  Hi, i have a webshop for invitees only. My shoppers are already registred (by import) and allowed to shop only once. So, i need to disable the access to the shop after they haved shopped.  Perhaps by changing the acl groups after the last step of the checkout process? for instance by removing the shopper from the shopper group and placing the shopper in the group &quot;has-already-shopped&quot;.  Would this be possible?")*

Hi Xavier,
I've tested a lot...

it's only working when there is no payment method involved.
in my shop there are 4 payment methods but most orders will be managed *without* a payment method (because final price = 0).

I see the logout only works when there's no-payment. It doesn't work for the 4 payment methods.

I would like to see a forced loguit and a redirect to a public page for each order, regardless of the payment method.

another new problem:
now when i place a product in the cart I'm redirected to the checkout process. It ignores my configuration that says "stay on page and show a popup". This used to work before....

Last edit: 10 years 11 months ago by [proo4509](/forum/user/37936-proo4509 "View proo4509's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg4MDMwNC1ob3ctdG8tZGlzYWJsZS1zaG9wLWZ1bmN0aW9uLWFmdGVyLW9yZGVyP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[proo4509](/forum/user/37936-proo4509 "View proo4509's Profile")**
- [![proo4509's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/37936-proo4509 "View proo4509's Profile") Topic Author
- [ Offline](/forum/user/37936-proo4509)

Less More

- Posts: 79
- Thank you received: 0
-
-

10 years 11 months ago -  10 years 11 months ago [\#221517](#221517) by [proo4509](/forum/user/37936-proo4509 "View proo4509's Profile")  Replied by *[proo4509](/forum/user/37936-proo4509 "View proo4509's Profile")* on topic *[how to disable shop function \*after\* order?](/forum/27-checkout/880304-how-to-disable-shop-function-after-order?start=20#221517 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.5.23  Hi, i have a webshop for invitees only. My shoppers are already registred (by import) and allowed to shop only once. So, i need to disable the access to the shop after they haved shopped.  Perhaps by changing the acl groups after the last step of the checkout process? for instance by removing the shopper from the shopper group and placing the shopper in the group &quot;has-already-shopped&quot;.  Would this be possible?")*

Hello Xavier,
I thinks it is now clear why this is all not working

The massaction is not triggered directly after an order because the run thru the cron job settings (I didn't know that).

Now, I have 2 massactions that need to perform a task at the final step of an order (=directly! no delay). They must change the ACL of the user and logout the user so he can not shop again.
The problem is it is only running once every 15 minutes and not directly. When I try to edit the cron job, the shortest/smallest frequency is once every 15 minutes. So, this must be the problem. I've set the minimum waiting time between two cron jobs to 1 second, but this is ignored. It runs every 15 minutes.
They must run directly after each order.

Best would be to perform all actions in the last step of the checkout proces in the after_end.php page:

1) remove user from ACL group shopper
2) place user in ACL group "reeds geshopt"
3) remove user from the price_access_level groups (there are 2, every user is in one of them)
4) redirect to thankyou page
5) logout the user

Would ths work and how would I do this?

regards

suzanne

Last edit: 10 years 11 months ago by [proo4509](/forum/user/37936-proo4509 "View proo4509's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg4MDMwNC1ob3ctdG8tZGlzYWJsZS1zaG9wLWZ1bmN0aW9uLWFmdGVyLW9yZGVyP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[proo4509](/forum/user/37936-proo4509 "View proo4509's Profile")**
- [![proo4509's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/37936-proo4509 "View proo4509's Profile") Topic Author
- [ Offline](/forum/user/37936-proo4509)

Less More

- Posts: 79
- Thank you received: 0
-
-

10 years 11 months ago [\#221595](#221595) by [proo4509](/forum/user/37936-proo4509 "View proo4509's Profile")  Replied by *[proo4509](/forum/user/37936-proo4509 "View proo4509's Profile")* on topic *[how to disable shop function \*after\* order?](/forum/27-checkout/880304-how-to-disable-shop-function-after-order?start=20#221595 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.5.23  Hi, i have a webshop for invitees only. My shoppers are already registred (by import) and allowed to shop only once. So, i need to disable the access to the shop after they haved shopped.  Perhaps by changing the acl groups after the last step of the checkout process? for instance by removing the shopper from the shopper group and placing the shopper in the group &quot;has-already-shopped&quot;.  Would this be possible?")*

Hello Xavier,

I solved it by migrating the cron job to my own server. It runs now every minute and I think this is workable.
I removed the user logout php code in your last massaction order version and replaced it with a user session refresh code.
Now, without logging out and in the acl changes are applied.

So, this is ok now.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg4MDMwNC1ob3ctdG8tZGlzYWJsZS1zaG9wLWZ1bmN0aW9uLWFmdGVyLW9yZGVyP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

10 years 11 months ago [\#221532](#221532) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[how to disable shop function \*after\* order?](/forum/27-checkout/880304-how-to-disable-shop-function-after-order?start=20#221532 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.5.23  Hi, i have a webshop for invitees only. My shoppers are already registred (by import) and allowed to shop only once. So, i need to disable the access to the shop after they haved shopped.  Perhaps by changing the acl groups after the last step of the checkout process? for instance by removing the shopper from the shopper group and placing the shopper in the group &quot;has-already-shopped&quot;.  Would this be possible?")*

Hi,

Please give us a screenshot of your mass action settings.
I was thinking that you were triggering on "onAfterOrderCreate()", so if it is not the case, you have to trigger on this.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg4MDMwNC1ob3ctdG8tZGlzYWJsZS1zaG9wLWZ1bmN0aW9uLWFmdGVyLW9yZGVyP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[proo4509](/forum/user/37936-proo4509 "View proo4509's Profile")**
- [![proo4509's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/37936-proo4509 "View proo4509's Profile") Topic Author
- [ Offline](/forum/user/37936-proo4509)

Less More

- Posts: 79
- Thank you received: 0
-
-

10 years 11 months ago [\#221625](#221625) by [proo4509](/forum/user/37936-proo4509 "View proo4509's Profile")  Replied by *[proo4509](/forum/user/37936-proo4509 "View proo4509's Profile")* on topic *[how to disable shop function \*after\* order?](/forum/27-checkout/880304-how-to-disable-shop-function-after-order?start=20#221625 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.5.23  Hi, i have a webshop for invitees only. My shoppers are already registred (by import) and allowed to shop only once. So, i need to disable the access to the shop after they haved shopped.  Perhaps by changing the acl groups after the last step of the checkout process? for instance by removing the shopper from the shopper group and placing the shopper in the group &quot;has-already-shopped&quot;.  Would this be possible?")*

No
i was struggling with this. I don't use "create", because the status of the order is changed in the payment methods (one changed to 'bevestigd', the other is changed to 'bijbetalen'), so I think I shouldn't use 'create' but 'changed' because the payment methods come first in the process, not?
And... as it is working now I think this is right.

I have a total of 3 different order massaction jobs. 2 for changing acl after order (runs every minute) and 1 for export order (for daily bulk export and change order status to 'verzonden').

No I have the change-acl finally working! And with the user session refresh the ACL change is even applied without logout.

But, the export order is stil not working (for this we have another thread in the forum).

regards

Suzanne

- [ ![massaction&#95;order&#95;1.png](/forum/attachment/27898) ](/forum/attachment/27898 "...on&#95;order&#95;1.png") [ ](/forum/attachment/27898?download=1 "...on&#95;order&#95;1.png")
- [ ![massaction&#95;order&#95;2.png](/forum/attachment/27899) ](/forum/attachment/27899 "...on&#95;order&#95;2.png") [ ](/forum/attachment/27899?download=1 "...on&#95;order&#95;2.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg4MDMwNC1ob3ctdG8tZGlzYWJsZS1zaG9wLWZ1bmN0aW9uLWFmdGVyLW9yZGVyP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

10 years 11 months ago [\#221631](#221631) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[how to disable shop function \*after\* order?](/forum/27-checkout/880304-how-to-disable-shop-function-after-order?start=20#221631 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.5.23  Hi, i have a webshop for invitees only. My shoppers are already registred (by import) and allowed to shop only once. So, i need to disable the access to the shop after they haved shopped.  Perhaps by changing the acl groups after the last step of the checkout process? for instance by removing the shopper from the shopper group and placing the shopper in the group &quot;has-already-shopped&quot;.  Would this be possible?")*

Hi,

Yes indeed the "onAfterOrderCreate" is not adapted in your case, but maybe the "onAfterOrderUpdate" one can work.
If you select a filter on the desired order status, that can do the job. The cron solution every minutes is a correct solution too.

Let's continue on the other thread for the order export.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg4MDMwNC1ob3ctdG8tZGlzYWJsZS1zaG9wLWZ1bmN0aW9uLWFmdGVyLW9yZGVyP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.071 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
