Forums / General Questions / Shipstation and CEON URL failing to integrate (continued discussion)

Shipstation and CEON URL failing to integrate (continued discussion)

Views: 26,329

Results 1 to 20 of 24
31 Jul 2015, 5:59 PM
#1
chervickers avatar

chervickers

New Zenner

Join Date:
Oct 2010
Location:
Indiana
Posts:
72
Plugin Contributions:
0

Shipstation and CEON URL failing to integrate (continued discussion)

continuing from here:
https://www.zen-cart.com/showthread.php?184548-Ceon-URI-Mapping-v4-x&p=1288672#post1288672

You wrote:
See/saw it, but in the future, please enclose the code within code tags '[' CODE ']' (remove the spaces and single apostrophes. I still haven't figured out how to type that in this editor so that it will remain intact, but maybe one day. :) ) This can be automated by clicking the # symbol in the toolbar above the message box and then pasting the code...

A few things I see so far:

One, where is the addition of the .htaccess code in relation to the CEON .htaccess code?
Two, a filename "shipstation_zc.php" was provided and the added rewrite directs to app.php, then there is "the code of the .php". How do these three pieces fit together?
Three, this method of access is rife with potential security issues... transferring username and password in a GET statement??? Wow... No validation on the GET data sent? Another Wow...
Four, what is actually called to "activate" shipstation? Is there some sort of specific filename called, or is it "always active"?
Five, can we take this to a new thread as it looks like the discussion may be lengthy. Suggest starting a new thread perhaps in the general section, returning here to post the link for those interested, continue the discussion there (including answering the above questions), then we can post a solution here for those interested in the end result... Just an idea that perhaps others may appreciate as well. :) To me it looks like initial integration of the program with ZC is the issue (.htaccess rule), but need to work through that to provide a suitable method of having both because so far I don't see any issue with "the code of the .php" per se.

Response: I will get with my developer to find these answers for you!

31 Jul 2015, 7:28 PM
#2
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Shipstation and CEON URL failing to integrate (continued discussion)

Yup.

What is "app.php" and why does it feel the need to send ALL requests to itself?

What is the reasoning behind ShipStation's callback not being coded as a Zen Cart "page" (catalog or admin)?

What are the entire contents of the .htaccess file found in the Zen Cart store root (replace the name of your admin folder if present with ADMIN)? What are the entire contents of ANY .htaccess files found in "parent" folders?

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

31 Jul 2015, 8:05 PM
#3
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Shipstation and CEON URL failing to integrate (continued discussion)

You've got so many parallel threads going that it is nearly impossible to follow.

Yep, From where did you create or obtain this app.php file that you mention.

AFAIK, ShipStation does not require or use any .htaccess coding to function. It only requires shipstation_zc.php. I haven't modified any .htaccess file so that SS would function.

The code you posted a while back compared to the latest ShipStation update on the same date does not match. I just happened to be talking to a SS support tech and developer and neither had a clue about the code you posted but were pretty specific that the code on the SS website is the official code. It was very difficult to compare the code since you posted code without using the # sign in the menu bar above and pasting the code between the tags.

There is nothing to call SS. As far as ZC is concerned, SS doesn't even exist. shipstation_zc.php is the file SS executes to log into the admin side and grab the data for outstanding orders. ShipStation should have its own admin account (limiting access) and admin password instead of you providing them with your SuperUser credentials.

ShipStation functions without any issues with a vanilla ZC of any version. The culprit is most likely some customizations that you have added.

Are you wanting, thinking or expecting that ShipStation does something other than what is designed to do.... download order details to their server so that you can print shipping labels? Then, write the tracking number back to the order comments and change status to delivered.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

31 Jul 2015, 8:28 PM
#4
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Shipstation and CEON URL failing to integrate (continued discussion)

FWIW, ShipStation downloads orders

http://yourdomainname.com/shipstation_zc.php?SS-UserName=NAME_USED_IN_SHIPSTATION_SETUP&SS-Password=ZC_ADMIN_PASSWORDforSHIPSTATION%25K&action=export&start_date=07%2f31%2f2015+01%3a57&end_date=08%2f01%2f2015+11%3a57&page=1

ShipStation sends to ZC database shipping details such as when a shipping label is created and printed

http://yourdomainname.com/shipstation_zc.php?SS-UserName:NAME_USED_IN_SHIPSTATION_SETUP=ShipStation&SS-Password=ZC_ADMIN_PASSWORDforSHIPSTATION%25K&action=update&order_number=910000&status=delivered&comment=Package+shipped+on+7%2f31%2f2015+via+USPS+First+Class+Mail.+Tracking+No+94001118xxxxxxxxxx&carrier_cost=2.04

AFAIK, nothing more; nothing less

But I am not a coder to decipher all the dotted I's and crossed T's

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

31 Jul 2015, 8:35 PM
#5
chervickers avatar

chervickers

New Zenner

Join Date:
Oct 2010
Location:
Indiana
Posts:
72
Plugin Contributions:
0

Re: Shipstation and CEON URL failing to integrate (continued discussion)

RixStix:

You've got so many parallel threads going that it is nearly impossible to follow.

Yep, From where did you create or obtain this app.php file that you mention.

AFAIK, ShipStation does not require or use any .htaccess coding to function. It only requires shipstation_zc.php. I haven't modified any .htaccess file so that SS would function.

The code you posted a while back compared to the latest ShipStation update on the same date does not match. I just happened to be talking to a SS support tech and developer and neither had a clue about the code you posted but were pretty specific that the code on the SS website is the official code. It was very difficult to compare the code since you posted code without using the # sign in the menu bar above and pasting the code between the tags.

There is nothing to call SS. As far as ZC is concerned, SS doesn't even exist. shipstation_zc.php is the file SS executes to log into the admin side and grab the data for outstanding orders. ShipStation should have its own admin account (limiting access) and admin password instead of you providing them with your SuperUser credentials.

ShipStation functions without any issues with a vanilla ZC of any version. The culprit is most likely some customizations that you have added.

Are you wanting, thinking or expecting that ShipStation does something other than what is designed to do.... download order details to their server so that you can print shipping labels? Then, write the tracking number back to the order comments and change status to delivered.

First, the I have my developer working on answering the technical questions above.

To address a few of your questions RixStix...

You've got so many parallel threads going that it is nearly impossible to follow.

I could not get Shipstation to install with CEON. I uninstalled CEON and Shipstation worked.

I emailed the developer of Shipstation. Here is what the developer of Shipstation sent back to me:

"It appears that you have figured this out. Currently the ZenCart 3rd Party ShipStation Connection and CEON are not compatible. Like you said its one or the other. I wish I had another option for you but because we did not build that integration we do not have control over it."

So...

I made a new reply under the thread for CEON URL due to this. In the context of the message, another developer asked me to move the thread to 'general' and I did. HENCE.. THIS IS THE ONLY open thread on this question.. and the question is...

WHAT CAN I DO TO MY CEON module to get Shipstation to work? THEY BOTH WORK FINE INDEPENDENTLY. When I install them both, the Shipstation fails.

To your other questions:
-where did you create or obtain this app.php file that you mention.

I am not sure what you mean by app.php. However, I will try to address:

I got the shipstation_zc.php file **emailed to me directly from a developer at shipstation **who was trying to fix my issue. He told me there was an update and that I should use the file you see in the 'old' thread. I could only get shipstation to work using this file and the 'snipped' of code I printed in the last thread. If I did not use this php file and tried the one on the site, I could not connect to Shipstation.

If you mean any of the CEON installed files, those files came from the CEON module.

You wrote:

AFAIK, ShipStation does not require or use any .htaccess coding to function. It only requires shipstation_zc.php. I haven't modified any .htaccess file so that SS would function.

My reply:
Shipstation DID require me to use a snippet that was to be added to my .htaccess code and when I installed that snippet AND used the shipstation_zc.php file, AND unistalled CEON, my site was able to connect to Shipstation without issue. It will not work with shipstation under any other set of circumstances.

You wrote:
The code you posted a while back compared to the latest ShipStation update on the same date does not match. I just happened to be talking to a SS support tech and developer and neither had a clue about the code you posted but were pretty specific that the code on the SS website is the official code. It was very difficult to compare the code since you posted code without using the # sign in the menu bar above and pasting the code between the tags.

My reply:
I am not a developer and did not know how to use the #sign to show you. The code I posted was cut and pasted from an email that a shipstation developer emailed to me. AGAIN, it is the only code with which my site would work with shipstation. (It also required the .htaccess 'snippet' and the deinstall of CEON.

You wrote:
There is nothing to call SS. As far as ZC is concerned, SS doesn't even exist. shipstation_zc.php is the file SS executes to log into the admin side and grab the data for outstanding orders. ShipStation should have its own admin account (limiting access) and admin password instead of you providing them with your SuperUser credentials.

My reply:
Again, I am not a developer, but I don't know anything about 'calling SS' but I do have to have an ZC admin account that is specific to Shipstation as you suggest.

You wrote:
ShipStation functions without any issues with a vanilla ZC of any version. The culprit is most likely some customizations that you have added.

My reply:
The culprit is that Shipstation is not compatable with CEON. This was confirmed by myself, my developer and Shipstation.

You wrote:
Are you wanting, thinking or expecting that ShipStation does something other than what is designed to do.... download order details to their server so that you can print shipping labels? Then, write the tracking number back to the order comments and change status to delivered.

My reply:
No, I cannot authorize my zencart to get the account information from Shipstation using the code provided due to the fact that CEON is not compatible. I am looking for a code fix to install to make them work together.

TO THE REST OF THE TECHNICAL QUESTIONS (file contents, etc), I will post tomorrow as my developer is unavailable to post until then. I do have the .htacess file info but I will admit I have about 12 of those files in different parts of my ZC so I am not sure which to supply. Hence, I am asking a more knowledgeable person who knows the correct answer to respond and perhaps we can solve this mystery.

I do not believe that I am the only ZC user with CEON who wants to use Shipstation .. so my hope is that we can get a fix and make people happy!

thank you ALL for your responses!
c

31 Jul 2015, 8:48 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Shipstation and CEON URL failing to integrate (continued discussion)

The issue with the .htaccess is purportedly the PHP verson hosted and the need to offer authentication. That would be why anything would be needed for the .htaccess to begin with. The remaining "functionality" of the app.php file is yet to be determined/identified.

So far as declared by the OP, it works wiith the standard ZC setup, but not with CEON URI mapping when "installed" as it has been... So far, if the "base" version were installed as described, CEON would not be a factor. If it is installed in any other directory, then it depends on the CEON applied portion of the .htaccess file as to it's "exceptions". Depending on what app.php does, other things may be necessary to obtain the desired result.

Based on the description of how shipstation is expected to operate it appears that the published code was the shipstation_zc.php file as it does all of the database inquiry, "page display", and database mods that are described above. Again leading to what is app.app and what does it do?

FWIW, my questions were "limited" (this time) to try to get to the next set of questions already asked in a bit of a sequence. :P

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

31 Jul 2015, 9:18 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Shipstation and CEON URL failing to integrate (continued discussion)

CherVickers:

First, the I have my developer working on answering the technical questions above.

To address a few of your questions RixStix...

You've got so many parallel threads going that it is nearly impossible to follow.

I could not get Shipstation to install with CEON. I uninstalled CEON and Shipstation worked.

I emailed the developer of Shipstation. Here is what the developer of Shipstation sent back to me:

"It appears that you have figured this out. Currently the ZenCart 3rd Party ShipStation Connection and CEON are not compatible. Like you said its one or the other. I wish I had another option for you but because we did not build that integration we do not have control over it."

So...

I made a new reply under the thread for CEON URL due to this. In the context of the message, another developer asked me to move the thread to 'general' and I did. HENCE.. THIS IS THE ONLY open thread on this question.. and the question is...

WHAT CAN I DO TO MY CEON module to get Shipstation to work? THEY BOTH WORK FINE INDEPENDENTLY. When I install them both, the Shipstation fails.

To your other questions:
-where did you create or obtain this app.php file that you mention.

I am not sure what you mean by app.php. However, I will try to address:

I got the shipstation_zc.php file **emailed to me directly from a developer at shipstation **who was trying to fix my issue. He told me there was an update and that I should use the file you see in the 'old' thread. I could only get shipstation to work using this file and the 'snipped' of code I printed in the last thread. If I did not use this php file and tried the one on the site, I could not connect to Shipstation.

If you mean any of the CEON installed files, those files came from the CEON module.

You wrote:

AFAIK, ShipStation does not require or use any .htaccess coding to function. It only requires shipstation_zc.php. I haven't modified any .htaccess file so that SS would function.

My reply:
Shipstation DID require me to use a snippet that was to be added to my .htaccess code and when I installed that snippet AND used the shipstation_zc.php file, AND unistalled CEON, my site was able to connect to Shipstation without issue. It will not work with shipstation under any other set of circumstances.

You wrote:
The code you posted a while back compared to the latest ShipStation update on the same date does not match. I just happened to be talking to a SS support tech and developer and neither had a clue about the code you posted but were pretty specific that the code on the SS website is the official code. It was very difficult to compare the code since you posted code without using the # sign in the menu bar above and pasting the code between the tags.

My reply:
I am not a developer and did not know how to use the #sign to show you. The code I posted was cut and pasted from an email that a shipstation developer emailed to me. AGAIN, it is the only code with which my site would work with shipstation. (It also required the .htaccess 'snippet' and the deinstall of CEON.

You wrote:
There is nothing to call SS. As far as ZC is concerned, SS doesn't even exist. shipstation_zc.php is the file SS executes to log into the admin side and grab the data for outstanding orders. ShipStation should have its own admin account (limiting access) and admin password instead of you providing them with your SuperUser credentials.

My reply:
Again, I am not a developer, but I don't know anything about 'calling SS' but I do have to have an ZC admin account that is specific to Shipstation as you suggest.

You wrote:
ShipStation functions without any issues with a vanilla ZC of any version. The culprit is most likely some customizations that you have added.

My reply:
The culprit is that Shipstation is not compatable with CEON. This was confirmed by myself, my developer and Shipstation.

You wrote:
Are you wanting, thinking or expecting that ShipStation does something other than what is designed to do.... download order details to their server so that you can print shipping labels? Then, write the tracking number back to the order comments and change status to delivered.

My reply:
No, I cannot authorize my zencart to get the account information from Shipstation using the code provided due to the fact that CEON is not compatible. I am looking for a code fix to install to make them work together.

TO THE REST OF THE TECHNICAL QUESTIONS (file contents, etc), I will post tomorrow as my developer is unavailable to post until then. I do have the .htacess file info but I will admit I have about 12 of those files in different parts of my ZC so I am not sure which to supply. Hence, I am asking a more knowledgeable person who knows the correct answer to respond and perhaps we can solve this mystery.

I do not believe that I am the only ZC user with CEON who wants to use Shipstation .. so my hope is that we can get a fix and make people happy!

thank you ALL for your responses!
c

I'm not going to get as fancy as above, but don't mind trying to remove some of the technobabble out if possible. :)

In the post of the thread above, an .htaccess snippet was provided and is referenced above.

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^(.*)$ app.php [QSA,L] 
</IfModule>

To try to explain what this is/does. The first line checks to see if there is a particular filetype on your hosts system.
The second line basically enables everything that follows up to the closing IfModule. Everything on the second through 5th line is only processed if the first line is true.
The third line enables the authorization process necessary for shipstation to pass the login credentials based on an internet review of that line, and it somewhat looks like all other processing of the .htaccess at that point stops (,L at the end of that line) which also may be why there is no "app.php" to discuss.

I've added a blank line to try to help clear things a little.
So the fourth line says if the thing to be shown in the web browser is not specifically a file then process the fifth line. (CEON does recognize/make available directories which is part of the rewrite process, so a CEON URI would/could cause the following line to be processed.)
This brings us to the fifth line that all have asked about. If the RewriteCond above is true, then the RewriteRule is processed. This processing as lhungil stated by asking is to take whatever is in the uri and send it on to the program that is called app.php passing any parameters (products_id=xxx or in this case SS-UserName=XXXXX and SS-Password=YYYYYY) and then stop processing anything below that rewriterule (again ,L at the end of the line).
The last line basically says, alright we're at the end of the If statement...

So, to keep things slowly progressing forward, since the code that was in shipstation_zc.php was sent to you via email, was code provided for app.php by your contact?

If the answer to that is no, then lines 4 and 5 should be removed {to 1) prevent further confusion by anyone looking at your .htaccess file and 2) to prevent breaking access to your site once the other problem is solved.}

Now, the question of which .htaccess we're talking about... Yes there can be many of such file in many different locations. Right now... I would like to start with the one that is at the location where your the index.php file for the front page of ZC is located. This is the location in your file directories where you will find such folders as typically your renamed SECRET admin, cache, download, editors, email, extras, images, includes, logs, media, and pub. If there is an .htaccess file and named specifically as such, then that is the file to first see. The next which lhungil was indicating is if you go up one folder from that (parent) to see if there is an .htaccess file there and what it's contents are. Then continue going up a folder at a time repeating this process... So, say first time the directory might be something like (more than likely significantly different than this):
/usr/server1/host/public_html/mystore/mystoreonline

and at this location is where the folders I describe above. Moving up a folder (parent) would be to then goto the folder at:
/usr/server1/host/public_html/mystore. Notice I have removed mystoreonline from the list of folders.

At this point, my suggestion to "try" would be to revise the .htaccess additional information to at most this (talking about modifying the portion that was added to "make it work", keep the rest of your .htaccess as it is/was):

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>

Notice the revision of the second line that removed ,L from the end.

This may resolve your issue in its entirety, though it would still be helpful to others to have a copy of the .htaccess file to validate and compare against. Do not forget to obscure your admin directory if it is provided in a manner suggested by lhungil.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

31 Jul 2015, 10:03 PM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Shipstation and CEON URL failing to integrate (continued discussion)

Fwiw, I would not be surprised if my suggestion caused a different problem as I haven't looked iinto the other effects of the proposed solution.

Namely I don't know if there wll be a cyclic rewrite because there is no test condition before doing the rewrite, also by not knowing the remaining portion of the .htaccess file and the position of that code, and the method of the CEON redirect it is difficult to say that t will all still work.

From the description of the condtions though, it does appear that this new .htaccess code is above the CEON code. This in itself could be the cause of the initial observations...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

3 Aug 2015, 12:27 PM
#9
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: Shipstation and CEON URL failing to integrate (continued discussion)

Below are the instructions to connecting a ZC site to Shipstation(from their website)

Your ZenCart store can be integrated with ShipStation in just minutes. To grant ShipStation access to your ZenCart account, please follow the instructions below.

Download this file and upload the shipstation_zc.php file to your Zen Cart's root folder.
In your Zen Cart Admin site, go to either Tools or Admin Access Management (depending on your ZenCart version) to create a new admin user for ShipStation. This step is optional, but recommended so that your new integration keeps working even if you change your primary admin password.
Enter the new administrator username and password in the fields below.
Enter the URL to the shipstation_zc.php file below (e.g. <http://www.myzencart.com/shipstation_zc.php>)
Click Test Connection to see if the steps you followed worked correctly.
If you receive an authorization error, you may need to place the this snippet in your .htaccess file.
Click on Finish to make this store active in ShipStation!

This is the snippet they say may be required IF there is an authorization error.

<IfModule mod_rewrite.c> RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ app.php [QSA,L] </IfModule>

I would suggest a couple things. First, remove the rewriterule from the .htaccess file. It may not be needed at all for you to connect to shipstation. If yo receive the authorization error then add the shipstation recommended code to the .htaccess file.

3 Aug 2015, 1:47 PM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Shipstation and CEON URL failing to integrate (continued discussion)

badarac:

Below are the instructions to connecting a ZC site to Shipstation(from their website)

This is the snippet they say may be required IF there is an authorization error.

I would suggest a couple things. First, remove the rewriterule from the .htaccess file. It may not be needed at all for you to connect to shipstation. If yo receive the authorization error then add the shipstation recommended code to the .htaccess file.

Umm, sorry, but it is that exact process that has been followed and has resulted in the generation of this (what seems to be) third posting on the issue...

When the .htaccess information "suggested" is removed, then shipstation is not working (reportedly requiring the .htaccess "snippet" to provide authentication and when included then shipstation works). Problem though is that when shipstation doesn't work CEON URI rewriting does, and when shipstation works, CEON URI rewriting does not... The only difference as has been again explained is that the .htaccess is changed and CEON URI rewriting has no other factor at play.

Therefore it is in the construction of the .htaccess that is causing the issue. And it is that "document" that we have been waiting to see for almost 3 days now that ought to resolve the big mystery...

In short, OP needs to grant authorization through .htaccess, but doesn't need all of the other stuff included in the above example text.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

3 Aug 2015, 2:01 PM
#11
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: Shipstation and CEON URL failing to integrate (continued discussion)

mc12345678:

Umm, sorry, but it is that exact process that has been followed and has resulted in the generation of this (what seems to be) third posting on the issue...

When the .htaccess information "suggested" is removed, then shipstation is not working (reportedly requiring the .htaccess "snippet" to provide authentication and when included then shipstation works). Problem though is that when shipstation doesn't work CEON URI rewriting does, and when shipstation works, CEON URI rewriting does not... The only difference as has been again explained is that the .htaccess is changed and CEON URI rewriting has no other factor at play.

Therefore it is in the construction of the .htaccess that is causing the issue. And it is that "document" that we have been waiting to see for almost 3 days now that ought to resolve the big mystery...

In short, OP needs to grant authorization through .htaccess, but doesn't need all of the other stuff included in the above example text.
Sorry, in reading through the posts here it was not clear to me that anyone had experience with Shipstation or that there was an actual authorization error requiring the .htaccess file at all. I thought it would be helpful to provide the instructions from the Shipstation site as a reference point. I'll go back to lurking now and let you all hash this out since I have no clients using Shipstation and CEON.

3 Aug 2015, 2:37 PM
#12
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Shipstation and CEON URL failing to integrate (continued discussion)

badarac:

Sorry, in reading through the posts here it was not clear to me that anyone had experience with Shipstation or that there was an actual authorization error requiring the .htaccess file at all. I thought it would be helpful to provide the instructions from the Shipstation site as a reference point. I'll go back to lurking now and let you all hash this out since I have no clients using Shipstation and CEON.

Well good thing is that the information that others in this thread have asked about have now been independently provided... Ie. we're all trying to figure out what the deal is with the second rewriterule that is throwing everything at this app.php file... And yet again the snippet has been provided and there is yet again no mention of the app.php file being provided by anything..

Still seems to me that the snippet has too much direction in it. Considering that it needs to authenticate only for reaching a file that wouldn't be rewritten by the CEON URI .htaccess code, then it seems that it would be safest to put after the rewrite rule for CEON.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

3 Aug 2015, 3:43 PM
#13
diptimoy avatar

diptimoy

Zen Follower

Join Date:
Apr 2012
Location:
Bardhaman , Bharat
Posts:
217
Plugin Contributions:
1

Re: Shipstation and CEON URL failing to integrate (continued discussion)

I AM THE DEVELOPER WHO IS WORKING ON HER BEHALF

  1. ZENCART WORKING WELL WITH SHIPSTATION SEPARATELY

  2. ZENCART WORKING WILL WITH CEON SEPARATELY

  3. ZENCART WITH CEON AND SHIPSTATION NOW WORKING

THIS CODE IN .HTACESS MAKE SHIPSATION TO WORK FINE BUT DISABLING CEON FEATURES

<IfModule mod_rewrite.c> RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] </IfModule>
3 Aug 2015, 3:57 PM
#14
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Shipstation and CEON URL failing to integrate (continued discussion)

diptimoy:

I AM THE DEVELOPER WHO IS WORKING ON HER BEHALF

  1. ZENCART WORKING WELL WITH SHIPSTATION SEPARATELY

  2. ZENCART WORKING WILL WITH CEON SEPARATELY

  3. ZENCART WITH CEON AND SHIPSTATION NOW WORKING

THIS CODE IN .HTACESS MAKE SHIPSATION TO WORK FINE BUT DISABLING CEON FEATURES

<IfModule mod_rewrite.c> RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] </IfModule>

What else is in the .htaccess? Ie. what are the entire contents of the .htaccess file?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

4 Aug 2015, 2:22 AM
#15
chervickers avatar

chervickers

New Zenner

Join Date:
Oct 2010
Location:
Indiana
Posts:
72
Plugin Contributions:
0

Re: Shipstation and CEON URL failing to integrate (continued discussion)

THANK YOU Diptimoy.

Actually Diptimoy, I believe you meant to say 3. Zencart with CEON and Shipstation NOT Working. With 'snippet' the CEON is being disabled.

Right?

Also, Diptimoy, please post the .htacess file contents? Since I have so many of those files, I am not sure which one!

Thanks!

4 Aug 2015, 5:03 AM
#16
diptimoy avatar

diptimoy

Zen Follower

Join Date:
Apr 2012
Location:
Bardhaman , Bharat
Posts:
217
Plugin Contributions:
1

Re: Shipstation and CEON URL failing to integrate (continued discussion)

chervickers:

thank you diptimoy.

Actually diptimoy, i believe you meant to say 3. Zencart with ceon and shipstation not working. With 'snippet' the ceon is being disabled.

Right?

Also, diptimoy, please post the .htacess file contents? Since i have so many of those files, i am not sure which one!

Thanks!

sorry typing mistake by me

point 3 should be

zencart with ceon and shipstation not working

4 Aug 2015, 5:09 AM
#17
chervickers avatar

chervickers

New Zenner

Join Date:
Oct 2010
Location:
Indiana
Posts:
72
Plugin Contributions:
0

Re: Shipstation and CEON URL failing to integrate (continued discussion)

here is the .htaccess file

  
RewriteEngine On
DirectoryIndex index.php

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^(.*)$ app.php [QSA,L] 
</IfModule>


redirect 301 /store  http://www.prowoodfingerboards.com

RewriteCond %{HTTP_REFERER} !^http://(.+\.)?prowoodfingerboards\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^https://(.+\.)?prowoodfingerboards\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]
## BEGIN CEON URI MAPPING REWRITE RULE

RewriteEngine On

# Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])
RewriteCond %{REQUEST_URI} !\.[a-z]{2,5}$ [NC]
# Don't rewrite any URIs for some, popular specific file format extensions,
#   which are not covered by main file extension condition above
RewriteCond %{REQUEST_URI} !\.(mp3|mp4|h264)$ [NC]
# Don't rewrite any URIs for some specific file format extensions,
#   which are not covered by main file extension condition above
#   Uncomment the following line to apply this condition! (Remove the # at the start of the next line)
#RewriteCond %{REQUEST_URI} !\.(3gp|3g2|h261|h263|mj2|mjp2|mp4v|mpg4|m1v|m2v|m4u|f4v|m4v|3dml)$ [NC]
# Don't rewrite admin directory
RewriteCond %{REQUEST_URI} !^/admin [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/editors/ [NC]
# Don't rewrite logs directory
RewriteCond %{REQUEST_URI} !^/logs/ [NC]
 
# Don't rewrite feed directory
RewriteCond %{REQUEST_URI} !^/feed/ [NC]
# Don't rewrite cgi-bin directory
RewriteCond %{REQUEST_URI} !^/cgi-bin/ [NC]
 
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* /index.php [QSA,L]

## END CEON URI MAPPING REWRITE RULE

# Google Analytics Integration - Added by cPanel.
<IfModule mod_substitute.c>
AddOutputFilterByType SUBSTITUTE text/html
Substitute "s|(<script src='/google_analytics_auto.js'></script>)?</head>|<script src='/google_analytics_auto.js'></script></head>|i"
</IfModule>
# END Google Analytics Integration
RewriteCond %{HTTP_HOST} ^www\.prowoodfingerboards\.com$
RewriteRule ^(.*)$ "http\:\/\/prowoodfingerboards\.com\/$1" [R=301,L]

RewriteCond %{HTTP_HOST} ^everythingfingerboard\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.everythingfingerboard\.com$
RewriteRule ^(.*)$ "http\:\/\/prowoodfingerboards\.com\/$1" [R=301,L]

RewriteCond %{HTTP_HOST} ^prowoodfingerboard\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.prowoodfingerboard\.com$
RewriteRule ^/?$ "http\:\/\/prowoodfingerboards\.com\/\$1" [R=301,L]

AddHandler application/x-httpd-php55 .php 
<IfModule mod_suphp.c> 
suPHP_ConfigPath /opt/php55/lib 
<Files php.ini> 
order allow,deny 
deny from all 
</Files> 
</IfModule> 


   RewriteCond %{HTTP_USER_AGENT} ^BadBot [OR]
   RewriteCond %{HTTP_USER_AGENT} ^EvilScraper [OR]
   RewriteCond %{HTTP_USER_AGENT} ^FakeUser
   RewriteRule ^(.*)$ http://go.away/
 
 
4 Aug 2015, 5:41 AM
#18
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Shipstation and CEON URL failing to integrate (continued discussion)

So again, what is app.php? The file is NOT part of core Zen Cart or CEON URI, and last I checked it was not part of ShipStation either (and it is also not part of the ShipStation code available here in the download section).

The code in the .htaccess file indicates "app.php" is processing ALL requests (for files which do not physically exist). This happens BEFORE the CEON code or Zen Cart is loaded and will cause the remaining mod_rewrite directives in the .htaccess to NOT be processed (including the CEON rules). This mod_rewrite rule (as pointed out previously) is probably the cause of your frustrations.

Which brings us back to "What is app.php and from where did it originate?". If you do not know where it came from (and your developer does not either), this would be a BIG red flag to be checked out immediately.

If neither of you can identify where this file came from (and what the file does) and you are legally able to post the file (via upload or supply the contents in a code block), the community may be able to help. But until you can supply more details about "app.php", we will not be able to help further.

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

4 Aug 2015, 6:14 AM
#19
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Shipstation and CEON URL failing to integrate (continued discussion)

If I had to "guess", app.php was an attempt to supply a generic "404 error page".... But I really hate being forced to guess (as guessing can lead to breaking things - sometimes in unforseen ways with issues not being obvious until far into the future).

Again if you could supply more information about "app.php" it would be best (and the community might be able to help further).

But If providing a "404 error page" is the sole purpose "app.php" (and the corresponding mod_rewrite directive)... This is not needed with Zen Cart + CEON and should be removed. Zen Cart already includes a "404 error page" and when you install CEON URI Mapping, all missing resources will be handled by the Zen Cart configuration for missing resources (such as redirect to the home page or displaying an error page).

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

4 Aug 2015, 3:33 PM
#20
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Shipstation and CEON URL failing to integrate (continued discussion)

CherVickers:

here is the .htaccess file

RewriteEngine On
DirectoryIndex index.php

<IfModule mod_rewrite.c> RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] </IfModule>

redirect 301 /store http://www.prowoodfingerboards.com

RewriteCond %{HTTP_REFERER} !^http://(.+.)?prowoodfingerboards.com/ [NC]
RewriteCond %{HTTP_REFERER} !^https://(.+.)?prowoodfingerboards.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*.(jpe?g|gif|bmp|png)$ - [F]

BEGIN CEON URI MAPPING REWRITE RULE

RewriteEngine On

Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])

RewriteCond %{REQUEST_URI} !.[a-z]{2,5}$ [NC]

Don't rewrite any URIs for some, popular specific file format extensions,

which are not covered by main file extension condition above

RewriteCond %{REQUEST_URI} !.(mp3|mp4|h264)$ [NC]

Don't rewrite any URIs for some specific file format extensions,

which are not covered by main file extension condition above

Uncomment the following line to apply this condition! (Remove the # at the start of the next line)

#RewriteCond %{REQUEST_URI} !.(3gp|3g2|h261|h263|mj2|mjp2|mp4v|mpg4|m1v|m2v|m4u|f4v|m4v|3dml)$ [NC]

Don't rewrite admin directory

RewriteCond %{REQUEST_URI} !^/admin [NC]

Don't rewrite editors directory

RewriteCond %{REQUEST_URI} !^/editors/ [NC]

Don't rewrite logs directory

RewriteCond %{REQUEST_URI} !^/logs/ [NC]

Don't rewrite feed directory

RewriteCond %{REQUEST_URI} !^/feed/ [NC]

Don't rewrite cgi-bin directory

RewriteCond %{REQUEST_URI} !^/cgi-bin/ [NC]

Handle all other URIs using Zen Cart (its index.php)

RewriteRule .* /index.php [QSA,L]

END CEON URI MAPPING REWRITE RULE

Google Analytics Integration - Added by cPanel.

<IfModule mod_substitute.c> AddOutputFilterByType SUBSTITUTE text/html Substitute "s|(<script src='/google_analytics_auto.js'></script>)?</head>|<script src='/google_analytics_auto.js'></script></head>|i" </IfModule> # END Google Analytics Integration RewriteCond %{HTTP_HOST} ^www\.prowoodfingerboards\.com$ RewriteRule ^(.*)$ "http\:\/\/prowoodfingerboards\.com\/$1" [R=301,L]

RewriteCond %{HTTP_HOST} ^everythingfingerboard.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.everythingfingerboard.com$
RewriteRule ^(.*)$ "http://prowoodfingerboards.com/$1" [R=301,L]

RewriteCond %{HTTP_HOST} ^prowoodfingerboard.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.prowoodfingerboard.com$
RewriteRule ^/?$ "http://prowoodfingerboards.com/$1" [R=301,L]

AddHandler application/x-httpd-php55 .php
<IfModule mod_suphp.c>
suPHP_ConfigPath /opt/php55/lib
<Files php.ini>
order allow,deny
deny from all
</Files>
</IfModule>

RewriteCond %{HTTP_USER_AGENT} ^BadBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^EvilScraper [OR]
RewriteCond %{HTTP_USER_AGENT} ^FakeUser
RewriteRule ^(.*)$ http://go.away/


> **lhungil:**
>
> If I had to "guess", app.php was an attempt to supply a generic "404 error page".... But I really hate being forced to guess (as guessing can lead to breaking things - sometimes in unforseen ways with issues not being obvious until far into the future).
> 
> Again if you could supply more information about "app.php" it would be best (and the community might be able to help further).
> 
> But If providing a "404 error page" is the sole purpose "app.php" (and the corresponding mod_rewrite directive)... This is not needed with Zen Cart + CEON and should be removed. Zen Cart already includes a "404 error page" and when you install CEON URI Mapping, all missing resources will be handled by the Zen Cart configuration for missing resources (such as redirect to the home page or displaying an error page).

The code snippet requested to be added is something that is elsewhere on the internet and appears to be some form of "standard" method to work with this issue. That said, there are multiple problems with it (one important one is that it does remove the information that follows the host name). Regarding the .htaccess as it is? There are several issues with it as well... Can explain as necessary, but generally speaking, processing is top down and when a ,L] is met as part of a "successful" process then the applicable action is taken/nothing further is processed down the file.

I've rewritten the .htaccess to the following which should work for your condition including CEON. I can not vouch for the effect of moving the php portion as it never was within the processing cycle of the .htaccess, so it may cause a change in php version on the site... 

Obviously the admin escape will need to be modified for the particular admin directory of the site if not going to use a shorter version of what that section accomplishes. I've also removed the redundant RewriteEngine On calls as it is only needed once in an .htaccess file and before the first rewrite...

RewriteEngine On
DirectoryIndex index.php

<IfModule mod_rewrite.c> RewriteRule (.*) $1 [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] </IfModule>

redirect 301 /store [URL="http://www.prowoodfingerboards.com/"]http://www.prowoodfingerboards.com[/URL]

RewriteCond %{HTTP_REFERER} !^[URL]http://(.+.)?prowoodfingerboards.com/[/URL] [NC]
RewriteCond %{HTTP_REFERER} !^[URL]https://(.+.)?prowoodfingerboards.com/[/URL] [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*.(jpe?g|gif|bmp|png)$ - [F]

RewriteCond %{HTTP_HOST} ^www.prowoodfingerboards.com$
RewriteRule ^(.*)$ [URL]http://prowoodfingerboards.com/$1[/URL] [R=301,L]

RewriteCond %{HTTP_HOST} ^everythingfingerboard.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.everythingfingerboard.com$
RewriteRule ^(.*)$ [URL]http://prowoodfingerboards.com/$1[/URL] [R=301,L]

RewriteCond %{HTTP_HOST} ^prowoodfingerboard.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.prowoodfingerboard.com$
RewriteRule ^(.*)$ [URL]http://prowoodfingerboards.com/$1[/URL] [R=301,L]

AddHandler application/x-httpd-php55 .php

<IfModule mod_suphp.c> suPHP_ConfigPath /opt/php55/lib <Files php.ini> order allow,deny deny from all </Files> </IfModule>

RewriteCond %{HTTP_USER_AGENT} ^BadBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^EvilScraper [OR]
RewriteCond %{HTTP_USER_AGENT} ^FakeUser
RewriteRule ^(.*)$ [URL]http://go.away/[/URL]

Google Analytics Integration - Added by cPanel.

mc12345678 Added after the above to not count redirected bots in google. If desired to see that information

then this Google Analytics Integration section could be moved up to above the bot redirect, but do not

suggest moving it above the host server redirects as multiple counts/substitution occur multiple times if one of

those URIs were entered.

<IfModule mod_substitute.c> AddOutputFilterByType SUBSTITUTE text/html Substitute "s|(<script src='/google_analytics_auto.js'></script>)?</head>|<script src='/google_analytics_auto.js'></script></head>|i" </IfModule> # END Google Analytics Integration

BEGIN CEON URI MAPPING REWRITE RULE

Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])

RewriteCond %{REQUEST_URI} !.[a-z]{2,5}$ [NC]

Don't rewrite any URIs for some, popular specific file format extensions,

which are not covered by main file extension condition above

RewriteCond %{REQUEST_URI} !.(mp3|mp4|h264)$ [NC]

Don't rewrite any URIs for some specific file format extensions,

which are not covered by main file extension condition above

Uncomment the following line to apply this condition! (Remove the # at the start of the next line)

#RewriteCond %{REQUEST_URI} !.(3gp|3g2|h261|h263|mj2|mjp2|mp4v|mpg4|m1v|m2v|m4u|f4v|m4v|3dml)$ [NC]

Don't rewrite admin directory

RewriteCond %{REQUEST_URI} !^/admin [NC]

Don't rewrite editors directory

RewriteCond %{REQUEST_URI} !^/editors/ [NC]

Don't rewrite logs directory

RewriteCond %{REQUEST_URI} !^/logs/ [NC]

Don't rewrite feed directory

RewriteCond %{REQUEST_URI} !^/feed/ [NC]

Don't rewrite cgi-bin directory

RewriteCond %{REQUEST_URI} !^/cgi-bin/ [NC]

Handle all other URIs using Zen Cart (its index.php)

RewriteRule (.*) /index.php [QSA,L]

END CEON URI MAPPING REWRITE RULE

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...