Guest Posted June 14, 2004 Posted June 14, 2004 (edited) Why would this part be messing me up? My best guess would be that your products do not have a default value of zero for products_master - here is the SQL from the file: ALTER TABLE products ADD products_master int(11) NOT NULL default '0'; Perhaps you made the db changes manually and gave them a default of 'null' - this is not the same :) Matti Edited June 14, 2004 by Johnson Quote
pjsingh Posted June 14, 2004 Posted June 14, 2004 okay should i see slave in drop menu. this is what i have in product master----drop menu Select master, none, rose candles. Quote
pjsingh Posted June 14, 2004 Posted June 14, 2004 oh i forgot to tell you that i install Master_Product_v1.15. is this full one? or do i need to install Master_Product_v1.14 first. thank you pj Quote
Guest Posted June 14, 2004 Posted June 14, 2004 okay should i see slave in drop menu. this is what i have in product master----drop menu Select master, none, rose candles. 1.15 is all you need :) The drop menu shows the Masters you have created Matti Quote
pjsingh Posted June 14, 2004 Posted June 14, 2004 but when select the master product it go back to "select master product". should it stay "Rose Candle" selected. what i am doing wrong. please help. are their any doc or step by step doc that i can read. sorry for the pain. thank you pj Quote
pjsingh Posted June 14, 2004 Posted June 14, 2004 it work it work thanks you for you help Mr Ressler. thank you pj Quote
pjsingh Posted June 14, 2004 Posted June 14, 2004 hello How can i change from where customer select number to product from drop menu, to they just enter the number product they want in the box. thanks pj Quote
ryanf Posted June 14, 2004 Posted June 14, 2004 (edited) Richard, another way that you can still have the master products price listed and not have the quantity box appear is to use this code in product_info.php: <?php $master_query2 = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where products_master = ?'" . (int)$HTTP_GET_VARS['products_id'] . " '"); $results2 = tep_db_fetch_array($master_query2); if ($results2['products_id'] == null) { ?> ? ? <tr> ? ? ? ?<td align="right" class="main"> <?php ? ? ? ? ?echo TEXT_QUANTITY . ' ' . tep_draw_pull_down_menu('Qty_ProdId_' . $product_info['products_id'], $qty_array); ? ? ?} ?> ? ? ? ?</td> ? ? ?</tr> ? ?<tr> ? ? ? ? <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> ? ? ?</tr> <?php I use it on my site and it works fine. Put it in where the box gets drawn, right under the url part. It checks to see how many products are slaves to the master, if there are none, it creates the quatity menu, if there are some, then it doesn't. This will allow you to give the master products a price (I use the lowest slave price) and have the price show up in the catalog and also not have the product be buyable. Ryan Edited June 14, 2004 by ryanf Quote If I was crafty, this would be a funny signature.
Guest Posted June 14, 2004 Posted June 14, 2004 Hi folks. Sorry for my longer than expected absense, I've just been buried under with work. Things have calmed down a bit now though. :) I'm working on my Master Product Slave Attribrutes mod now (tidy up code, etc) and will post it as a contrib in the near future (hopefully this week). Regards, Brian. Quote
Guest Posted June 14, 2004 Posted June 14, 2004 (edited) Didn't take as long as I thought. I've submitted the attribute mods as a contrib. Let me know if there are any problems. Regards, Brian. Edited June 14, 2004 by baj3171 Quote
richandzhaoyan Posted June 14, 2004 Posted June 14, 2004 Just a quick thanks to Ryan, Have entered your bit of code alongside Matti's and now all is perfect. Cheers, Richard. Quote Only Dead Fish Go With The Flow......
shagymoe Posted June 14, 2004 Posted June 14, 2004 Apparently this is a great mod if you can get it working. I am not a newbie and I've installed hundreds of contributions but this one has me completely stumped. Here is what I have done. 1) Virgin osCommerce MS2 2.2 installed. 2) Executed Master Products 1.1.5 sql file 3) Overwrote all files with Master Products 1.1.5 files 4) Created a master product. 5) Created several slave products (associated to the master above) 6) Set the following settings: Check stock level => false Subtract stock => false Allow Checkout => true No matter what product I try to buy I always get "Your Shopping Cart is empty!" Supposedly this issue was fixed somewhere in this thread and I found where jado was having the problem, but the fix has eluded me. I thought it was with the stock config settings, but that didn't fix it. Then I thought it had something to do with the master product having a quantity of 1 or 0 and I tried both with no success. I have also messed with the master's price to no avail. The installation.txt file for this contrib does little to explain config settings and such for this contribution so if I've done something wrong how would I know? Are there configuration settings that must be applied? Should the master quantity be 1 or 0? I would really appreciate it if someone could answer these questions or tell me what I am doing wrong. I'm not trying to offend anyone, but when you download a contribution you shouldn't have to read 77 pages of posts to figure out how to make it work. Forgive me if I've missed something obvious and making myself look like an idiot. I'd be willing to submit an updated installation.txt file if the installtion procedure becomes clear. Thanks for the help, Shagy Quote
shagymoe Posted June 14, 2004 Posted June 14, 2004 Ok, so I found a post which seems to have fixed my problem with only a quick test. Here is the fix. In includes/application_top.php REPLACE //Master Products // customer adds multiple products from the master_listing page case 'add_slave' : while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) { if (substr($key,0,11) == "Qty_ProdId_") { $prodId = substr($key,11); $qty = $val; if ($qty <= 0 ) continue; $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId, $HTTP_POST_VARS['id']))+($qty), $HTTP_POST_VARS['id']); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; //Master Products EOF WITH: //Master Products ENDLICH ?BERHOLT!! Ren? Reineke 06.12.03 // customer adds multiple products from the master_listing page case 'add_slave' : foreach ($HTTP_POST_VARS as $keyA => $valueA) { if (substr($keyA,0,11) == "Qty_ProdId_") { $prodId = substr($keyA,11); if ($valueA <= 0 ) continue; $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId, $HTTP_POST_VARS['id']))+($valueA), $HTTP_POST_VARS['id']); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; //Master Products EOF However, even if this proves to be a long term solution for the problem, the question still remains...is this a bug? Should it be changed in the contribution files? The changes in the code are only the process of iterating through the array. The first uses while and the second used foreach but in the end they do the same thing. So the only real difference is the line: $qty = $val; The $qty variable is not found anywhere else in application_top.php so it must be a session variable I think which comes from the shopping_cart.php file being required. I haven't scoured the code to understand why this fixes the problem but it definitely is having an undesirable effect. Can anyone explain this? Shagy Quote
shagymoe Posted June 14, 2004 Posted June 14, 2004 On a side note: I mentioned that I had set the stock configuration settings to: Check stock level => false Subtract stock => false Allow Checkout => true This is not required for the install process and really doesn't make sense if you want the slave products to have the stock subtracted. The only reason I did this was because it seemed to be what someone posted as a fix for the problem. If you want stock subtracted from slaves, the setup is: Check stock level => true Subtract stock => true Allow Checkout => false (if you don't want to allow checkout if stock = 0.) Shagy Quote
pjsingh Posted June 14, 2004 Posted June 14, 2004 hello does anyone know how i can change drop menu to text input box?. thank you Quote
whodah Posted June 14, 2004 Posted June 14, 2004 Didn't take as long as I thought. I've submitted the attribute mods as a contrib. Let me know if there are any problems. Regards, Brian. hello! i'm running: osCommerce 2.2-MS2 w/ master/slave 1.15 it does not appear to work for me? master/slave works, but not the slave attributes. i've got Display Slave Product Options = 8 installed the mod, and here's how it looks: http://cpanel2.betterbox.net/~abbey/produc...roducts_id=2542 i would hav ethought that drop down boxes for attributes would appear on next to or below the slaves? i did notice a few discrepencies during the install... perhaps that is a clue? for instance: step 5: my file is not: catalog/includes/english/master_products.php but instead my file is: catalog/includes/languages/english/master_products.php step 6: my file is not: catalog/includes/application.php but instead my file is: catalog/includes/application_top.php step 7: my configuration_group_id is not 22 but instead is: 16 thx, whodah? Quote
ryanf Posted June 14, 2004 Posted June 14, 2004 you have to add the attributes to the slaves NOT the master product to get it to work with product attributes. Ryan Quote If I was crafty, this would be a funny signature.
whodah Posted June 14, 2004 Posted June 14, 2004 you have to add the attributes to the slaves NOT the master product to get it to work with product attributes. Ryan heya! i've actually got the attributes on the master *and* the slaves. master: http://cpanel2.betterbox.net/~abbey/produc...roducts_id=2542 slave: http://cpanel2.betterbox.net/~abbey/produc...roducts_id=2544 must i remove them from the master no matter what? i'm kinda donkin w/ code on the site atm, so if you see things that look awry, that's why ;) thx Who Dah? Quote
whodah Posted June 14, 2004 Posted June 14, 2004 just to play it safe, i removed attributes from the master, left the slave attributes in place. appears to have no effect. thx! Who Dah? Quote
pjsingh Posted June 14, 2004 Posted June 14, 2004 Another ? how can i add item number to the shopping? Quote
Nocturnaloner Posted June 14, 2004 Posted June 14, 2004 This is an easy one, which is why I can't find it: Where would I change the products_name to a link in the slave box? Which file, that is? I can't seem to find it in product_info.php. Quote
whodah Posted June 14, 2004 Posted June 14, 2004 This is an easy one, which is why I can't find it: Where would I change the products_name to a link in the slave box? Which file, that is? I can't seem to find it in product_info.php. i'm betting that's in includes/modules/master_listing.php i dind't search out that exact filed, but it's where i've changed my price and selection box to a buy now button as in here: http://cpanel2.betterbox.net/~abbey/produc...roducts_id=2542 hth -Who Dah? Quote
Nocturnaloner Posted June 14, 2004 Posted June 14, 2004 This is an easy one, which is why I can't find it: Where would I change the products_name to a link in the slave box? Which file, that is? I can't seem to find it in product_info.php. i'm betting that's in includes/modules/master_listing.php i dind't search out that exact filed, but it's where i've changed my price and selection box to a buy now button as in here: http://cpanel2.betterbox.net/~abbey/produc...roducts_id=2542 hth -Who Dah? You are correct. It's under case MASTER_LIST_NAME, thanks! Quote
Guest Posted June 14, 2004 Posted June 14, 2004 Could someone explain plz, I have installed MasterProducts and Brian attribute contrib to enable attributes ok. I have 1 master setup with 2 slave products and I have now setup attributes for the two slaves, I thought the attributes would be displayed for each slave. Or have I done something wrong? Quote
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.
Note: Your post will require moderator approval before it will be visible.