Local Food Cooperative Software


The Jist: This software operates on an order cycle instead of an “always open” system. Producers/farmers can log in and add products to their product catalog at anytime for sale. During a designated time, cooperative members place orders.
HomeWho’s Using It?DownloadsHow to HelpOther Resources

Always make back-ups before applying changes.

___v1.4.2 "Ketchup"___

This is a "catch-up" release that includes several small updates and a few additions and bug fixes.

Features

Contributors to this Update

Roy Guisinger, Lisa Cross, Ben Anderman, Emma McCauley.

___v1.4.2 Database Changes ___


ALTER TABLE `transactions` CHANGE `transaction_batchno` `transaction_batchno` INT UNSIGNED DEFAULT NULL;
ALTER TABLE `members` CHANGE `address_line1` `address_line1` VARCHAR( 50 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL;
ALTER TABLE `members` CHANGE `address_line2` `address_line2` VARCHAR( 50 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL;
ALTER TABLE `members` CHANGE `work_address_line1` `work_address_line1` VARCHAR( 50 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci;
ALTER TABLE `members` CHANGE `work_address_line2` `work_address_line2` VARCHAR( 50 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci;
UPDATE `subcategories` SET `subcategory_name` = 'Paper Supplies, Notecards, Office' WHERE `subcategory_id` = '111' LIMIT 1 ;

___v1.4.2 Changes to Files___

  1. Member Balance Function bug fix
    shop/admin/member-balance-function.php

    Find the two places in the file with this line, around lines 106 and 115:
    WHERE transaction_type = ttype_id and ttype_parent = '20'

    Add at the end of those lines:
    AND tt.ttype_whereshow = 'customer'

  2. Allow Administrator Users Edit General Delivery Info
    shop/admin/index.php

    Find this around line 45:
    session_register("admin_member_id");

    Add this on the next line:
    session_register("auth_type");

    shop/admin/delivery_editroute.php

    Find this around lines 9 and 19:
    if($admin_member_id==$rtemgr_member_id){

    Update both to this:
    if($admin_member_id==$rtemgr_member_id || $_SESSION['auth_type']=='administrator'){

  3. Producer Class Update for MySQL 5
    shop/admin/libraries/producer.class.php

    Find this around lines 66-67:
    FROM $table_basket, $table_prod, $table_subcat,
    $table_basket_all, $table_mem, $table_rt, $table_delcode

    Put parentheses around the list of tables, like this (since it is followed by a LEFT JOIN):
    FROM ($table_basket, $table_prod, $table_subcat,
    $table_basket_all, $table_mem, $table_rt, $table_delcode)

  4. Add Table Heading and Page Break (for PDFs) for when Storage Codes change within a Producer Invoice
    shop/admin/libraries/producer.class.php

    Find around line 123:
    if($sc==$row['storage_code'] && $m==$member_id){

    Paste this in ABOVE that line:
      if($sc && $sc!=$row['storage_code']){
        	$display .= '</table>
        	<HR BREAK>
        	<table width="100%" cellpadding="4" cellspacing="0" border="0">
      <tr>
        <th valign="bottom">PrdID</th>
    
        <th valign="bottom">Member</th>
        <th valign="bottom">Quantity</th>
        <th valign="bottom">(Add Later)<br>Weight</th>
        <th valign="bottom">Extra<br>Charge</th>
        <th valign="bottom">In/Out of Stock</th>
    
        <th valign="bottom">Total Item Price</th>
        <th valign="bottom">Edit Item</th>
      </tr>';
        } 
  5. Allow an email to go out to new members when they're approved
    shop/admin/process_pending.php

    Find on lines 303 and 428:
    //sendApprovalEmail($member_id);

    Uncomment so the email will go out:
    sendApprovalEmail($member_id);

  6. Product Editing - storage code updates applied immediately to public product list
    shop/func/edit_product_screen_updatequery.php

    Find the product_list update query that starts with '$sqlu2 = "UPDATE $table_prod SET ' around line 81. Put the update query inside an if statement to check if the product is in product_list table yet and add the storage_id to the update query. It should read like this:
      $sql = mysql_query("SELECT product_id FROM ".$table_prod." WHERE product_id = '".$product_id."'");
      if(mysql_num_rows($sql)>0){
        
        	$sqlu2 = "UPDATE $table_prod SET 
        	storage_id = \"$storage_id\",
        	inventory_on = \"$inventory_on\",
        	inventory = \"$inventory\"
        	WHERE producer_id = '$producer_id'
        	AND product_id = '$product_id'";
        	$resultu2 = @mysql_query($sqlu2,$connection) or die(mysql_error());
      }
      
  7. Stripslashes in Customer Notes in Admin Area
    shop/admin/query_notes.php

    Find around line 72:
    $notes = $row['customer_notes_to_producer'];

    Replace with:
    $notes = stripslashes($row['customer_notes_to_producer']);

  8. Additional Display clean-up for producer names

  9. shop/members/edit_prdcr_list.php
    Change $business_name to ".stripslashes($business_name)." on line 120

  10. Config Files Update
    Add defined constants (click for details below)
    config_foodweb.php and config_foodweb_orders.php

  11. Product Lists - PDF product list file update
    shop/pdf.php

    Remove all definition lines: define("CONSTANT", "Hello world.");
    Replace with: include('../../config_foodweb.php');

  12. Locations File Update
    shop/locations.php

    Find on line 2:
    include("../../config_connect.php");

    Replace with:
    include('../../config_foodweb.php');

  13. Producer Template
    shop/template_prdcr.php

    Remove line 3: $page_name = $PHP_SELF;

    Find:
    $producer_id = substr($page_name, -9, -4);

    Replace with:
    $producer_id = substr($_SERVER['PHP_SELF'],strrpos($_SERVER['PHP_SELF'],'/')+1,-4);

  14. Spacing update
    shop/members/edit_contact.php

    Find line 21:
    please email<a href

    Replace with:
    please email <a href

___v1.4.2 New Files___

  1. New option to download a spreadsheet of all members or only producers
    Upload new file: shop/admin/report-members.php

    Add a link to it from this file: shop/admin/index.php
    Find around line 72:
    <li><a href="coopproducers.php">Producer Contact Info</a></li>

    Add after that line:
    <br /><br />
    <li> <a href="report-members.php?p=1">Download a Spreadsheet of All Members/Producers</a></li>

  2. Orders Per Hub Report
    Upload new file: shop/admin/orders_perhub.php
    No linking up necessary, link is already in place from admin main menu, file was missing out of previous release.

___v1.4.2 Changed Files Details___

Changed files: