Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

reliablesol

Members
  • Content count

    15
  • Joined

  • Last visited

Profile Information

  1. reliablesol

    Master Products - MS2

    Well done on the integration. Yes Master Products is a bit complex to get going. It is one of the best contributions for osCommerce, and totally helped me with a project we are just completing. For doing these addons, I have found a program that is really helpful, is WinMerge if you are on a Windows PC. It opens two files (your existing admin/categories.php and the contribution's admin/categories.php for example) side by side and highlights the differences in them. You can then decide which elements of the contribution you want to push across to your original file. If you are on a Linux machine I think there is a program called 'Diff' . I am not sure if it is as user friendly. I didn't have the problem with Master Products but I did when incorporating Separate Price per customer into a systems that already had Master Products and Quantity Price breaks and Easypopulate. Winmerge helped me keep my sanity.
  2. reliablesol

    Master Products - MS2

    Yeah life is like that :blink: Duplicated entries can only mean one of two things. a ) there are additional rows of data in the database that doesn't belong, or b ) the correct data from the database is being read more than once. If it is b ) then there is a script error to rectified. If it is a ) then you can often get away with just a database edit of the data.
  3. reliablesol

    Master Products - MS2

    Those items should not be in the config screen 4 times. Each item should only list once. Something is causeing a loop in the script.
  4. reliablesol

    Master Products - MS2

    Not sure how you would do that. What I have done for mine is that the master product shows a description and lists all of its slaves in the table below. There are no links for slaves, only the buy_now box which has been changed from a drop down to an edit box for the ordered quantity. The purchaser can then add values to as many of the slaves as necessary and then click the one order button at the bottom of the page. IF they do a search for the model number of a slave, I have modified the script to return the product_info of its master product so that at any time it is only possible to see the master and its table of slave products. This would not work well for products that need lots of description or images for each of the slaves, but for my client (a hardware wholesaler) it is quite effective.
  5. reliablesol

    Master Products - MS2

    Yes, I have tested it and it works great. I am about half way through importing an 1800 product catalog that has 182 master products. I have used the straight import function as well as the split file import and export functions and all works perfectly. Kerry.
  6. reliablesol

    Master Products - MS2

    OK, I have found away around the master/slave create problem with easypopulate. My post above describes the problem "the invisible products_id". What I want is to be able to set the products_id from the easypopulate file so that I know what it is and can use the master ones in the slave rows for the products_master_id column. My Solution. Modify easypopulate.php to export and import products_id. If products_id is omitted in the import file then use the mysql autoincrement value. One little gotch to watch for is if the first field in an easypopulate import file is empty all the other fields are shifted left. To overcome this, I drop the products_id field in second after the products_model field. This doesn't cause any problem because the script reads these fields into variables and then uses the variable in the right order for the database inserts. In the code below my line numbers will vary somewhat from yours because I am using quantity price breaks plus my own added attribute fields in the products table. So if you substract 10-20 lines cumulatively for each modificaton before my quoted lines you should get close to the place for the modification. At line 210 after 'v_categories_id', insert a new line with; 'v_products_id', At lines 917, 1064, 1110 and 1237 insert after 'v_products_model' => $iii++, a new line with; 'v_products_id' => $iii++, At line 1757 modify; $sql = "SHOW TABLE STATUS LIKE '".TABLE_PRODUCTS."'"; $result = tep_db_query($sql); $row = tep_db_fetch_array($result); $max_product_id = $row['Auto_increment']; if (!is_numeric($max_product_id) ){ $max_product_id=1; } $v_products_id = $max_product_id; with the if block wrapper below; //now we check if the product_id has been set in the uploaded file if ($v_products_id == "") { $sql = "SHOW TABLE STATUS LIKE '".TABLE_PRODUCTS."'"; $result = tep_db_query($sql); $row = tep_db_fetch_array($result); $max_product_id = $row['Auto_increment']; if (!is_numeric($max_product_id) ){ $max_product_id=1; } $v_products_id = $max_product_id; } At line 1770 modify the INSERT statement from; $query = "INSERT INTO ".TABLE_PRODUCTS." ( products_image, to; $query = "INSERT INTO ".TABLE_PRODUCTS." ( products_id, products_image, Finally at line 1799 modiy; VALUES ( '$v_products_image',"; to; VALUES ( '$v_products_id', '$v_products_image',"; Now you can control your products_id's while using easypopulate!!! :D Kerry.
  7. reliablesol

    Master Products - MS2

    I have a question about using Master/Slave with EasyPopulate. In the EP.txt file there are fields from the Product table, but not the Product_id field since it is an autoincrement field. With everything based on the product_model. Now with master/slave in the products_master field you have either a 0 if it is a master, or the product_id of the master if it is a slave. My question is how do you know what the master product_id is going to be, so that you can put it in the products_master field? Kerry.
×