Jump to content

scottybwoy

Members
  • Content count

    47
  • Joined

  • Last visited

Everything posted by scottybwoy

  1. scottybwoy

    Easy csv

    Hi, I have set up easy cvs, it looks like it has been installed fine, but I think I cocked up the settings. I now get the error "Row 5: The field count doesn't match". I did not see at the bottom of the .ini file that you could disable the languages, so therefore deleted them from the list of headers. As I went down the .ini file I found the language setting bit and did the same there. I also added in my own custom fields, so I don't really know why this message is showing. I carefully matched up the fields with the order number starting with 0, and the error looks like it is pointing to this as the issue. Anyway, here is my .ini settings so you can show me where I am going wrong. ; ###################### GENERAL SETTINGS ########################################### [settings] debug = 0 csv_upload_folder = "csv/" ; if csv file has different columns count (relative to the first row, i.e. column headers), tries to correct it adding blank fields correct_fields_count = 1 ; max number of fields difference to correct (relative to the first row, i.e. column headers) correct_fields_radius = 3 ; default status of imported products products_default_status = 0 ;if no category has been supplied this is used default_category_id = 0 ; add categories if they not exist auto_add_categories = 1 ; images remote load import_images_urls = 1 ; ###################### CSV SETTINGS ########################################### [csv] ; fields separator delimiter = "," ; if empty uses double quotes, so leave blank if you want this. enclosure = "" ; Important for calculating the columns number columns_headers = "category|model|name_en|quantity|availability_id_out_of_stock|image|cost|pric e|description_en|tax class|manufacturer name" columns_headers_delimiter = "|" ;separator character for the subcategories categories_delimiter = "|" categories_subcat_delimiter = "." categories_language = "" ; ###################### DATA BINDINGS ########################################### ; fields names are bound to their corresponding csv colum number (starting from zero) [products] products_model = 1 products_image = 5 products_price = 7 products_quantity = 3 ; products_weight = 11 products_tax_class_id = 9 [categories] categories_id = 0 [manufacturers] manufacturers_id = 10 ;to add or remove a single language just add or remove the language from below (and in cvs of course) [products_description] products_name = "en:2" products_description = "en:7" Thanks for your help. I look forward to using this contrib. P.S. What will it do with the images if they are located remotely? I have some locally and also some from a link like : http://www.tekdroid.com/image.php?sku=WESSTO249 How would it insert that? So far I have the Get Product Images from Remote Server v1.2 Contrib and edit the Image file name to : get_product_image.php?id=WESSTO249 <-- using example above. And then use : http://www.tekdroid.com/image.php?sku= as the pointing url in that contrib. I think this can be easily integrated, and even set up to use multiple servers. Thanks. scottybwoy
  2. scottybwoy

    Filterlist v1

    New Contrib to OsCommerce! Filterlist v1 has been designed to filter product results within a specific category, great if you have lots of products. Users can filter by price, keywords, the usual manufacturer and also choose how many results they want per page. See this link for an example (if the above link doesn't work, go to www.klickshopping.co.uk and go as deep as you can in any category).
  3. scottybwoy

    Easy csv

    For some reason the functionality of easy csv has changed, and I think it may be due to some server change along with your newest version I'm using php v4.3.11 with csv_import v2.1.3. It seems to create new categories instead of putting them in the ones already there. I can get the first product to work by using static in front of $c_parent_id = 0; on line 245. But then it cocks up all the other categories. I also had to take out both of the foreach($cId as $c_id) { statements and replace $c_id with $c_parent_id in the insert query. Why do you think this is? The original $c_parent_id is not holding the value in the foreach loop. How is the $cId array meant to work? Could there be a problem with the caching in this version of php? Thanks.
  4. scottybwoy

    Filterlist v1

    This contrib is called by the products listing module, installed as standard. So when a page calls the products listing module, this contrib will appear. Unfortunately different pages use different methods to call/sort products. When one of the filter parameters is used it then sends the data to whatever file called the products listing module, so products listing knows how to sort it. I did try changing this to a file that definately knows how to sort it, i.e advanced search, but then customers would only be able to filter through what they have already filtered. i.e. say they chose manufacturer a, they would not be able to see the results for manufacturer b in the same category, in fact if they chose that, they would see no products at all. Also I don't see where the manufacturers list page is on my site, but I assume that is called by index.php which doesn't understand the search parameters, so would just show the home page. If you tell me your site, I can go have a quick look to see where you mean so I can be a bit more helpful. Last line of filterlist.php <?php } ?> Yeah that could f**k up the rest of your script, if you remove one line without the other. Firstly check your db to see if you actually have products_tax_class_id in your products table. It's a bit too much for me to look at at the moment, but it looks like you may need to check any amendments you made to the index.php where I specified in an earlier post. Please note the code I posted cannot be copied and pasted directly to yours as it will be different for each individual site, so I hope you backed yours up. If all else fails just use the original index.php and play around with the filterlist.php Lines 418 - 421 untill you get the right order. Good Luck. P.S that enable/disable contrib shouldn't affect this one.
  5. scottybwoy

    Filterlist v1

    Why, I think I have answered / attempted to answer all questions posed where I have the time. I will be away for the next month and will prob be quite busy when I get back, there have been other members in this community that have alos helped people so I hope that is good enough. I hope you enjoy the contribution
  6. scottybwoy

    Filterlist v1

    First make sure that lines 418 - 421 in filterlist.php correspond to the correct alignment of your column headers, starting at 1 not 0. The default ordering is in fact done via index.php. BACK IT UP FIRST!!! Then look for the lines : if ((!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list))) { for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_PRICE') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by final_price"; break; } } } else { $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1); $sort_order = substr($HTTP_GET_VARS['sort'], 1); $listing_sql .= ' order by '; switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_MODEL': $listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", final_price"; break; case 'PRODUCT_LIST_NAME': $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '') . ", final_price"; break; case 'PRODUCT_LIST_MANUFACTURER': $listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", final_price"; break; case 'PRODUCT_LIST_QUANTITY': $listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", final_price"; break; case 'PRODUCT_LIST_IMAGE': $listing_sql .= "pd.products_name"; break; case 'PRODUCT_LIST_WEIGHT': $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", final_price"; break; case 'PRODUCT_LIST_PRICE': $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : ''); break; } } The default is this bit : $column_list[$i] == 'PRODUCT_LIST_PRICE' Change the CONSTANT to whatever field in the list you want. Then change the end of each $listing_sql line in the switch to the table column name you want it to revert back to. I don't have the date column in mine, but you would just need to add another case clause to the above switch. If you have the date added column you need to use the same handle ('PRODUCT_LIST_DATE' or whatever it is). If you don't have it it may be a bit more difficult as you need to add it to the $define_list array on line 198 in filterlist.php and to the switches on line 218 and 335 and finally to the SORT on line 417. I have not done this myself, and have just had a quick browse, so don't blame me if it all goes tits up. But I hope I pointed you in the right direction and get it to work. If you do get it to work, I'd suggest you add it to the contrib, and edit the instructions to correspond with what you did. Hope you enjoy the contrib.
  7. scottybwoy

    Filterlist v1

    Hmm, yes I have noticed a few people having this problem and I will have to test it on a clean OsCommerce install. The only thing I can think of so far is to edit line 366 in filterlist.php if (($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> And just leave it as ?> Then the delete the very last line. See how you get on with that, also I think this contrib doesn't work with STS, I've not used that before so don't know the difference.
  8. scottybwoy

    Easy csv

    Don't worry I sorted it by adding this code : // descriptions2 decoding $products_descriptions2_codes = explode(',', $descriptions['products_description2']); foreach($products_descriptions2_codes as $v) { list($code, $col) = explode(':', $v); $bindings['products_description'][trim($code)]['products_description2'] = $col; } to decode_bindings method. Cheers for the great contrib
  9. scottybwoy

    Filterlist v1

    As requested, sort by feature is now added. In version 1.1 Enjoy
  10. scottybwoy

    Easy csv

    Hi I have another problem. I am using a contrib that adds a second description field, and am trying to get it to insert it into the database. In the csv_import.ini file I have added : columns_headers = "category|model|name_en|quantity|availability|weight|image|cost|price|descrip tion_en|features_en|tax class|manufacturer name" products_description2 = "en:10" But it doesn't seem to add it to the database. Any ides?
  11. scottybwoy

    Filterlist v1

    Hi, Thanks for working that out. I have not ever used the STS system so have not tested it with it. But now you have pointed some of its features out I may have a look, but not straight away. Yeah it will not work in an InfoBox as it relies on a query that leads up to products_listing.php. In an infobox, that would not be available. Version 1.1 should be out soon with the order by price etc.
  12. scottybwoy

    Add image subdirectories

    I installed it and get the error : Fatal error: Call to undefined function: link_post_variable() in /home/content/z/b/a/zbatson/html/klickshopping.co.uk/bin/categories.php on line 370 Does anyone have this function and know where to put it? It doesn't seem to be installed or available in my OsCommerce framework :(
  13. scottybwoy

    Filterlist v1

    What is the issue you are having with price with Tax? It filters out the price including Tax value. You can sort out by cost by clicking on the Cost title at the top.
  14. scottybwoy

    products per page

    Does anyone know if there is a contribution that can give the user the option of how many products they want to view per page? If not I will try to make one.
  15. scottybwoy

    products per page

    Cheers Jeff, Work's really well. I'm trying to edit it to have a drop down selection and it is working but I'm trying to find the total number of results for a "Select All" option, but I can't seem to find the variable. Any idea? i.e. $page_options = array(array('id' => $hold_max_pages, 'text' => sprintf(SHOWING_RESULTS, $hold_max_pages))); $page_options[] = array('id' => $all, 'text' => sprintf(SHOW_RESULTS, 'All')); $page_options[] = array('id' => 5, 'text' => sprintf(SHOW_RESULTS, 5)); $page_options[] = array('id' => 15, 'text' => sprintf(SHOW_RESULTS, 15)); $page_options[] = array('id' => 25, 'text' => sprintf(SHOW_RESULTS, 25)); $page_options[] = array('id' => 50, 'text' => sprintf(SHOW_RESULTS, 50)); echo tep_hide_session_id(); echo tep_draw_pull_down_menu('max_pages', $page_options, (isset($HTTP_GET_VARS['max_pages']) ? $HTTP_GET_VARS['max_pages'] : ''), 'onchange="this.form.submit()"');
  16. scottybwoy

    Easy csv

    I found the error. In your last package you missed of the closing brace for the while loop. When I encountered this problem I put it in the wrong place, it is now in the correct place. <?php } } } closedir($handle); echo '</table>'; } ?>
  17. scottybwoy

    Easy csv

    By the way, the error occurs on the while (false !== ($file = readdir($handle))) { Line. The peculiar thing is is that it allowed me to upload a file to that directory anyhow. However the following line if($file != '.' && $file != '..') { Ensures that nothing is presented after it has reached it, except for the general disclaimer. It acts this way even if I suppress the Warning error by appending readdir with an @.
  18. scottybwoy

    Easy csv

    No I tried that, still the same message?
  19. scottybwoy

    Easy csv

    Hiya, Since I upgraded, I'm getting this error : Warning: readdir(): 58 is not a valid Directory resource in /home/html/klickshopping.co.uk/admin/csv_import.php on line 722 Echoing out CSV_IMPORT_UPLOAD_FOLDER gives me this : csv_import/csv/ which is correct directory with all the write settings etc. And echoing out $handle = Resource id #58 True to the error. Whats wrong with that resource?
  20. scottybwoy

    Easy csv

    No worries mate, That's great for now. Thanks for all your support so far. So now I take it that you can set up any db table as a header, i.e. [table_name] And link the fields below it to the order in which they are in your headers string? That's, just what I wanted. Thanks again for a great contrib. I understand you have other things to do, we're all the same, if I get the time myself I may look into doing what I said myself. Cheers, scottybwoy
  21. scottybwoy

    Easy csv

    Hi eugeniobonifacio, I now have your contrib working. Well just updated so yet to test. Although I'm still not getting things working as I would like. I have two extra fields that I want to update to, but they don't get imported. As of my .ini file displayed above, I have two fields; 'cost' and 'availability_id_out_of_stock'. How do I get those to be imported? At the mo I have to go in and manually change them. Also with your new upload image code. Do you write : i_would_like_to_call_this_image_this_please.jpg|http://www.url.to?image=name And would that download the picture to your server, as that name, then scrap the remote link? Thanks for the great contrib. If you have not used easypopulate. I would recommend trying it out as they are both similar but have a few different features. I have both running but it would be good to combine the two to make a super contib. easypopulate also has the prospect of combining the Store Feeds Contrib. Just some ideas for anyone wanting to do it. Keep up the good work.
  22. scottybwoy

    Easy csv

    By the way, you may not have seen this post I was having the same problem. I found it in your processing script and changed it and now it works fine. Keep up the good work. Another suggestion would be to allow you to update the products_description table on the fly, like in the easy populate module. Also I fount that the tax_id didn't insert properly, unless you put the actual Tax code in. Easy Populate, allows you to put in "VAT" or whatever. Cheers
  23. scottybwoy

    [CONTRIBUTION] Admin products paging

    Hi I have just installed the new v4 of your contribution and am getting christiansees problem re: MySQL error 1064. Under MySQL 4.1.22-max-log How can it be fixed? Sorry I'm sure its a good contrib, just not used it yet ;) P.S. I only have a few categories / products at the mo (only 5 cats, about 200 products). Could that be a problem, hope I have given enough information.
  24. scottybwoy

    Admin 23 and Total Configuration

    I found out it's ADMIN ACCESS with LEVEL for osCommerce's Administration Tool Version: 1.2 in the README file. However, your SQL statement seemed to work. I reverted back to the original link code and can now access it. Well done! Thanks for your help
  25. Hi, I'm new to this OsCommerce stuff and e-commerce in general. Now I think I've picked most things up, but when I install some modules they just don't seem to work. In this particular case, I have module Admin installed, so I can have password protected area. And now trying to install total configuration, I can seem to get it to work. Following the instructions I added the line : '<a href="' . tep_href_link(FILENAME_TOTAL_CONFIGURATION) . '" class="menuBoxContentLink">' . BOX_TOOLS_TOTAL_CONFIGURATION . '</a><br>' . To admin/includes/boxes/tools.php It shows (cos I defined the Constants elsewhere) But when I click on it says I don't have permission. On closer inspection I saw it was not written the same as the others according to the Admin23 module. So I changed it to : tep_admin_files_boxes(FILENAME_TOTAL_CONFIGURATION, BOX_TOOLS_TOTAL_CONFIGURATION) . But it dissapeared? Now I don't know what to do, any pointers? Thanks in advance.
×