Forum
Error on checkout confirm page
I am getting an error while clicking on Pay Now button on Checkout Confirm page.
Warning: array_merge(): Argument #1 is not an array in /public/perch/addons/apps/perch_shop/lib/PerchShop_Cart.class.php on line 494
Strange thing is that I am getting this error on development server while its working fine on localhost. Please help.
Thanks,
Shop has no "Pay Now" button and no Checkout Confirm page - those are things you've built. As such, I'll need to know something about what you're doing, what software you're using, which gateway, and so on in order to even begin to try to help.
Lindsay, is it safe to say “your using the Nest example” and built it into your site?
Both of those “Pay Now” and “Checkout Confirm” sounds like that example.
Just courious.... not that this changes anything.
Full disclosure, right now my forum replies are a little weird as I'm sharing my Perch account with a second developer who is helping me with one of two Perch websites I'm working on.
Hi Robert, yes, I believe we are.
Thanks for replying, Drew — right now we're building the checkout based on the Nest example. The site is a Perch site, the gateway is going to hopefully be Square (per our earlier email) but for now it's set to manual.
The site is working (aka going through the checkout process) as desired in a local environment, but when we transfer it to our server we're seeing the error listed above. Here's what the code for the page templates look like:
cart.php
checkout.php
result.php (confirmation page)
Here's a link to the site on the development server: https://198.199.96.18/
Please enable debug on dev so we can see the debug output which may solve this quickly. The posted templates really don’t have enough info to pinpoint the issue. At least not for me.
Add
To config.php
Same! Thanks Robert.
Done.
I am sorry Lindsay, I am not seeing the debug output... you did enable on the https://198.199.96.18/perch/config/config.php
Normally you wouldn't do on public dev, but none of the output is sensitive info, just a bunch of debug comments.
BTW - Beautiful Site.
Hi Robert,
Sorry for the delay in my response. I did enable the debug output at that location (see: https://recordit.co/wm7tHqPAxR).
Could there be something preventing the debug from working?
If this is Perch and not Runway, you'll need to output the debug too.
https://docs.grabaperch.com/perch/building/troubleshooting/how-do-i-debug-problems/
Wow, I can’t believe I forgot that part, it’s been so long since I used Perch, I as so used to Runway only. Thanks.
Ah, thank you both! I have added output for the debug globally. It's at the end of the global header, so just scroll down to use the site as needed.
Thanks again.
Invalid query: SQLSTATE[HY000]: General error: 1364 Field 'countryID' doesn't have a default value Customer or Address or Shipping missing
debug output
This is the error, so I am wondering if your form contains the Country Code field?
It does:
<div class="form-group"> <label for="country" class=" control-label">COUNTRY*</label> <perch:input type="text" id="country" label="Country" placeholder="Enter your country..." class="form-control" /> </div>
It seems like the error message
"countryID' doesn't have a default value Customer or Address or Shipping missing"
indicates that we need to add a default from within the CMS or somewhere in a config file... does that sound right?<perch:label for="country">Country</perch:label> <perch:input type="select" options="<perch:shop id="country_list" />" value="236" id="country" label="Country />
You see the special options attribute...
Hi Robert,
I have already tried this tag to populate countries in drop-down but in my case its not working.