Unable to show orders in front-end #1042
Replies: 7 comments 3 replies
-
Where is this code from? Is this your own code? $orders = $customer->orders(); |
Beta Was this translation helpful? Give feedback.
-
Well. It is my implementation of the PHP api: https://simple-commerce.duncanmcclean.com/php-api#php-api.
|
Beta Was this translation helpful? Give feedback.
-
What does the |
Beta Was this translation helpful? Give feedback.
-
Hi, it looks like this:
|
Beta Was this translation helpful? Give feedback.
-
Well for now I use the dummy gateway. Unfortunately I am unable to checkout. After filling in the payment details and clicking submit the next error is presented: str_replace(): Argument #2 ($replace) must be of type string when argument #1 ($search) is a string. I manually changed the order to placed and paid (statuses seem to be correct in the CP). Maybe this is all related to the order not being saved properly somehow. I did notice the orders are added to the database but the user orders column remains empty. In my V5 version the are orders in the users column. Maybe that's part of the problem (Edit: I now realize that you said that the order won't be added to the profile if payment is not executed properly). |
Beta Was this translation helpful? Give feedback.
-
I will send you an e-mail with the full stack trace. |
Beta Was this translation helpful? Give feedback.
-
Problem solved. The orders are visible after checkout. The checkout wasn't working because of an error in my template. Thanks for helping me out with this Duncan! |
Beta Was this translation helpful? Give feedback.
-
In Simple Commerce 5 I show the orders in the front-end. But for some reason. In the front-end I can no longer see the orders.
$orders = $customer->orders();
I also noticed that the orders column remains empty when placing an order. In v6 I switched to database orders. They were in the database previously but as entries because I used the eloquent driver for this.
Beta Was this translation helpful? Give feedback.
All reactions