Perch Shop redirect

  • Hi,


    I'm trying to get a Perch Shop and running and eveything is working great until I get to the redirect of the Paypal where it's not working.


    I've had a look into the debug and I notice that a shipping zone wasn't enabled which I've corrected, however looking at the debug on Shipping it brings up this:

    Code
    1. Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'company' in 'field list'

    Can someone please let me know if this is what is causing the redirect not to work? And how to resolve it

  • Yes it's


  • You need to call perch_shop_checkout() before outputting any HTML or whitespace to the page. In fact, you don't need to output anything. You either redirect to PayPal or perhaps back to the cart or payment confirmation page. This is, more or less, all you need on the page:



    The above only relies on the user being a logged in member before redirecting them to PayPal. You can perform further checks like checking whether the cart has items and/or requiring a form (single button) to be submitted from the previous page.

  • If you are on standard Perch, you will also need to add the following at the bottom of the page:


    PHP
    1. PerchUtil::output_debug();



    You may also need to hold the redirects to see the debug message like so: