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

#   After\_end template not being shown after guest checkout

##

- **[fengel](/forum/user/37465-fengel "View fengel's Profile")**
- [![fengel's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37465.jpg)](/forum/user/37465-fengel "View fengel's Profile") Topic Author
- [ Offline](/forum/user/37465-fengel)

Less More

- Posts: 27
- Thank you received: 4
-
-

8 years 5 months ago [\#293778](#293778) by [fengel](/forum/user/37465-fengel "View fengel's Profile")  *[After\_end template not being shown after guest checkout](/forum/27-checkout/894942-after-end-template-not-being-shown-after-guest-checkout#293778 "-- HikaShop version -- : 3.4.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 7.0  I have a custom after&#95;end template which shows the order details, and also contains several plugin dispatchers. It usually shows when logged in users complete the checkout process, but I have noticed that whenever guests complete checkout, the after&#95;end template is never called from the Checkout Controller function after&#95;end.  And I found out that the condition, evaluates to true during Guest checkout, which then skips calling $this-&gt;display().  Is there something I can do to get around this problem, or will I have to create a temporary workaround? I was thinking a temporary workaround like,")* was created by *[fengel](/forum/user/37465-fengel "View fengel's Profile")*

-- HikaShop version -- : 3.4.0
-- Joomla version -- : 3.8.8
-- PHP version -- : 7.0

I have a custom after_end template which shows the order details, and also contains several plugin dispatchers. It usually shows when logged in users complete the checkout process, but I have noticed that whenever guests complete checkout, the after_end template is never called from the Checkout Controller function after_end.

And I found out that the condition, Code:

if(hikashop_loadUser(false) != $order-&gt;order_user_id)

evaluates to true during Guest checkout, which then skips calling $this-&gt;display().

Is there something I can do to get around this problem, or will I have to create a temporary workaround?
I was thinking a temporary workaround like, Code:

if((JFactory::getUser()-&gt;guest != true &amp;&amp; hikashop_loadUser(false) != $order-&gt;order_user_id)

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

8 years 5 months ago [\#293783](#293783) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[After\_end template not being shown after guest checkout](/forum/27-checkout/894942-after-end-template-not-being-shown-after-guest-checkout#293783 "-- HikaShop version -- : 3.4.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 7.0  I have a custom after&#95;end template which shows the order details, and also contains several plugin dispatchers. It usually shows when logged in users complete the checkout process, but I have noticed that whenever guests complete checkout, the after&#95;end template is never called from the Checkout Controller function after&#95;end.  And I found out that the condition, evaluates to true during Guest checkout, which then skips calling $this-&gt;display().  Is there something I can do to get around this problem, or will I have to create a temporary workaround? I was thinking a temporary workaround like,")*

Hello,

Guest user do have a "user_id" in the HikaShop database.
So I don't see any issue with the line you mentioned.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

- **[fengel](/forum/user/37465-fengel "View fengel's Profile")**
- [![fengel's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37465.jpg)](/forum/user/37465-fengel "View fengel's Profile") Topic Author
- [ Offline](/forum/user/37465-fengel)

Less More

- Posts: 27
- Thank you received: 4
-
-

8 years 5 months ago -  8 years 5 months ago [\#293862](#293862) by [fengel](/forum/user/37465-fengel "View fengel's Profile")  Replied by *[fengel](/forum/user/37465-fengel "View fengel's Profile")* on topic *[After\_end template not being shown after guest checkout](/forum/27-checkout/894942-after-end-template-not-being-shown-after-guest-checkout#293862 "-- HikaShop version -- : 3.4.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 7.0  I have a custom after&#95;end template which shows the order details, and also contains several plugin dispatchers. It usually shows when logged in users complete the checkout process, but I have noticed that whenever guests complete checkout, the after&#95;end template is never called from the Checkout Controller function after&#95;end.  And I found out that the condition, evaluates to true during Guest checkout, which then skips calling $this-&gt;display().  Is there something I can do to get around this problem, or will I have to create a temporary workaround? I was thinking a temporary workaround like,")*

After some more testing, I found out the root of the problem. We are using the legacy checkout and there is a line in the function after_confirm where it sets the user ID to 0.

Is there a way around this or are we forced to use the current checkout code?

EDIT: I found a workaround. The setting "Clean Cart When Order Is ..." was set to "created". I changed this to "confirmed" and it worked. I need more testing to see if this changed setting will break anything.

Last edit: 8 years 5 months ago by [fengel](/forum/user/37465-fengel "View fengel's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NDk0Mi1hZnRlci1lbmQtdGVtcGxhdGUtbm90LWJlaW5nLXNob3duLWFmdGVyLWd1ZXN0LWNoZWNrb3V0P3RtcGw9bWFya2Rvd24=) 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.038 seconds

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