Its hard to say what the local issue would be without any additional information, but here are a few things you might try:
Is the request locally going to the correct url? Ajax will fail if for cross domain issues. Make sure the url is exactly the same as the one requested.
Make sure that you aren't trying to hit an "https" url locally if you do not have ...
I just want to point out that BrilliantRetail has methods for handling IPN callbacks when creating custom gateways. I would consider using the core methods instead of putting logic in templates or files outside of the ExpressionEngine system:
The PayPal ...
A good starting point for an error like this is to reduce your code... remove your conditional line by line until you find the offending line.
Also, try this patch posted to a similar EE bug:
Cartthrob is the defacto standard for commerce within EE3. It uses standard channels for product info which allows you to then use datagrab which you can configure to import your product data. Import once, set Cron jobs to import regularly, use CSV, json or XML as your source.
Plenty of resources around for formatting data to import correctly.
The BrilliantRetail catalog tag does not currently allow for changing the number of results to pagination per template. For your use case though I would consider a relationship or using the BR product fieldtype to pull specific products on the main page. We generally setup a home page channel for our clients and allow them to select a few 'featured' products ...
You can use BrilliantRetail to generate 'quotes' instead of orders. The quote request would be emailed to admins and the customer. From that point though you would need to handle the actual pricing outside of BrilliantRetail.
You can add order notes to the quote that the client would see but currently you can't edit the line item details to add pricing.
The next order number is set the br_config_data table. Look for the 'label' column with the value 'Order ID' and you'll see the next order id in the 'value' field.
You'll want to make sure that its greater than any existing orders in the database since the value is auto incremented.
In case anyone else runs into this issue, the problem was resolved by removing the protocol from the site URL in the general settings menu.
http://mysite.com became //mysite.com and now all of the assets are being delivered through the correct protocol depending on what section of the site you are on.
We are replacing a very faulty Magento store with BR for the exact same purpose. We sell Insurance Education courses, online and classroom. We store the courses as products and of course we have had to make a whole lot of modifications to make our stuff work due to the unique nature of our business but it should work out of the box for you unless you need ...
Cartthrob would be the way forward in my eyes. You'd have everything you need (after a few addons are bought). For the events, I'd go with Low Events and set it up in CT as a product channel. You could the use inventory like ticket/seats.
- merchandise, standard CT products
- membership, CT subscriptions. Re-billing is quite straightforward etc
Thanks to @litzinger on Twitter
USPS came out with an updated API on July 28th the upgraded BR install seems to have this fixed I am going to be looking into updating this for the client so if you absolutely have to stay on the old version of BR like I do let me know.