JakobHK Posted January 17, 2003 Share Posted January 17, 2003 Hi Chris This mod is great. Good work :wink: I am already planning on extending the mod, so product family can be selected from a dropdown-list in the admin Best regards Jakob Quote Best regards Jakob Høy Biegel ----------------------------------- Shopeon.com - Automate your webshop Link to comment Share on other sites More sharing options...
blueline Posted January 17, 2003 Author Share Posted January 17, 2003 Hey Jakob, Just out of curiosity...why would you do that? Right now, if you assign no values, then the mod doesn't show up. If you do assign products a "family" value, then the mod works for those products only. Glad you like it, -Chris Quote Chris Sullivan Link to comment Share on other sites More sharing options...
blueline Posted January 17, 2003 Author Share Posted January 17, 2003 One thing that I would like to point out is that, for now, those who want to control the amount of products that show up, Replace: $my_query = tep_db_query("select products_family, products_id, products_image from " . TABLE_PRODUCTS . " where products_id != '" . $currentid . "' and products_family = '" . $thisquery['products_family'] . "'"); With: $my_query = tep_db_query("select products_family, products_id, products_image from " . TABLE_PRODUCTS . " where products_id != '" . $currentid . "' and products_family = '" . $thisquery['products_family'] . "' limit " . MAX_DISPLAY_ALSO_PURCHASED); This is a quick fix. It allows you to control the quantity by the Max values control in admin under the configuration tab. This works off of the "ALSO PURCHASED" max values. Hope this helps, -Chris P.S. I will be releasing a new family_products.php file soon. Couple of fixes and so on......anything that anyone would like to see in addition to what is currently available? Bring it to my attention and you may see it in the next release. Quote Chris Sullivan Link to comment Share on other sites More sharing options...
JakobHK Posted January 17, 2003 Share Posted January 17, 2003 Having a dropdown-box in the admin, showing the family-names I am using, makes it easy to find the appropiate product-family, when adding new products. Of course I also need somewhere to maintain the family-names. Best regards Jakob Quote Best regards Jakob Høy Biegel ----------------------------------- Shopeon.com - Automate your webshop Link to comment Share on other sites More sharing options...
blueline Posted January 17, 2003 Author Share Posted January 17, 2003 Oh, ok. Well, the family names are in the database, in the products table, unders products_family. Right now it has a char value of 12 characters. If you want to extend that you can. Very simple. Does it do what you were hoping for? -Chris Quote Chris Sullivan Link to comment Share on other sites More sharing options...
Guest Posted January 17, 2003 Share Posted January 17, 2003 Hey. That's doable, and a good idea, but I don't know that a lot of people would get much use out of it. See, in a situation like that, you have to provide a 1product - to - 1product relationship. Even after the mod is built, it would take the shopowner LOTS of time to go in and set all of those relationships. This is purely my thinking on the topc. If someone has a better way of doing this, please share. -Chris It would be easy if you set it up while setting up individual products. Maybe all you need is a "Compliment" field in the product table. Quote Link to comment Share on other sites More sharing options...
blueline Posted January 17, 2003 Author Share Posted January 17, 2003 Wayne- True. If you set it up when doing data entry it would be fine. But for those who already have hundreds of products, that would be a time-issue. -Chris Quote Chris Sullivan Link to comment Share on other sites More sharing options...
JakobHK Posted January 17, 2003 Share Posted January 17, 2003 It looks good. I just did the modification right away. Change db-field from products_family to products_family_id Make a new table products_family with 2 fields, family_id and family_title And then use this table when looking up the family names for the dropdown-box (just like the other dropdown-boxes on this page). Jakob Quote Best regards Jakob Høy Biegel ----------------------------------- Shopeon.com - Automate your webshop Link to comment Share on other sites More sharing options...
blueline Posted January 17, 2003 Author Share Posted January 17, 2003 Jakob, please post a link so that I can see this in action. Thanks, -Chris Quote Chris Sullivan Link to comment Share on other sites More sharing options...
JakobHK Posted January 17, 2003 Share Posted January 17, 2003 Chris Try this link for our development-server: http://80.198.39.233/admin/index.php?language=en The family-table is still maintained directly with phpMyAdmin If you want, I can send you the required changes... Jakob Quote Best regards Jakob Høy Biegel ----------------------------------- Shopeon.com - Automate your webshop Link to comment Share on other sites More sharing options...
blueline Posted January 17, 2003 Author Share Posted January 17, 2003 Nice Jakob. Have you put together an admin function to control the names? For all of those who want to see a screenshot: I like it. -Chris P.S. Jakob, hold onto the changes for a little bit. I am doing a lot of cleanup work right now...but I may use that in the next version. Quote Chris Sullivan Link to comment Share on other sites More sharing options...
Guest Posted January 17, 2003 Share Posted January 17, 2003 Wayne-True. If you set it up when doing data entry it would be fine. But for those who already have hundreds of products, that would be a time-issue. -Chris It is always a time issue and it would come down to profits versus time spent. If you don't get a rate of return consummate with the time you put in, then you cannot continue to offer them. But in a real world shop there is always time involved either in adding and removing products, changing prices, updating subscriptions and what-not. If you cannot handle this time investment to get what you want, you need to look at your options which include hiring someone to do this for you or scaling back your offerings so that you can manage them and support your customers. Quote Link to comment Share on other sites More sharing options...
blueline Posted January 18, 2003 Author Share Posted January 18, 2003 Wayne, I agree with you 110%. -Chris Quote Chris Sullivan Link to comment Share on other sites More sharing options...
JakobHK Posted January 18, 2003 Share Posted January 18, 2003 Wayne - I agree, good input in this discussion... Chris - I don't know a simple way to implement an product-family-names admin interface. In my case it is a one-time task, and using phpMyAdmin is by far the quickest way to define the produt-family-names. If people requests this admin-feature, I can try to look into it. :) Jakob Quote Best regards Jakob Høy Biegel ----------------------------------- Shopeon.com - Automate your webshop Link to comment Share on other sites More sharing options...
elari Posted January 18, 2003 Share Posted January 18, 2003 if you need, i can write a family_status admin side.... (it's 90% the same for customers_status 1.x) to define new / edit / delete family name for each used language why not add a short description ? that should be reported in catalog ? Quote Link to comment Share on other sites More sharing options...
blueline Posted January 19, 2003 Author Share Posted January 19, 2003 Guys, This is what I like. I ask for input, and I get it. If you all will be patient for just a few days I will incorporate all of this into a new release. I agree that there should be some admin control over the different "families". I have also had a request for showing the "Customers also purchased" box on products that do not hold a "family" value. This will be controlled (turned on and off) in admin as well. Keep the ideas comin, -Chris Quote Chris Sullivan Link to comment Share on other sites More sharing options...
badjuju Posted January 19, 2003 Share Posted January 19, 2003 Has anyone seen this before? I'm using the new family_products.php file. One thing I noticed is I the sql file had errors so I entered it manually. Any ideas? Here's the block of code from /home/moda/public_html/store/catalog/product_info.php: <?php // This is used with the Family Productions contribution. include(DIR_WS_MODULES . FILENAME_FAMILY_PRODUCTS); } ?> Thanks. Warning: Failed opening 'includes/modules/FILENAME_FAMILY_PRODUCTS' for inclusion (include_path='') in /home/moda/public_html/store/catalog/product_info.php on line 178 Quote Link to comment Share on other sites More sharing options...
rseigel Posted January 19, 2003 Share Posted January 19, 2003 You haven't defined FILENAME_FAMILY_PRODUCTS in application_top.php by the looks of it. :wink: Quote Link to comment Share on other sites More sharing options...
badjuju Posted January 19, 2003 Share Posted January 19, 2003 This is the block of code from the original file: <?php if ( (USE_CACHE == 'true') && !SID) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } } ?> The new file does not have this. Quote Link to comment Share on other sites More sharing options...
badjuju Posted January 19, 2003 Share Posted January 19, 2003 The other problem I had is when I go to Admin - Catalog - Products and I select an item, I get this SQL error. I'm new to php and mysql. Please help. Thanks 1054 - Unknown column 'p.products_family' in 'field list' select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id, p.products_family from products p, products_description pd where p.products_id = '12' and p.products_id = pd.products_id and pd.language_id = '1' Quote Link to comment Share on other sites More sharing options...
rseigel Posted January 19, 2003 Share Posted January 19, 2003 Doesn't this mod come with instructions? (I haven't even looked at it to be honest). You haven't defined FILENAME_FAMILY_PRODUCTS in application_top.php and you haven't added the necessary field to the database. Look at the doc that came with the mod. It must tell you how to install it correctly. Quote Link to comment Share on other sites More sharing options...
badjuju Posted January 19, 2003 Share Posted January 19, 2003 Hmm...I'm probably breaking this but this is what I've done so far. The sql text reads: ALTER TABLE PRODUCTS ADD family_products CHAR(12); From the error message, I deleted family_products and changed it to products_family. Now, back to the problem is the products into file Quote Link to comment Share on other sites More sharing options...
badjuju Posted January 19, 2003 Share Posted January 19, 2003 Like I said, I added the field to the database using the sql script provided. The mod comes with instructions and that's what I'm using. But as someone in an earlier post stated, there are errors in the install file and he needed to tweak it. Nice is you have some experience with sql or php, but not for newbies. There's nothing in the install file that mentions application_top.php. Quote Link to comment Share on other sites More sharing options...
rubygirl Posted January 19, 2003 Share Posted January 19, 2003 actually the install doc simply states "replace" - so for those of us who have added previous modules - that doesn't cut it I too have the same error in the admin area: 1054 - Unknown column 'p.products_family' in 'field list' select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id, p.products_family from products p, products_description pd where p.products_id = '28' and p.products_id = pd.products_id and pd.language_id = '1' I have added the table to the database, and although there is no mention of the application_top.php in the file, I did add the defines in both the catalog and the admin files anyone else have any solutions? Quote Link to comment Share on other sites More sharing options...
rubygirl Posted January 19, 2003 Share Posted January 19, 2003 correct - the database file did list the table as family_products instead of products_family that fixed and it seems to be working in the admin area - so the no brainer question is where do i add my "families"? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.