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

#   Cart and Credit Card xxxx Fields don't clear after checkout

##

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

Less More

- Posts: 2
- Thank you received: 0
-
-

9 years 11 months ago [\#256963](#256963) by [liloenyosi](/forum/user/46350-liloenyosi "View liloenyosi's Profile")  *[Cart and Credit Card xxxx Fields don't clear after checkout](/forum/27-checkout/887804-cart-and-credit-card-xxxx-fields-dont-clear-after-checkout#256963 "My cart still has product in it after checkout is completed. My cart setting is set to Clean cart when order is Created. I am using Authorize.net AIM for processing payment. For some reason I as a...")* was created by *[liloenyosi](/forum/user/46350-liloenyosi "View liloenyosi's Profile")*

My cart still has product in it after checkout is completed. My cart setting is set to Clean cart when order is Created. I am using Authorize.net AIM for processing payment. For some reason I as a customer am not receiving order confirmation emails from Hikashop and after trying many of the solutions on the forum, I decided to just change the authorize_thankyou page to display the invoice. The changes I made to the file are below. Not sure if that is causing the cart not emptying issue. I have also tried clearing cache, turning off Joomla cache, turning off the different module caches. It wouldn't bother me so much that the cart didn't empty if it wasn't for the fact that when I try to check out again the Credit Card information is still there with the xxxx formatting, however if I click finish, it places another order with that credit card info. I imagine if I made an order on a public computer someone could potentially create an order and ship to their address but use my CC info. Not sure how to fix this.
Code:

defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php $app = JFactory::getApplication(); $app-&gt;enqueueMessage( JText::_('THANK_YOU_FOR_PURCHASE') ); /* Find current order id and show receipt */ // The order is already loaded and present in $this-&gt;order ;-) $app-&gt;redirect(hikashop_completeLink('order&amp;task=show&amp;itemId=196&amp;cid='.$this-&gt;order-&gt;order_id));

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

9 years 11 months ago [\#257009](#257009) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Cart and Credit Card xxxx Fields don't clear after checkout](/forum/27-checkout/887804-cart-and-credit-card-xxxx-fields-dont-clear-after-checkout#257009 "My cart still has product in it after checkout is completed. My cart setting is set to Clean cart when order is Created. I am using Authorize.net AIM for processing payment. For some reason I as a...")*

Hi,

The cart is emptied when the order is created. There is no reason it wouldn't.
It might be because you have previous carts for your current user (due to your repeated tests) and thus the system loads the next one in line.
Go in the menu Customers&gt;Carts, clear all the carts and try again.

You can see that in Authorize.net plugin (file plugins/hikashoppayment/authorize/authorize.php) you have that code which clears the session after the order is created:
$class = hikashop_get('class.cart');
$class-&gt;cleanCartFromSession();
And if you look at that function (file administrator/components/com_hikashop/classes/cart.php) you have that code:
$app-&gt;setUserState( HIKASHOP_COMPONENT.'.cc_number', '');
$app-&gt;setUserState( HIKASHOP_COMPONENT.'.cc_month', '');
$app-&gt;setUserState( HIKASHOP_COMPONENT.'.cc_year', '');
$app-&gt;setUserState( HIKASHOP_COMPONENT.'.cc_CCV', '');
$app-&gt;setUserState( HIKASHOP_COMPONENT.'.cc_type', '');
$app-&gt;setUserState( HIKASHOP_COMPONENT.'.cc_owner', '');
$app-&gt;setUserState( HIKASHOP_COMPONENT.'.cc_valid', 0);
which wipes out the credit card data of the user session.
So I don't see why you would still get the credit card data in the user session after the order is created, unless you have a problem with your server's PHP user session system. You might want to try changing the "session handler" setting of the Joomla configuration, and/or try on a different server to see if you can replicate the problem. On my end, I can't reproduce the problem.

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

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

Less More

- Posts: 2
- Thank you received: 0
-
-

9 years 11 months ago [\#257061](#257061) by [liloenyosi](/forum/user/46350-liloenyosi "View liloenyosi's Profile")  Replied by *[liloenyosi](/forum/user/46350-liloenyosi "View liloenyosi's Profile")* on topic *[Cart and Credit Card xxxx Fields don't clear after checkout](/forum/27-checkout/887804-cart-and-credit-card-xxxx-fields-dont-clear-after-checkout#257061 "My cart still has product in it after checkout is completed. My cart setting is set to Clean cart when order is Created. I am using Authorize.net AIM for processing payment. For some reason I as a...")*

Changing the session handler from Database to PHP has fixed it. Thanks!!!

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

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