Page 1 of 3 123 LastLast
Results 1 to 10 of 24
  1. #1
    Join Date
    Oct 2010
    Location
    Indiana
    Posts
    69
    Plugin Contributions
    0

    Default Shipstation and CEON URL failing to integrate (continued discussion)

    continuing from here:
    https://www.zen-cart.com/showthread....72#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!

  2. #2
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default 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?

  3. #3
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default 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.

  4. #4
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

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

    FWIW, ShipStation downloads orders

    Code:
    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

    Code:
    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

  5. #5
    Join Date
    Oct 2010
    Location
    Indiana
    Posts
    69
    Plugin Contributions
    0

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

    Quote Originally Posted by RixStix View Post
    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

  6. #6
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default 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.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

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

    Quote Originally Posted by CherVickers View Post
    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.

    Code:
    <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):

    Code:
    <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.
    Last edited by mc12345678; 31 Jul 2015 at 10:23 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default 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...

  9. #9
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default 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.

  10. #10
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

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

    Quote Originally Posted by badarac View Post
    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...

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Are there alternatives to Stamps.com and ShipStation?
    By athena in forum Addon Shipping Modules
    Replies: 13
    Last Post: 23 Sep 2016, 01:04 PM
  2. v153 URL rewriting from Ceon to Utimate URL.
    By robbie269 in forum General Questions
    Replies: 40
    Last Post: 11 Jan 2015, 11:43 PM
  3. Ceon url mapping url issue
    By Indiasupplement in forum General Questions
    Replies: 1
    Last Post: 22 Sep 2013, 01:23 AM
  4. Instant Payment Notifications sent to the following URL(s) are failing
    By paulcreedy in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 15 Mar 2011, 08:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg