Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 59
  1. #21
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,542
    Plugin Contributions
    19

    Default Re: how do I require application_top.php in folder in admin with a composer package?

    Wait... Wait wait wait... Are you saying you're trying to build a script that sits on your server and connects to your Gmail account "just" so you could get it to read your Amazon emails, and then you'll use that data to modify your site's stock levels?

  2. #22
    Join Date
    Dec 2008
    Location
    Pittsburgh, PA
    Posts
    237
    Plugin Contributions
    1

    Default Re: how do I require application_top.php in folder in admin with a composer package?

    Quote Originally Posted by balihr View Post
    Wait... Wait wait wait... Are you saying you're trying to build a script that sits on your server and connects to your Gmail account "just" so you could get it to read your Amazon emails, and then you'll use that data to modify your site's stock levels?
    That and generally to practice using API's. Amazon Sellercentral Pro's $40/mo. for the amazon seller api. :/

  3. #23
    Join Date
    Dec 2008
    Location
    Pittsburgh, PA
    Posts
    237
    Plugin Contributions
    1

    Default Re: how do I require application_top.php in folder in admin with a composer package?

    currently the only way I can get it to work is w/ a folder in the admin w/ an index.php I'm guessing it's security stuff that's above me. I'm open to other suggestions on approaches. I was also considering trying to use tampermonkey to add a button in amazon sellercentral that send the data (maybe w/ json and some sort of http api end-point? (I don't know about this much yet))

  4. #24
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: how do I require application_top.php in folder in admin with a composer package?

    Maybe skip using the email API by:
    - linking up an IfTTT (if-this-then-that) service (either forward those emails to it, or maybe it can inspect incoming emails for you)
    - then the IfTTT service can be the thing that sends a notice to your server to do the cleanup (and then you just need a tiny cleanup listener script).
    .. - that "notice" could be an HTTP call to a listener file (my_amazon_handler.php) that does the cleanup after some validation
    .. - or maybe it could send the data as a CSV file (somehow), and you could have a cron job to loop thru all the received CSV files in whatever directory

    Popular IfTTT services include ifttt .com, zapier, integromat
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #25
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,542
    Plugin Contributions
    19

    Default Re: how do I require application_top.php in folder in admin with a composer package?

    IMHO, quite an overkill for what you actually need. Learning APIs is great, but Google's APIs are nowhere near simple or easy to integrate, and are definitely not something to start the learning process.

    DrByte's solution is awesome (of course), but you could also have it run on your end without involving 3rd party apps. An idea that crossed my mind - setup a new email account on your server, let's say "[email protected]" and then configure your Gmail to automatically FW the amazon's "sold/ship" emails to that address. Next step would be to create your own script that uses imap_body and other imap_ functions to connect to the new email account and read the contents and then process it against the database. Run it from the admin, run it as a cron job, do whatever you want - it's relatively simple to process the data after you get the contents to your server...

  6. #26
    Join Date
    Dec 2008
    Location
    Pittsburgh, PA
    Posts
    237
    Plugin Contributions
    1

    Default Re: how do I require application_top.php in folder in admin with a composer package?

    Re: Dr Byte's suggestions:
    Cool I'm going to look into IFTTT I have a few of those going for other things not web dev related. Should watch a few introductions to zapier and integromate.

    Re: balihr
    This seems more robust than google's api auth token expiring and requiring a 2nd log in.

    Before I had read those 2 replies my current pseudo code is this:

    //Greasemonkey inject a button into sellercentral to pull the amount paid for shipping (not in email)

    //button click launches "handler" maybe w/ orderid and shipping cost into the script page that launches the gmail api...

    //loop through gmails w/ orderid search criterion

    //parse

    //inject order
    ...a question would then also be what's the easiest way to grab all the sql commands that happen when an order's placed? cleverly placed print_r in the db query factory?

    Bahlir's seems to be right in I'm probably overly complicating this. Also wouldn't mind messing w/ square's API on another project before classes start back up depending on how productive I am w/ this.

  7. #27
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: how do I require application_top.php in folder in admin with a composer package?

    Better yet ... does Amazon offer webhook notifications when something sells?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #28
    Join Date
    Dec 2008
    Location
    Pittsburgh, PA
    Posts
    237
    Plugin Contributions
    1

    Default Re: how do I require application_top.php in folder in admin with a composer package?

    Quote Originally Posted by DrByte View Post
    Better yet ... does Amazon offer webhook notifications when something sells?
    If I'm not mistaken they do, but it's to the tune of $40/mo for the API included w/ the professional selling account. I haven't been able to hit a level of success to justify it.

  9. #29
    Join Date
    Dec 2008
    Location
    Pittsburgh, PA
    Posts
    237
    Plugin Contributions
    1

    Default Re: how do I require application_top.php in folder in admin with a composer package?

    So I have this mashed up and "working" (reading from my gmail and from an orders_amazon table I created in the zen-cart db)

    However, it doesn't automatically create the token.json file as it should. I have to use the google gmail api quickstart to generate it and then move it to the right location.

    so the left column here's when it only worked reading from my gmail w/ the api (branch 6 https://github.com/wolfderby/gmailTu...d_of_episode_6) from https://www.youtube.com/watch?v=fUm5ddL7bG8

    the right column is me trying to put it into the zen-cart design pattern.



    ... in ... /amazon_gmail_orders/ >>> ... in ... /admin
    /amazon_gmail_orders/index.php >>> amazon_gmail_orders.php
    Composer.json >>> admin/composer.json
    connection.php >>> includes/classes/yoyo_connection.php
    credentials.json >>> includes/classes/credentials.json
    gmail.php >>> includes/classes/yoyo_gmail.php
    token.json >>> includes/classes/token.json
    /vendor/ >>> includes/classes/vendors/gmail/vendor/

  10. #30
    Join Date
    Dec 2008
    Location
    Pittsburgh, PA
    Posts
    237
    Plugin Contributions
    1

    Default Re: how do I require application_top.php in folder in admin with a composer package?

    Quote Originally Posted by wolfderby View Post
    So I have this mashed up and "working" (reading from my gmail and from an orders_amazon table I created in the zen-cart db)

    However, it doesn't automatically create the token.json file as it should. I have to use the google gmail api quickstart to generate it and then move it to the right location.

    so the left column here's when it only worked reading from my gmail w/ the api (branch 6 https://github.com/wolfderby/gmailTu...d_of_episode_6) from https://www.youtube.com/watch?v=fUm5ddL7bG8

    the right column is me trying to put it into the zen-cart design pattern.



    ... in ... /amazon_gmail_orders/ >>> ... in ... /admin
    /amazon_gmail_orders/index.php >>> amazon_gmail_orders.php
    Composer.json >>> admin/composer.json
    connection.php >>> includes/classes/yoyo_connection.php
    credentials.json >>> includes/classes/credentials.json
    gmail.php >>> includes/classes/yoyo_gmail.php
    token.json >>> includes/classes/token.json
    /vendor/ >>> includes/classes/vendors/gmail/vendor/
    also asking this question on stackoverflow in case it's more appropriate there: https://stackoverflow.com/questions/...te-the-vendors

 

 
Page 3 of 6 FirstFirst 12345 ... LastLast

Similar Threads

  1. error admin Warning: require(includes/application_top.php
    By unusualfinds in forum Addon Shipping Modules
    Replies: 12
    Last Post: 6 Apr 2012, 07:50 PM
  2. Error MessageWarning: require(includes/application_top.php) [function.require]: faile
    By valbuhagiar in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 31 Oct 2011, 07:44 PM
  3. Warning:require(includes/application_top.php) error
    By Lurkzilla in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 25 Aug 2010, 06:00 PM
  4. admin error message require(includes/application_top.php)
    By mitdrissia in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 27 Nov 2009, 10:06 AM
  5. Replies: 0
    Last Post: 10 Oct 2009, 02:38 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR