Keeping all cart and address data after checkout?

  • Christoph
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 day 4 hours ago #176219 by Christoph
Hi!

May be it is interesting also for others starting their Eshop.

In my last shop software I was able to do the following and it was very helpful:

It would be nice to keep all the data (cart, address etc.) after submit an order so that one doesn't have to enter the data again and again while testing for example the shop e-mail generation, label and invoice generating etc.

Where in the code can I find the place where to disable the cleaning?

Best regards,
Christoph

Please Log in or Create an account to join the conversation.

  • Giang Dinh Truong
  • Offline
  • Administrator
  • Administrator
More
18 hours 5 minutes ago #176224 by Giang Dinh Truong
Replied by Giang Dinh Truong on topic Keeping all cart and address data after checkout?
Hello Christoph,

After customers checking out, all of cart data need to clean. I think that is the correct logic.

EShop does not support the feature to keep all of cart data after checking out now.

Sincerely, Giang

Please Log in or Create an account to join the conversation.

  • Christoph
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 hours 55 minutes ago - 9 hours 54 minutes ago #176232 by Christoph
Oh yes, I know :-)

Of course I don't want it as a feature in the backend.

I only want to have small instructions how to reach this for testing, so:

Where in your code is the cart cleared, where the address?
What functions have to be modified?

A few tipps where I have to search for would be perfect :-)

Best regards,
Christoph
Last edit: 9 hours 54 minutes ago by Christoph.

Please Log in or Create an account to join the conversation.

  • Christoph
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 hours 51 minutes ago #176239 by Christoph
I reply to myself ...

I think I found the place where to disable cleaning of all data.

In /components/com_eshop/view/checkout/html.php you will find in line 272 (Eshop version 5.1.1):
Code:
            // Clear cart and session              $cart->clear();              $session->clear('shipping_method');              $session->clear('shipping_methods');              $session->clear('payment_method');              $session->clear('guest');              $session->clear('customer');              $session->clear('comment');              $session->clear('order_id');              $session->clear('coupon_code');              $session->clear('voucher_code');

One can disable this with
Code:
if (0) {             // Clear cart and session              $cart->clear();              $session->clear('shipping_method');              $session->clear('shipping_methods');              $session->clear('payment_method');              $session->clear('guest');              $session->clear('customer');              $session->clear('comment');              $session->clear('order_id');              $session->clear('coupon_code');              $session->clear('voucher_code'); }

As I can see then the cart remains full after ordering and all the address data etc. are still there.
That's a good help for testing confirmation E-Mails etc.

Giang, only to be sure:  Is that all I have to do or do I have to disable something else?

Best regards,
Christoph

Please Log in or Create an account to join the conversation.

Moderators: Giang Dinh Truong