Results 1 to 1 of 1
  1. #1
    Join Date
    May 2008
    Posts
    5
    Plugin Contributions
    0

    Default Quick Order / PHP Issue

    The official thread for this addon seems to be dead so I'll start this one. My issues is as much a general PHP question as one on Quick Order anyway. Although I have many years of experience, this is my first foray into PHP.

    I'm using Zen version 3.8. All my other addons are playing nicely with each other and QO doesn't edit any core files. I am using QO for it's intended purpose with one small exception.

    My client wants a simple visual que for indicating a previously ordered item. Since the site hasn't really been launched yet, we had to have some easy way to bring in orders from the customers "pre-web history."

    I have included code that checks the customerID of the logged on user and loads an identically named CSV file containing a partial list of previously ordered items by model number. It should check the array against the database of items as they are being added to the Quick Order list and change the appearance of the linked item in the list.

    This works perfectly when I hard code a number into the loop but it refuses to work when checking against the entire array.

    I have tested the cr*p out of this thing. I know the model number is being passed correctly and I know the array is being properly created by the fgetcsv function. You'll notice in the attached code that the first 14 lines are mostly debugging code; my attempt to see what the heck is going on.

    To see this working go to our test server: TEST Quick Order. I've removed the logon check and it's running against a test CSV file so you should see it working (or NOT working actually).

    After looking at that go here HARD CODED TEST. You'll see it works here. The only difference is the hard coding into the function.

    The "live" version uses numbers.php and test.csv. The hard coded version uses numbers1.php and test.csv. (Refer to the attached zip for code). I also tried field content indicators (see test1.csv in the zip) to no avail.

    To me this seems like a Type Mismatch. But that isn't supposed to happen in PHP, correct? To test this, you'll also notice I attempted to concatenate a string together so that the quote marks would be present. But that didn't work.

    I believe the attached code will demonstrate to the careful reader everything I have attempted. If I had any hair left I'd be pulling it out now. I know this must be some simple dumb error.

    Any help would be greatly appreciated.
    Attached Files Attached Files

 

 

Similar Threads

  1. v150 V150 - PHP 5.4 issue - Edit Order Button Not Working
    By inklingsolutions in forum General Questions
    Replies: 8
    Last Post: 8 Feb 2016, 05:26 PM
  2. v154 Quick Order - How to change sort order?
    By anduril3019 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 20 Jun 2015, 09:09 PM
  3. v138a Quick Re-order aka order_history.php history beyond last order
    By beyerg in forum Customization from the Admin
    Replies: 1
    Last Post: 24 Jan 2012, 11:14 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