simple csv php script required in php

Discussion in 'Hire a Freelancer' started by specopkirbs, Jan 8, 2011.

  1. specopkirbs

    specopkirbs BANNED BANNED

    Nov 28, 2008
    Likes Received:
    ok this might get confusing so ill keep it simple

    i have for my online store a simple script which pulls a data feed in csv from my suppliers website to keep my stock levels up to date.

    The csv file is saved on my server and is in the following format
    coloumn A is the product id
    coloumn B is the quantity in stock relating to the product id in column A.

    Now the confusing bit

    Within my store i have some products with individual ids that are a combination of other products.


    What i need is a php script that takes the product ids that i define and then takes the stock level from each of the product ids and checks for the lowest stock level from the products that make up the stack.

    eg product id 1 qty = 100 product id 2 qty = 5 product id 3 qty = 0

    i need the script to scrape the quantitys from the original csv file on my server and then create a new csv file with the product id for the stack in coloumn A and the LOWEST from the stack quantity in column B
    then save the new csv file.
    the result would be
    Coloumn A in CSV = stackproductid
    Column B = Lowest stock level from the product ids defined in the php file

    does this make any sense to anyone?

    If your into sports nutrition and supplementation you will get an idea of what a stack is.
    Last edited: Jan 8, 2011
  2. gainer

    gainer Newbie

    Nov 19, 2009
    Likes Received:
    Programmer / Web Designer
    Dirty South
    This would be an easy script to write php has some built in functions that make comma separated values very easy to handle. I'd be interested in writing it pm me