Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

eugeniobonifacio

Pioneers
  • Posts

    22
  • Joined

  • Last visited

Posts posted by eugeniobonifacio

  1. Let's try this. Go to line 157 in specials.php, or find the following line:

     

     if(preg_match("/^(.*)%$/", $discount))
    

     

    and change it to

     

     if(preg_match("/^(.*)(%|p)$/", $discount))
    

     

    now you are able to pass a percentual discount either with percent "%" or "p" character. So you can apply a percentual discount of 10% in the form "10%" or "10p".

     

     

    Let me know.

     

    Eugenio

  2. I checked the script and tested it: I cannot reproduce the error you get. In general the 404 error lets me think that it should be a problem caused by your server settings, for example mod_rewrite, or some page authorization script in your osCommerce. There are scripts that help manage access to admin pages, these could cause this kind of problem.

     

    Next step should be allowing me direct access to your store. Let me know.

     

     

    Eugenio

  3. 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.

     

    scottybwoy was wrong in doing some customization, he misunderstood the meaning of categories_separator configuration param

  4. I am currently using easy csv to import over 3000 products and it works great. But my problem is that i upload all the products into a category called unassigned then put them in there proper categories (why do i do this? because i receive a feed from my supplier which i then change to suit the format for easy csv import).

     

    Now my main problem is once i have move them into their proper categories and i go to update the next day, it deletes the products from there proper category and puts them back into the Unassigned category.

     

    Is there away to tell the script "if the product exists don't update the category (theoretically leaving it in the the correct category) else import to Unassigned".

     

    I've tried leaving the category field blank and it puts it into a blank category.

    I've also tried having 2 of the same producted one in Unassigned and one in its proper category, either duplicate(which then the import doesnt update that one product) or if i link them it deletes the one in the proper category.

     

    Any ideas/help would be much appreciated.

     

    Thanks in advance

     

    I started working on a kind of "smart" updating, this should be useful for your case. Meanwhile, in your csv_import.ini, you should comment out 'categories_id' item inside [categories] section using ';' (semicolon) when updating.

     

    I hope having been useful.

  5. No, you were close.

     

    first of all add this lines to csv_import/csv_import.ini just before [categories] section

     

    [price_break]
    price_break = "x"
    amount = "x"

     

    you must replace 'x' with csv column position (starting from 0)

     

     

    then add the following line in csv_import.php after line 115 (just after the other bindings):

     

    $bindings['price_break'] = $config["price_break"];

     

     

    after line 535 (just after languages insert):

     

    tep_db_query("INSERT INTO products_price_break (products_price, products_qty, products_id ) VALUES('" . $data[$i][$bindings['price_break']['price_break']] . "','" . $data[$i][$bindings['price_break']['amount']] . "' ,'" . $product_id ."')");

     

     

    and, for supporting updates, after line 574 (just after languages update):

     

    tep_db_query("UPDATE products_price_break SET products_price = '" . $data[$i][$bindings['price_break']['price_break']] . "', products_qty = '" . $data[$i][$bindings['price_break']['amount']] . "' WHERE products_id = " . $product_id . "");

     

    I didn't test all this changes, there could be some syntax error, but it shoul do what you want.

    Let me know.

  6. 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

     

    mmm try to remove @ char in the following line:

     

    if($handle = @opendir(CSV_IMPORT_UPLOAD_FOLDER)) {

     

    becomes

     

    if($handle = opendir(CSV_IMPORT_UPLOAD_FOLDER)) {

     

    it should say something more about, i.e. another warning message.

     

    Let me know.

  7. 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?

     

    At first, actually the latest release is v2.0.3.

     

    If the two fields are in PRODUCTS table, then you should add them to config.ini in "products" section:

     

    [products]
    ...
    cost = 12
    availability_id_out_of_stock = 13
    

     

    You must use the same name in db table

     

    About images, yes the script will grab the picture from the specified url then saves it with the name you put so creating a local image.

     

     

    I will take a look at easypopulate as soon as possible, it's not always easy to find some time. Thank you.

     

    Let me know.

  8. I was unable to find out what the 2 HTML buttons do? They are “Empty Catalog” and “Categories Mapping”.

     

    Does “Empty Catalog” really delete all the items in the store? If so, what would be the best way to hide that button because we are only planning to append new items to the existing items. I was afraid to click it.

     

    When I click “Categories Mapping” it just says “page not found”… but it might be because I don’t have a file loaded yet?

     

    You were right, i've forgotten to clear those parts of code. Now I cleared and added a configuration option 'allow_empty_db' to enable/disable empty catalog feature (you can empty products's tables). So you should set it to '0'. Categories mapping was an experiment, not needed anymore.

     

    You can find the updated version v2.0.2 in osCommerce addons page (http://addons.oscommerce.com/info/4920). Let me know if it's ok.

  9. By the way, you may not have seen this post I was having the same problem.

     

    I know this issue, i'm thinking about solving it.

     

     

    Another suggestion would be to allow you to update the products_description table on the fly, like in the easy populate module.

     

    Can you be more clear? I don't know how easy populate works.

     

     

    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.

     

    Sounds strange, in tax_class you can put tax class name (ex 'VAT') or its id, i've tested it and worked. I'll take a look.

  10. 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".

     

    ...

     

    P.S. What will it do with the images if they are located remotely?

     

    First of all i suppose you have a right csv file, actually is comma-separated (,), if you don't know this, you can open your csv file with a notepad and look at the character separating the headers (first row). If it's not comma, you can change it in configuration:

     

    [csv]

    ; fields separator

    delimiter = ","

     

     

    The error you get is due to the mismatch count of the fields in row #5 against the headers count. I'll change this error in more correct : "Row 5: The count of fields is wrong"

     

    Sometimes it is due to empty cells in Excel that aren't written in the exported csv file, so you get a different count along the rows of the file.

     

    This situation can be handled in configuration file:

     

    ; 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

     

     

    try to change the radius value, it's the maximum mismatch tolerance. Outside this value you get a mismatch error.

     

     

    The second question is sbout the images url. You can put an URL inside the image field of your csv file, in this case (supposing you have the CURL PHP library installed, you should) your image will be grabbed and put inside the images folder. The resulting name of this image is the same of the remote one.

     

    Let me know if you solved, and thanks for your persistence.

×
×
  • Create New...