- Posts: 27
- Thank you received: 4
After_end template not being shown after guest checkout
8 years 3 months ago #293778
by fengel
After_end template not being shown after guest checkout was created by fengel
-- 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,
evaluates to true during Guest checkout, which then skips calling $this->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,
-- 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->order_user_id)
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()->guest != true && hikashop_loadUser(false) != $order->order_user_id)
Please Log in or Create an account to join the conversation.
8 years 3 months ago #293783
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic After_end template not being shown after guest checkout
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,
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 & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
8 years 3 months ago - 8 years 3 months ago #293862
by fengel
Replied by fengel on topic After_end template not being shown after guest checkout
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.
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 3 months ago by fengel.
Please Log in or Create an account to join the conversation.
Time to create page: 0.126 seconds