Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Help with code piece

    Had a bit of a double-take on this thread. At first glance I thought you were asking for help with your cod piece... (Search Google images for cod piece).
    20 years a Zencart User

  2. #12
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Re: Help with code piece



    Now that you mention it...I do need some help with my cod piece...

    It's got a stack overflow error

  3. #13
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Re: Help with code piece

    I haven't been completely honest about my intentions though.

    You see, I use QuickBooks Online for my accounting.

    The actual reason I needed to use purchase orders from the front-end was to calculate average costing of my goods.

    Most unfortunately, QuickBooks Online uses FIFO, and as such, you cannot get an average cost.

    But, given that this sufffices for me to adjust stock levels when new stock has come in, and also calculates the average cost for me...kind of 2 birds with one stone situation.

    That being said, I've also got some custom coding that allows the EMP logged in admin to adjust the prices in the cart.

    Uses a simple input box field, and each modification of price is separated by commas.

    Unfortunately my coding is obviously very amateurish, and so are my techniques.

    If it were not for that, I'd have packaged it into a module for the community.

    The only hurdle going forward is to now find a way to allow an EMP admin to checkout with out of stock items. Which shouldn't be too much trouble.
    Last edited by yaseent; 12 Jan 2017 at 04:56 AM.

  4. #14
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Help with code piece

    There is sort of a built in way to at least see an out-of-stock item, then after that it's a matter of allowing that individual to do atypical action of adding an out-of-stock product to the cart. :)

    BTW, regarding quickbooks, can't recall if you've posted to related threads, but I know there are those out there that would like to be able to link ZC with their quickbooks. Not sure if your current method of doing so has been discussed there or not. If it hasn't, there are plenty that would appreciate your input.

    Further on that, thank you for providing further business reason for doing what you are doing. Provides a better understanding of the associated "constraints".

    And on the discussion of clarity, to confirm, the stack overflow error had nothing to do with the computer code, correct?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #15
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Re: Help with code piece

    Of course it did....metaphysically speaking.

    I haven't really posted much about Quickbooks Online. I've been studying their API for several months along with a few other accounting systems...But i settled on QuickBooks Online because, as a cloud-based solution, it is constantly evolving, and their API is unprecedented in terms of access. It's even got a webhooks section, allows you to set up rules that push content from QuickBooks to your store if you want that to happen.

    Unfortunately, my coding skills are very limited. I've had a look at a "library" created by Consolibyte aka Keith Palmer who I think specialized in QuickBooks Online integrations. He's got a Github repo with free PHP libraries he's coded. But this would be useful to someone with a better understanding of OAuth and then API development. Also, I think Keith offers his services commercially, and from what I've seen on StackOverflow posts, he seems very forthcoming and hands on.

    At the moment, I'll only be using Zen Cart to constantly update my average costings, and using this purchase order method to do that.

    With QuickBooks online, I'll be re-entering orders manually, but, in the past few weeks I stumbled across a new SaaS called Zapier.com

    By far one of the most well-integrated, and efficient uses of SaaS I've ever come across.

    I signed up for a trial account, and decided to do this as a test case:

    1. Zapier.com connects to my GMail account, and checks it every 15 minutes. If there is a new email with the label, Bank Statement, Zapier.com goes to work. It then has a function that allows you to dig further into this email, and find a PDF attachment.

    2. Then you can add another step. So in Step 2, I tell it to print out the PDF statement, via my Google Cloud Connected printer.

    All of the calls, and all the technical issues, get sorted out by them. Now my bank statements, landline statements, and even certain distributor statements, all print out, by themselves, without me. And upon testing the service, I found that it is so far 100% reliable. Not one missed statement. Great time to be living.

    Blah di blah...Zapier.com offers support for QuickBooks Online as well. Zapier.com can add an Estimate, an Invoice, a Sales Receipt, even a New Customer.

    And the big number is MySQL integration. It can connect to MySQL, check for new rows, and then it's gone line item support for integration with QuickBooks Online.

    Once I'm done with a few small things on Zen Cart, I'm going to focus my efforts on Zapier.com and integrating my Zen Cart's MySQL with QuickBooks Online via Zapier.com. I have high hopes.

    But I have no interest in going with a custom SaaS solution, because it's way too expensive, and with Zapier.com, you pay your 15 dollars a month, and you've got support from a reputable company who makes it their business to continue keeping you as a client.

    I suggest anyone reading this post to grab a quick look at Zapier.com. Scroll down to the bottom, click on "App Directory". Search for Gmail, open in new Tab, and search for MySQL, open in new Tab, and search for QuickBooks Online, and open.

    Just take a look at the Triggers, Search and Action capabilities of their integrations with the various services I mentioned, and you will get a striking idea of the possibilities their platform is capable of. It's a real game-changer IMO.

    If I ever do come right with Zapier + QuickBooks Online + Zen Cart - I will definitely be posting my solution here. The most intriguing thing about this kind of solution, is that Zapier.com would need limited read-only access to your MySQL database. It can't touch core code, it can't modify your database, and most importantly, it doesn't need to.
    Last edited by yaseent; 12 Jan 2017 at 02:04 PM.

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

    Default Re: Help with code piece

    Quote Originally Posted by yaseent View Post
    .... That's all a bit too higher grade for me...

    It's funny you should mention that.

    I've added some functionality to my Admin Categories section to do exactly that:

    Attachment 16885
    Share this code?

  7. #17
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Re: Help with code piece

    I didn't document the code changes.

    Here are three files I believe control all the functions.

    admin/categories.php

    admin/includes/modules/category_product_listing.php

    admin/includes/functions/extra_functions/update_product_quantity.php

    I've attached all three files for you, backup yours, then upload (test environment) to their correct folders as mentioned above.

    Give it a whirl and lemme know how it pans out.

    Archive.zip

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Help a newbie install a piece of javascript with product vars on a product page
    By jhkaplan in forum Templates, Stylesheets, Page Layout
    Replies: 18
    Last Post: 1 May 2012, 05:35 PM
  2. Need Help With Mod I'm Writing on one little piece I'm missing...
    By Mega Moonshine in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 1 Jun 2010, 04:11 PM
  3. Help need to set up per zip code shipping module with 5 zip code areas flat fee
    By cshart in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 11 Feb 2009, 06:31 AM
  4. help with code
    By Rising Sun Racing in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 12 Jun 2008, 06:45 PM
  5. Help with Product availability by Zip Code or Postal Code
    By enigma777 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 4 Jun 2008, 10:07 PM

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