Jump to content

MatthewRitchie

Members
  • Content count

    167
  • Joined

  • Last visited

Everything posted by MatthewRitchie

  1. Multi-Product Update v1.00 http://www.oscommerce.com/community/contributions,2415 I have put quite a bit of work into reworking this contribution and adding some new features and fixing old ones... However, just after I uploaded it I found a serious bug!!!!! WARNING: when you hit 'update' submit button, field data is eatten up and lost from the database. I will work on it futher but... WARNING use only with a practice/development osc shop copy, one which you dont mind if data is lost! ALWAYS uesfull to have at one side... I have 12+ ;o) Any way, I have left all previous reworked files in the contribution zip numbered from [1] to [15] file [15] is the latest and not quite working file so heed the WARNING above. the other files are in various states of undress so to speak. OH, much horrid junk has been cleared from the previous upload. BOY did it cause serious square eyes and pounding heads... I have also heavilly commented the file and rearranged the 'HOUSE' style to make it easier to read.. many Thanks for now Matthew John Ritchie www.bluegreenenterprises.com --- see demo (no admin access at present otherwise you could see my secret bits) ;o) teehee.
  2. MatthewRitchie

    [contribution] Simple Template System (sts)

    dynamenu extension links from global in appliction_bottom also shows up because stylesheet is not referenced correctly in the template file
  3. MatthewRitchie

    [contribution] Simple Template System (sts)

    You might ask why do all this.... Google (as far as I know) does not like server redirects and I only have one server which several domains share. They are all under my control so I dont mind them sharing. but i do want differnt front pages showing for each domain. Matthew
  4. MatthewRitchie

    [contribution] Simple Template System (sts)

    In addition to my post above: If you want redirects using php for different domain names as well as the different templates then in: www.yourname.com/index.php (the first indexfile to be loaded when all there is in the url is www.yourname.com) above everything put: ##################################################### <?php IF($_SERVER['SERVER_NAME'] == 'www.bluegreenenterprises.com'){ header("Location: http://www.bluegreenenterprises.com/ebusiness_info/index.php"); exit; }elseIF($_SERVER['SERVER_NAME'] == 'www.diywind.co.uk'){ header("Location: http://www.diywind.co.uk/Company/About_Us.php"); exit; } /* $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ ##################################################### NOW YOU HAVE: REDIRECTS TO THE RIGHT FILES &&& A DIFFERENT TEMPLATE FOR EVERY DOMAIN NAME .............................. All I need now is a way to block users from one domain entering pages under the second domain_name url..... any ideas. MatthewJohnRitchie
  5. MatthewRitchie

    [contribution] Simple Template System (sts)

    Finally I have a working solution. If any sts users would like to use diferent templates for different domain names then this is how I have done it: GOTO: [1] --- http://www.bluegreenenterprises.com/OSC_TE...a/rc1_GCOv145a/ [2] --- http://www.bluegreentechnologies.com/OSC_T...a/rc1_GCOv145a/ [1] is the normal default template and [2] is a individual template for the domain www.bluegreentechnologies.com p.s. This only works in my test environment at the above addresses. If you click the logo you are now under the control of a different sts installation. THE CODE: IN STS_TEMPLATE.HTML: <?PHP IF(!($_SERVER['SERVER_NAME'] == 'www.bluegreenenterprises.com')){ include('bgt_template.php'); }else{ include('bge_template.php'); } // end ifelse not bluegreenenterprises.com ?> AND IN THE TWO INCLUDE FILES I HAVE THE NORMAL AND ALTERED TEMPLATE CODE WITH NO ADDITIONS OUTSIDE THE DOCTYPE. Thats it for now.... OH! playing around with the shop index with if statements to load different shop content doesnt work ;o) I have tried it.... to resolve the dynamenu thing you still need to inclued $dm_header, you can ignore any menu items etc if you wish but to avoid the mess at the bottom of the page you need the header. this has the benifit of being able to creat other dynamic menus for other domains.... MatthewJohnRitchie
  6. MatthewRitchie

    [contribution] Simple Template System (sts)

    Hello Jesper I have google analitics and adsense which I would guess is used in the same way as adwords. I simply cut&paste the code for each and put it where i wanted in the sts_template.html file. I put analitics at the very bottom after the closing body and html tags. MatthewJohnRitchie
  7. MatthewRitchie

    [contribution] Simple Template System (sts)

    I solved the problem of the above almost.... sorry, this part was actually not a sts question but is mentioned here because dynamenu instructions are included in the sts_power_pack. I will try to ask the question a little better: How does sts pick up application_bottom.php? sts works by capturing code from a file.php in the shop, and using various classes and functions manipulates the code [chopping of sections before/after a table or form] before sticking it all back together in relation to what the template file is telling sts to do. question: How does sts deal with php includes like the one for application_bottom.php? Does the sts start/stop capture() simply ignore the php untill later or is it processed as it goes along? Actually!!! Thinking aloud here.... What am I trying to achieve? --- a front page that determins which domain name has been used to make the call to the server and outputs an individual style of template for that domain name. What was I trying to do above? --- remove the dynamenu links from the bottom of the screen. Where are the dynamenu links included? --- in application_bottom.php which is associated with the oscommerce style of index.php page. Now there are two ways that this could work... first is to have a query statement in the index file that says use this code[1] for domain[1] or code[2] for domain[2] etc. hence the application_bottom.php include could be allowed in [1] and not [2] thus dynamenu links would not show in [2]. second - sts_template.html, I believe would need a similar domain name identifier statement to provide different templates for each domain.
  8. MatthewRitchie

    [contribution] Simple Template System (sts)

    Hello Bill, Not spoken in any way for a while, but i hope i have a '''little''' but interesting question for you... I have just hit upon a novil idea to use STS as the defining software that could solve a long term wish that I wanted to solve. You may remember that I did the sts external pages templates contribution to bring pages outside of the osc folder within the wings of the template. This was aimed at the overall aim of having several domain names targeted at a single server. Now i dont have a server that allows multiple domain names pointing to individual index files but I do have STS AND THAT IS WHEN THE BRAINWAVE HIT TODAY. May i point your attention to my demo site to illustrate my point: http://www.bluegreenenterprises.com/OSC_TE...v145a/index.php Now look at: http://www.bluegreentechnologies.com/OSC_T...v145a/index.php These are both exactly the same index file and hence (((sts_template.html.php))) for both addresses but a little bit of cheeky coding will allow me to effectively produce a secondary template for another domain name. I hope you see where I am going here... Now as you see from the second link, I get the Dynamenu output from my DynamenuGoneNutsBonkers contribution addition. I believe that this only shows up because includes/application_bottom.php is included after the templae file has been processed by STS. Could you shed a little light on how this works? By the way. cheeky coding is: <?PHP IF(!($_SERVER['SERVER_NAME'] == 'www.bluegreenenterprises.com')){ ECHO 'NOT www.bluegreenenterprises.com BUT SERVER = '.$_SERVER['SERVER_NAME'] .' HENCE WE CAN USE A SEPARATE TEMPLATE FOR DIFFERENT WEBSITES <BR> ONE PROBLEM WITH THAT IS WHAT IS SEEN BELOW. THIS COLUD BE DUE TO OSC APPLICATION_BOTTOM.PHP BEING ADDED LATER VIA THE SIMPLE TEMPLATE SYSYEM'; }else{ ?> --- doctype and rest of template file as you would normall do..... finished of with: <?PHP } // end ifelse not bluegreenenterprises.com ?> obviously Dam my spelling still hasnt improved with a few beers... ;o) teehee
  9. MatthewRitchie

    Multi-Product Update v1.00 Revitalised

    OH, THIS IS PROBABLE THE LAST TIME I WILL BE VISITING THIS TOPIC SO IF YOU HAVE QUESTIONS PM ME OR GOTO MY WEBSITE WHERE I MAY DO A WRITE UP AND SOME INSTRUCTIONS. ALSO THERE IS A DIRECT CONTACT PAGE FOR ME THERE. ENJOY MATTHEWJOHNRITHIE BLUEGREENENTERPRISES
  10. MatthewRitchie

    Multi-Product Update v1.00 Revitalised

    DAM LOST MY LAST POST AND DONT FEEL LIKE TYPING IT OUT AGAIN. new release v1_6 features :- see for yourself individual shipping prices per product code is fully commented out this version will work on you store do not set max search results in config to more that 22/23 that bug still exists and i dont know why fully tested SQL FOR DB IS IN THE FILE AT THE TOP... go get it.......................... http://addons.oscommerce.com/info/2415
  11. MatthewRitchie

    Multi-Product Update v1.00 Revitalised

    I am now fully convinced that (I AM GOING BONKERS) and that the above statement is accurate my assumptions then are that because the updated item is always the 23rd on the list and that items 24 to 27 are left unaffected because the code breaks at item number 23 hence 24 to 27 are not outputed in the echo statements for print_r($products); and , print_r($row); on each loop of the foreach post[event_record] i am still using 50 as my maximun for search results listing this leads me to the possibile conclusion that the functions used to split the page results are causing the iritating quirks above. next attempts will have the split page results removed to see what happens, however for shops with thousands of products this will result in a very long page. WRONG just tried it with split page results and associated items removed but still have item 23 losing its data each time update is hit. I am thinking of giving up at this point and reverting the results listing to only 20 per page and concenterting on why all produtc items are updated with modified date when a column is missing, this shouldnt happen so there is a problem still in the code to chew on. ;o) matthewjohnritchie bluegreenenterprises.com
  12. MatthewRitchie

    Multi-Product Update v1.00 Revitalised

    OK just happened upon a wierd quirk... I currently have my maximum setting for search results at 50 rows per page, i.e. to show all the products on one page. now, if i reduce this to 20 as it was origionally, most of the problems seem to vanish BUT... back at 50 results per page I have noticed that depending on the sorting order, it is predominately the 23rd item in the list that is errased. Oh and new released version i am now at is number [21].
  13. MatthewRitchie

    Multi-Product Update v1.00 Revitalised

    download: http://www.oscommerce.com/community/contributions,2415
  14. MatthewRitchie

    Multi-Product Update v1.00 Revitalised

    Ok - first issue mostly resolved, that was the zeroing of columns that were hidden latest edition in product_updates[19].php, --- there is an echo statement at line 308 [[[echo $sql_do_update . '<BR>' . $query_string_parameters;]]] that throughs up the error: UPDATE products SET products_price = '', products_model = '', products_weight = '', products_quantity = '', products_image = '', products_status = '1', products_ship_price = '', products_last_modified = '2008-12-14 15:11:37' where products_id = '19' action=update&ST=1&ID=7& Warning: Cannot modify header information - headers already sent by (output started at /home/bluegree/public_html/OSC_TEST_GCO_GCODEv145a/rc1_GCOv145a/admin/product_updates[19].php:308) in /home/bluegree/public_html/OSC_TEST_GCO_GCODEv145a/rc1_GCOv145a/admin/includes/functions/general.php on line 22 but by commenting this out you can avoid this error message. zip contains file update from [15] to [19] but only [19] is needed. remaining problem: on first load, and first click of update button without editing any data one product's data is errased, you can actually see this happening in the error above to 'theres something about mary' the quizical point is that it is item id/number 19 towards the bottom of the page, hence I have no idea yet why it is being picked up and changed. secondly - when update button is clicked, the get query string in the url has 'listing=' amended to it. I believe this is due to the sorting arrows code but still the answer is alluding me. I am looking in to the functions tep_get_all_get_params() and tep_href_output() ??? to see if i can use these purposefully to alleviate the get array parameter problems. so for now have a look through [19] and let me know your thoughts here: http://forums.oscommerce.com/index.php?showtopic=323536 Many thanks MatthewJohnRitchie bluegreenenterprises.com
  15. MatthewRitchie

    Multi-Product Update v1.00 Revitalised

    ok partially there... this is a beginning to curing the above problems: the code below needs to be above the doctype and in this order so icon clicks work in the right sequence: ################################################# # # # SHOW/HIDE MULTI_PRODUCT_UPDATE COLUMNS # # # ################################################# // Sets the status of a product function set_mpu_col_status($col_id, $col_status) { if ($col_status == '1') { return tep_db_query("update " . DB_TABLE_MPU . " set mpu_col_status = '1' where mpu_col_id = '" . (int)$col_id . "'"); } elseif ($col_status == '0') { return tep_db_query("update " . DB_TABLE_MPU . " set mpu_col_status = '0' where mpu_col_id = '" . (int)$col_id . "'"); } else { return -1; } } if (isset($_GET['action']) && ($_GET['action'] == 'COL')) { set_mpu_col_status($_GET['ID'], $_GET['ST']); } ################################################# # # # MPU COLUMN STATUS ICON # # # ################################################# function COL_status_icons($id = '', $status = '', $parameters = ''){ if ($status == '1') { echo '<a href="' . tep_href_link(FILENAME_PRODUCT_UPDATES, 'action=COL&ST=0&ID=' . $id .'&'. $parameters, 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', 'Deactivate', 10, 10) . '</a>' . ' '; } else { echo '<a href="' . tep_href_link(FILENAME_PRODUCT_UPDATES, 'action=COL&ST=1&ID=' . $id .'&'. $parameters, 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', 'Activate', 10, 10) . '</a>' . ' '; } } $sql_coloumns = "SELECT * FROM multi_product_update"; $col_result = tep_db_query($sql_coloumns); $show_col = tep_db_fetch_array($col_result); $column_detials = array(); do { $col_id = $show_col['mpu_col_id']; $col_name = $show_col['mpu_col_name']; $col_display_name = $show_col['mpu_col_display_name']; $col_status = $show_col['mpu_col_status']; $column_details[$col_name]['id'] = $col_id; $column_details[$col_name]['name'] = $col_name; $column_details[$col_name]['disname'] = $col_display_name; $column_details[$col_name]['status'] = $col_status; $show_col = tep_db_fetch_array($col_result); }while($show_col); now below in the main page you need: <tr> <td> <?php ?> <br><br> <?PHP foreach($column_details as $key => $value){ echo $column_details[$key]['disname'].' '; COL_status_icons($column_details[$key]['id'], $column_details[$key]['status'], $query_string_parameters); } ?> <br><br> <?php // echo 'COLUMN DETAILS<PRE>'; print_r($column_details); echo '</PRE>'; ?> <?php // echo 'POST <PRE>'; print_r($_POST); echo '</PRE>'; ?> <?php // echo 'GET<PRE>'; print_r($_GET); echo '</PRE>'; ?> </td> </tr> sorry it looks horrid at the moment. the reason for this is to get the column details array above the code that checks for updates then does only the updates needed. why? Ah well this is so that the array details can be used to '''turn off''' certain parts of the updates code so it doesnt try to update any columns that are not actuall present on the screen. lol teehee square eyes and all that melarky...... unfortunately i have not got round to editing the updates code yet --- also there is beginning to be a heck of a lot of repetition in this array checking '''fun''' which could be placed in a function but still that is a little way off. MATTHEWJOHNRITCHIE bluegreenenterprises.com
  16. MatthewRitchie

    Multi-Product Update v1.00 Revitalised

    I have encountered another quizical point assuming you load product updates 15 a fresh (nothing added on to the get query string in address bar, and then start clicking update button: ist updtae click: 19 Fox There's Something About Mary --- all updateable fields are blanked and zeroed. 2008-12-13 15:37:13 get query string === ?page=&search=&listing= 2nd update click: nothing else affected just: 19 Fox There's Something About Mary --- 2008-12-13 15:37:48 (last modified datetime is changed) now this continues with every next click on update however when you arrange the list order products by id 1 - 27 and click update 23 GT Interactive The Wheel Of Time --- 2008-12-13 15:41:13 3rd click updATE 23 GT Interactive The Wheel Of Time --- 2008-12-13 15:41:56 (last modified datetime changes again) this quirk continues, just the one product is updated each time update is clicked, then when a order listing shows in query string a second, third, fourth etc product looses its information. most notably, when the entire list is ordered by the product image, each update click produces the result of removing data from one product each click. a reason for this happening has not yet been ascertained ANY SUGGESTIONS ARE WELCOME HERE! MANY THANKS FOR NOW Matthew John Ritchie www.bluegreenenterprises.com
  17. MatthewRitchie

    Multi-Product Update v1.00 Revitalised

    Right - discovered why product data is being lost: product_updates[15].php when run in admin allows you to show or hide columbs by clicking an icon like you would with the product status. when a particular column is hidden and the update button is hit, when you un-hide that column again all the results are zeroed. i.e. hiding product prices column, click update, unhide prices and they will be zero. I think i know where the problem is: in the code above the doctype there is a check to update only those items,textboxes that have changed. when a column is hidden this code is still looking for that column data, if it is not found then the code assumes that the data is actually zero because the post array contains no update data therefore all the product details are subsequently updated with prices at zero. OUCH!!! when hiding certain columns i have built a new database table such as: CREATE TABLE IF NOT EXISTS `multi_product_update` ( `mpu_col_id` int(5) NOT NULL auto_increment, `mpu_col_name` varchar(15) NOT NULL, `mpu_col_display_name` varchar(30) NOT NULL, `mpu_col_status` tinyint(1) NOT NULL, PRIMARY KEY (`mpu_col_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13; -- -- Dumping data for table `multi_product_update` -- INSERT INTO `multi_product_update` (`mpu_col_id`, `mpu_col_name`, `mpu_col_display_name`, `mpu_col_status`) VALUES (1, 'id', 'ID', 1), (3, 'manuf', 'Manufacturer', 0), (4, 'name', 'Name', 1), (5, 'status', 'Status', 1), (6, 'image', 'Image Path/Filename', 1), (7, 'model', 'Model', 1), (8, 'weight', 'Weight', 1), (9, 'price', 'Price', 1), (10, 'qty', 'Qty', 1), (11, 'idvshp', ' Idv. Product Shiping Price', 1), (12, 'modif', 'Date Last Modified', 0); to hide table elements/columns i do a quick db scan on the above like so: <?php $sql_coloumns = "SELECT * FROM multi_product_update"; $col_result = tep_db_query($sql_coloumns); $column_detials = array(); while ($show_col = tep_db_fetch_array($col_result)) { $col_id = $show_col['mpu_col_id']; $col_name = $show_col['mpu_col_name']; $col_display_name = $show_col['mpu_col_display_name']; $col_status = $show_col['mpu_col_status']; echo $col_display_name . ' '; COL_status_icons($col_id, $col_status, $query_string_parameters); $column_details[$col_name] = $col_status; } ?> this results in the array: COLUMN DETAILS Array ( [id] => 1 [manuf] => 1 [name] => 1 [status] => 1 [image] => 1 [model] => 1 [weight] => 1 [price] => 1 [qty] => 1 [idvshp] => 1 [modif] => 1 ) to hide columns i do: by the way td open / close are: define('TD_OPEN', '<td class="dataTableContent" width=1%>'); define('TD_CLOSE', '</td>'); define('TD_OPEN_H', '<td class="dataTableHeadingContent" align="center" width=1%>'); if( $column_details['id'] == 1){ echo TD_OPEN_H . TABLE_HEADING_PRODUCT_ID . TD_CLOSE; } if( $column_details['manuf'] == 1){ echo TD_OPEN_H . TABLE_HEADING_PMAN . TD_CLOSE; } if( $column_details['name'] == 1){ echo TD_OPEN_H . TABLE_HEADING_PNAME . TD_CLOSE; } if( $column_details['status'] == 1){ echo TD_OPEN_H . TABLE_HEADING_STATUS . TD_CLOSE; } if( $column_details['image'] == 1){ echo TD_OPEN_H . 'Path Image/Filename' . TD_CLOSE; } if( $column_details['model'] == 1){ echo TD_OPEN_H . TABLE_HEADING_PMODEL . TD_CLOSE; } if( $column_details['weight'] == 1){ echo TD_OPEN_H . TABLE_HEADING_PWEIGHT . TD_CLOSE; } if( $column_details['price'] == 1){ echo TD_OPEN_H . TABLE_HEADING_PPRICE . TD_CLOSE; } if( $column_details['qty'] == 1){ echo TD_OPEN_H . TABLE_HEADING_PQTY . TD_CLOSE; } if( $column_details['idvshp'] == 1){ echo TD_OPEN_H . '£ INDVSHP' . TD_CLOSE; } if( $column_details['modif'] == 1){ echo TD_OPEN_H . TABLE_HEADING_PDATE . TD_CLOSE; } now the problem code above dock type is: action = update foreach ($_POST['event_record'] as $id => $row) { // converting date_in_seconds into mysql date $seconds_in_date = date("Y-m-d H:i:s", $date_in_seconds); ############################################ # # # Get all products first to make sure we are # # not updating products that did not change # # # ############################################ $products_query = tep_db_query("SELECT * from " . TABLE_PRODUCTS); $products = array(); while($product = tep_db_fetch_array($products_query)){ $products[$product['products_id']] = array( 'products_id' => $product['products_id'], 'products_price' => number_format($product['products_price'], 2, '.', ''), 'products_weight' => number_format($product['products_weight'], 2, '.', ''), 'products_quantity' => number_format($product['products_quantity'], 0,'.', ''), 'products_model' => $product['products_model'], 'products_image' => $product['products_image'], 'products_status' => $product['products_status'], 'products_ship_price' => $product['products_ship_price'] ); } // END WHILE ################################################### # # # strcasecmp — Binary safe case-insensitive string comparison # # # # str1 - The first string # # str2 - The second string # # # # Returns # # < 0 if str1 is less than str2 # # > 0 if str1 is greater than str2 # # and 0 if they are equal. # # # # NOTE: || = OR # # E.G. if( A != 0 OR B != 0 OR c != 0) then do { UPDATE }. # # # ################################################### if( strcasecmp($products[$row['products_id']]['products_price'] ,$row['products_price']) != 0 || strcasecmp($products[$row['products_id']]['products_model'] ,$row['products_model']) != 0 || strcasecmp($products[$row['products_id']]['products_weight'] ,$row['products_weight']) != 0 || strcasecmp($products[$row['products_id']]['products_quantity'] ,$row['products_quantity']) != 0 || strcasecmp($products[$row['products_id']]['products_image'] ,$row['products_image']) != 0 || strcasecmp($products[$row['products_id']]['products_status'] ,$row['products_status']) != 0 || strcasecmp($products[$row['products_id']]['products_ship_price'] ,$row['products_ship_price']) != 0 ) { ############################################ # # # UPDATE QUERY # # # ############################################ tep_db_query( "UPDATE " . TABLE_PRODUCTS . " SET " . "products_price = '" . $row['products_price'] . "', " . "products_model = '" . $row['products_model'] . "', " . "products_weight = '" . $row['products_weight'] . "', " . "products_quantity = '" . $row['products_quantity'] . "', " . "products_image = '" . $row['products_image'] . "', " . "products_status = '" . $row['products_status'] . "', " . "products_ship_price = '" . $row['products_ship_price'] . "', " . "products_last_modified = '" . $seconds_in_date . "' " . "where " . "products_id = '" . $row['products_id'] . "'" ); // END UPDATE QUERY $products_updated = true; } // END IF strcasecmp $date_in_seconds++; } // END FOREACH POST EVENT RECORD the piece that is of most interest is: if( strcasecmp($products[$row['products_id']]['products_price'] ,$row['products_price']) != 0 || strcasecmp($products[$row['products_id']]['products_model'] ,$row['products_model']) != 0 || strcasecmp($products[$row['products_id']]['products_weight'] ,$row['products_weight']) != 0 || strcasecmp($products[$row['products_id']]['products_quantity'] ,$row['products_quantity']) != 0 || strcasecmp($products[$row['products_id']]['products_image'] ,$row['products_image']) != 0 || strcasecmp($products[$row['products_id']]['products_status'] ,$row['products_status']) != 0 || strcasecmp($products[$row['products_id']]['products_ship_price'] ,$row['products_ship_price']) != 0 ) { and: tep_db_query( "UPDATE " . TABLE_PRODUCTS . " SET " . "products_price = '" . $row['products_price'] . "', " . "products_model = '" . $row['products_model'] . "', " . "products_weight = '" . $row['products_weight'] . "', " . "products_quantity = '" . $row['products_quantity'] . "', " . "products_image = '" . $row['products_image'] . "', " . "products_status = '" . $row['products_status'] . "', " . "products_ship_price = '" . $row['products_ship_price'] . "', " . "products_last_modified = '" . $seconds_in_date . "' " . "where " . "products_id = '" . $row['products_id'] . "'" ); // END UPDATE QUERY because when a column is hidden and update clicked i need to remove that column strcasecmp and update info is it is left unaffected..... any suggestions would be much appreciated, however i will be pondering it for a few hours today.... Matthew John Ritchie www.bluegreenenterprises.com
  18. MatthewRitchie

    Multi-Product Update v1.00 Revitalised

    NOTE: IMAGE included in zip the files in zip are numbered 1 - 15 it is best to upload all to the test site and adjust the address bar url appropriately for each file. as you will see with my method of programming all external data such as the header names as defined in the language folder is within this one file. all files relate back to themselves! no external filename defined pointer needed. Oh you could use something like a link table in admin to help you navigate through each test run please see the '''new links''' file in zip as a demo - write your own... THUS each product_updates[xx].php is compleatly STAND ALONE so it is easy to edit quickly etc the only requirements are for admin includes application top to be correctly referenced so you can have access to functions this will be fine if these files reside in the admin folder.... ;o) matt - going pubbing now -_- -_- -_- zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
  19. MatthewRitchie

    [Contribution] STS v4

    see the demo at: www.bluegreenenterprises.com New OSC Bundle package comming soon: give it a try and let me know what you think... Google Checkout (v1.4.5a). STS v4.5.8. Web Mobile Thumbnails - in POPUP IMAGE. Dynamenu (Gone Nuts Bonkers) - Multiple Flyout Menu System. Extra Admin links to New Add-Ons. Admin - Multi Product Update - Weight, Prices and QTY. Hide Empty Categories (Dynamenu also hides empty Categories). Admin->modules->shipping - Individual Product Shipping Prices. STS Articles
  20. MatthewRitchie

    [contribution] Simple Template System (sts)

    see the demo at: www.bluegreenenterprises.com New OSC Bundle package comming soon: give it a try and let me know what you think... Google Checkout (v1.4.5a). STS v4.5.8. Web Mobile Thumbnails - in POPUP IMAGE. Dynamenu (Gone Nuts Bonkers) - Multiple Flyout Menu System. Extra Admin links to New Add-Ons. Admin - Multi Product Update - Weight, Prices and QTY. Hide Empty Categories (Dynamenu also hides empty Categories). Admin->modules->shipping - Individual Product Shipping Prices. STS Articles
  21. see the demo at: www.bluegreenenterprises.com New OSC Bundle package cmming soon: give it a try and let me know what you think... Google Checkout (v1.4.5a). STS v4.5.8. Web Mobile Thumbnails - in POPUP IMAGE. Dynamenu (Gone Nuts Bonkers) - Multiple Flyout Menu System. Extra Admin links to New Add-Ons. Admin - Multi Product Update - Weight, Prices and QTY. Hide Empty Categories (Dynamenu also hides empty Categories). Admin->modules->shipping - Individual Product Shipping Prices. STS Articles
  22. I tried uploading this several times to the contributions page but there are mysql errors all over the page so here is the topic so far: STS Articles STS Articles is a simple contribution for OSCommerce and the Simple-Template-System that allows you to add, edit and delete articles that are viewed via an info box. Although this is made for STS it is a standalone contribution that should work (with a little tweaking) without STS. It is also Standalone in the sense that very few if any OSC functions are used. All the [functions/object classes/database access] I needed to make this work have been reworked into this contribution. Example Views. The articles can be either sorted by category or by file name and are viewed on screen via an info box as seen below. Articles may associated with several categories and individual pages by file name. To see the different layouts (by category/file name) please see: This file you are now viewing and [bY FILE] Wind_Power.php <LI>[bY CATEGORY] Articles.php Articles by File Name The explanation for 'by file name' is that an article can be directly related to a given file name such as 'About_Us.php' and when visitors navigate to this file only those articles can be viewed. File name articles are accessed in admin exactly the same way as category articles because the file name is stored as a category heading. Because only the file name (including the .php extension) is recognised using the basename() function, no query strings will alter the resulting output. However using the query string will extend the usability of this contribution to providing articles related to say individual products but this feature will only be available in a later update. Public/Private Categories/Articles There is a distinction made between public and admin article categories. In the database table `article_categories` each category has a `status`. If `status` is '1' the category and articles contained within may be viewed by the public. If `status` is '0' the category and articles can only be viewed via admin. This feature can be extended upon to provide greater flexibility. At present the `status` can not be changed via admin/articles.php but can be easily done in PHPMYADMIN. Admin - articles.php The 'admin/articles.php' file is where the articles may be listed by category or are all listed by date of creation. It is a single file that will do all the article admin such as: <LI>Creating, Editing and Deleting Article Categories. <LI>Inserting New Articles. <LI>Editing Existing Articles. <LI>Deleting Articles. Number of Articles per Page (in info box). Number of Page navigation Links. If there are more than four articles associated with a category or file name you will see a page navigation appear at the top of the Articles info box. This is the same page navigation system used by OSC to page through a large list of products as used in 'products_new.php'. The number of articles shown per page can be changed in the file catalog/includes/boxes/articles.php where $max_rows = 4;. This is also where you can edit $max_page_links, i.e. the number of pages available as links in the page navigation. Please find instructions provided in the Articles section at the bottom of the screen. Many Thanks, hope you like it - it has been many months in development/learning php/mysql I think am beginning to get better, but let me know.. :rolleyes: Matthew
  23. MatthewRitchie

    [contribution] Simple Template System (sts)

    need next... sts fix to accomodate the above in popup_image.php.html template when in use.... bill... anyone else any suggestions?
×