Stamps.com Not Importing Orders

I'm not sure this is the right area to post my question. I just started using stamps.com and tried to install their plugin that allows their software to pull orders from the store. It consisted of placing one file in the root directory of the store. It does not work. After spending half the day on the phone with tech support people at stamps.com, they told me the issue is most likely with the root directory, being it needs the full path of the root directory which I tried (I have a main account and sub domains under that).

Has anyone run into this problem or does anyone use stamps.com plug in?

Looks like stamps.com is the provider, they should be able to help you.

What are the errors your are encountering?

There isnt an actual error being reported, it is just not pulling orders from cs-cart. It says no new items to pull. Their tech support people are saying their plugin needs access to the root directory of where cscart was installed. They remote connected to my screen and I showed them where the file is located. The only think they say it could be is the fact that I have a main domain with addon domains that run off that account so they think the url needs to be something more on the lines of mystore.somedomain.com. I tried to put the entire path of mystore.myMainDomain.com/stamps.php but still doesnt pull orders....it will connect both ways I am guessing because it says it was configured correctly each way, just wont pull any orders at all. I dont think they know much about their own plugin.

First thing I would do is to check your PHP error_log and your Apache access_log to see if there are any errors related to the script name.

After that, I'd execute the script with the browser inspector open and see if shows any errors.

Without spending time to review their script, this is all guess work. That they don't know much about their script is telling in itself.

Not knowing much about this at all, I think I did find the errors being reported:

PHP Fatal error: Class 'Tygh' not found in /home/.../public_html/.../app/functions/fn.database.php on line 247

Im not sure if this is an issue with the cs-cart fn.database.php file or with the stamps.php file.

The Tygh class is initialized as part of cs-cart initialization. If the stamps.com tool is not initializing itself properly then if it uses the database functions, the Tygh class won't be defined. That class is used within many cs-cart functions and controllers.

Thanks everyone. Just got off the phone with their tech support people for the 4th time and it seems that the entire cs-cart program needs to be installed in an admin directory within the store. I guess their tool is looking for everything in an admin directory. Doesn't make much sense to me so Ill go search for another shipping solution.

cs-cart doesn't have an "admin directory". Admin/Customer/Vendor modes are determined by which inital php file is used (admin.php, index.php, vendor.php). This sets the 'AREA' of the application. As I said, they aren't initializing properly. Their initialization should look like:

define('AREA', 'A');
define('AREA_NAME', 'Admin');
define('BOOSTRAP', true);
require_once("./init.php");
// Then their code here

But if all they're doing is reading data from the database then they don't need to set the area nor to use any internal functions whatsoever.

That's what I kept telling them, there is no admin directory in cs-cart and I'm not about to create an entire store within an admin directory. The only thing they should be doing is reading the database, writing back to it with a tracking number and changing the order status. Makes me wonder if they know cs-cart at all. Ship station seems to work great, just missing cost codes which stamps.com has. Another reason I dont understand them, they are both affiliated and shipstation seems to work so much better but doesnt offer cost codes to keep track of shipping costs for multiple stores. Oh well.

You can contact me via the "get a quoe" link in my signature and then send me a copy of their code. We can then discuss what it takes to get the read/write functionality working properly. Given what they're doing, using the API would be the best and most reliable approach. But this should really be their responsibility.

Provide them with the docs of CS-Cart API

https://docs.cs-cart.com/4.8.x/developer_guide/api/index.html

I think, the required things (read, change order status and tracking code) can be made with API