sbizo Posted November 10, 2004 Share Posted November 10, 2004 I'm having this problem also: 1062 - Duplicate entry '1' for key 1 Has someone found the answer to this? Quote Link to comment Share on other sites More sharing options...
giftmaster Posted November 11, 2004 Share Posted November 11, 2004 I'm having this problem also: 1062 - Duplicate entry '1' for key 1 Has someone found the answer to this? <{POST_SNAPBACK}> I'm having the same problem. I'm very weak in sql but I have a friend working on it. As soon as I find out I'll post the solution. Ray Quote Link to comment Share on other sites More sharing options...
sbizo Posted November 11, 2004 Share Posted November 11, 2004 Fixing error "1062 - Duplicate entry '1' for key 1". I changed the column 'customers_group_id' from PRIMARY to INDEX in the table 'product_groups' and it seems to work now. I don't know if this is the correct way or if it causes any other problem though... Quote Link to comment Share on other sites More sharing options...
giftmaster Posted November 11, 2004 Share Posted November 11, 2004 Fixing error "1062 - Duplicate entry '1' for key 1". I changed the column 'customers_group_id' from PRIMARY to INDEX in the table 'product_groups' and it seems to work now. I don't know if this is the correct way or if it causes any other problem though... <{POST_SNAPBACK}> Wow!!! It worked. Thanks, I've been stuck on this for about a week :thumbsup: Quote Link to comment Share on other sites More sharing options...
giftmaster Posted November 11, 2004 Share Posted November 11, 2004 Wow!!! It worked. Thanks, I've been stuck on this for about a week :thumbsup: <{POST_SNAPBACK}> Well I spoke to soon. I had two price groups but now I have one. I have seen some reference to adding more groups to the database, I'll check and let you know what I find Ray Quote Link to comment Share on other sites More sharing options...
Sethman Posted November 11, 2004 Share Posted November 11, 2004 I was working with a new install, so I was able to start all over. I don't get the Duplicate Entry anymore, but I have this error when I am trying to add a customer via the admin: Existing Groups: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /usr/home/jasse/htdocs/catalog/admin/includes/functions/database.php on line 99 This is with the Account Create Via Admin Contrib as well, so if anyone could help I would appreciate it. Oh, also, when I click to insert the customer, I get this error and it does not insert them: Warning: reset(): Passed variable is not an array or object in /usr/home/jasse/htdocs/catalog/admin/includes/classes/object_info.php on line 17 Warning: Variable passed to each() is not an array or object in /usr/home/jasse/htdocs/catalog/admin/includes/classes/object_info.php on line 18 THANKS for any help! Quote Link to comment Share on other sites More sharing options...
Marvin Miller Posted November 16, 2004 Share Posted November 16, 2004 Just an update on my findings with the Separate Pricing Contribution 3.5; Directly installing it overtop of a default Milestone 2 store seems to miss a couple of edits that were included in the instructions - I recommend anyone doing a 'bulk' install on a new version of Milestone 2 should check the instructions to ensure that all the mods are done. I found a few files were not modified. Also, the contribution does not seem to show lower pricing for the reviews box. For instance, when I click on the reviews box it opens up in the main window and shows the non-discounted price. As soon as I add the product to my cart the price then changes to the proper one. Having said that, the author did a great job of making clear instructions as well as clear edits in the included files :thumbsup: Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Marvin Miller Posted November 16, 2004 Share Posted November 16, 2004 PS> I went through everything after... ***STOP HERE*******The rest of this mod is only needed if you want to be able to have different specials for each new group. This means that you can create a special price for your 'Retail' group and only customers in that group will see the special price. Create a special price for your 'Wholesale' group and only customers in that group will see the special price. Special prices will not default.. meaning if there is no special price for 'Wholesale' but there is one for 'Retail' your wholesale customer will NOT BE SHOWN the retail special price. More info: When you add special prices, you will see the prices for each group next to the product title. It a price/group is missing, it is because a special price for that prodcut/group already exists. If the product is missing, it is because there is already a special price for all groups. ******* this section manually and found a TON of changes that weren't done during the copy over a fresh install option. I'd STRONGLY recommend going through the entire manual installation instructions to ensure that all needed modifications are done - they aren't if you just do the recommend install overtop of a stock Milestone 2 installation. Hope this helps :thumbsup: Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Marvin Miller Posted November 16, 2004 Share Posted November 16, 2004 Couple more things.... I've found that the new products box displays the specials price even though the customer is not a part of that group. So a retail customer sees the wholesale special price. When the item is clicked on for purchasing though the price returns to the normal price for the customer so I suspect some code might be missing in that file... The reviews box still shows the higher price when the item inside is clicked on but if you add it to the cart the price changes back to the special price. The other issue I'm seeing is that in the admin section under specials, I can create a special for a certain group but then if I go back to edit it later it doesn't show the previously defined customer group in the drop down box. So I'm really close to having this contribution installed perfectly - I just need to clear up these last issues. If anyone has any ideas or can help finish off the last of it - I'd appreciate it! If we could find the answers to the last of these items we should have a completely perfect contribution :thumbsup: Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Sethman Posted November 16, 2004 Share Posted November 16, 2004 Can you send me all your files that you have? I will help. I would like this to be posted on the contributions page again in perfect condition. Thanks for all your help. email is in my profile Sethman Quote Link to comment Share on other sites More sharing options...
mat123slade Posted November 16, 2004 Share Posted November 16, 2004 Hi, I've been trying to add a field to my product_info.php where information would be given to a specific customer group. Bu I'm not getting very far. For example for wholesalers, I would like to have other information about the product that only they can see... Does anyone here have an idea of how to go about doing this ? Thanx for the help and this great contribution... And while I'm here, any news about version 4.0? Quote Link to comment Share on other sites More sharing options...
Marvin Miller Posted November 16, 2004 Share Posted November 16, 2004 Can you send me all your files that you have? I will help. I would like this to be posted on the contributions page again in perfect condition. Thanks for all your help. email is in my profile Sethman <{POST_SNAPBACK}> Hi Sethman; I was thinking it might be worthwhile for someon to re-package the contribution - this time making sure that all the code inserts were done. I bet there's a pretty good chance the contribution would work right off the bat if this were the case. Right now I'm working on an issue with the new products box (products_new.php). It seems that if I make specials only for certain groups everyone sees the special price! This was supposed to have been addressed by Scott (in the readme file); "Updated by Scott Everson (scott AT everson DOT ws), 08/02/2003 -Added in mod to products_new.php (so correct price displayed in new products list)" I went over products_new.php and checked against the install instructions but all the required mods are there. If I could get that fixed then I think there is only one other minor issue and it would work fine. Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Sethman Posted November 16, 2004 Share Posted November 16, 2004 Yeah... now that you point it out, mine is doing that as well. I will take a look at it and see if I can get it working. I completely agree... a new re-packaged contribution would be very nice. I'll keep you posted on my findings... you do the same Quote Link to comment Share on other sites More sharing options...
Marvin Miller Posted November 17, 2004 Share Posted November 17, 2004 Sethman; I've got a question for you (i'm wondering if you are seeing the same problem). If you go into your store's admin and select Catalog/Specials and edit an existing special - do you see any customer groups in the drop down box? In my case I can make a special and assign it to a group (and it works) but if I go back into the special and edit it - it no longer shows anything in the drop down box for Customer Group. Is your doing the same? Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Sethman Posted November 17, 2004 Share Posted November 17, 2004 Actually... when I click on edit, the whole list of products disappears. I must be missing the "action=edit" code in my page. I'll hunt around for that and try to get that running... I guess I missed something on the install. Quote Link to comment Share on other sites More sharing options...
Marvin Miller Posted November 17, 2004 Share Posted November 17, 2004 I'm giving up on this mod :blink: After extensive work on it I found that it is not quite complete. I've checked every step in the manual install instructions several times and my install is exact. With a perfect install there are some issues left; products_new.php shows sale price to people even if they are not in the sale group that is configured in the admin. The instructions included specifically mention this was fixed in the latest release - it's not so there muct be a coding error there. in order to get the specials page working in the admin you need to add an extra } to one of the lines in the code as per This Post after that, the admin/specials page does work - however after you define a special and then go in to edit it the group it applies to will not be shown in the drop down box - the box will be empty. **Warning** In the instructions file for this mod it says that you can copy the files and directly over a virgin install of Milestone 2 and have a correctly working contribution - it won't. The only way to get this contribution to the 99% working level is to manually follow every step in the directions. This is because the files included with the contribution have not all been edited according to the instructions included. If you manually install it according to the instructions you will only be left with the unresolved issues listed above. As far as I can see, if someone fluent in PHP went in and fixed those two errors the mod would work perfectly. All it would need is to be properly re-packaged with all the edits in all the files and then people could use it easily over a stock install of Milestone 2. Unfortunately, I don't have the skills required to do it. I posted this so that everyone interested in this contribution would benefit from someone who installed it properly. It's not quite complete, but if someone is interested in fixing those two errors then it would be perfect :thumbsup: Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Sethman Posted November 18, 2004 Share Posted November 18, 2004 Thanks for the update MM Howerver, since I have this mod installed on my store, I will want it working perfectly, so I will continue to work on it. I'm not fluent in PHP by any stretch of the imagination, so I will be fumbling through it for a little while. P.S. The best thing to do is to re-submit YOUR version of the contrib with all your changes. That way other people won't have to search through the posts to make the admin/specials work like I would have had to. Thanks. Quote Link to comment Share on other sites More sharing options...
Marvin Miller Posted November 18, 2004 Share Posted November 18, 2004 I thought of that, but it would still be flawed with the 2 errors listed above. On the other hand, it would be way more complete - 99% done. But, it would still anger people because it still doesn't work quite right. I tried contacting the author through PM and email but no response so my guess is that he is not supporting this contribution anymore. The only way I can see it being completed is if a good PHP coder comes in and want to complete the last little bit. If you do get those two issues straightened out I'd be more inclined to update the contrib so that it's 100% complete. :thumbsup: Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Sethman Posted November 18, 2004 Share Posted November 18, 2004 Actually, I just realized something... The only thing that doesn't work is the products_new.php display. The reason there is no drop down menu when you click to edit an item, is because you are ONLY editing it FOR THAT CERTAIN PRICE GROUP! If you click on "New Product" then the SAME product is still there to be modified for a special price for the other price groups... make sense? So the only thing that doesn't work is that one display thing!! I'll get working on that, and let's get it figured out. :D :thumbsup: Quote Link to comment Share on other sites More sharing options...
Marvin Miller Posted November 18, 2004 Share Posted November 18, 2004 That does make sense - you are right, we are already editing a know special so there would be no need to have the drop down box unless you wanted to changed an existing special to another group. I just spent a lot of time removing the contribution to return my store to it's previous state so it will be a while before I'm ready to re-implement the contribution. I don't discount it though - it sounds like if the products_new.php gets fixed then it will be OK to be re-packaged :thumbsup: Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Sethman Posted November 18, 2004 Share Posted November 18, 2004 You're not going to help me? :'( :'( Quote Link to comment Share on other sites More sharing options...
Marvin Miller Posted November 18, 2004 Share Posted November 18, 2004 I don't mean to bail on you Sethman - I've just spent too much time on this mod. I was supposed to be doing other work starting Monday so I'm now 3 days behind >_< Besides, my PHP knowledge is zero. It seems to be that the issue is in the code inserted into products_new/php Because it's limited to only that file I would think that anyone here who knows some PHP could fix it. Why not ask others if they can debug that one piece of code in that page? Someone should be able to do it easily. Basically it should check to see if the person logged in is in a defined group, and if so, then display the special price. If the person is not logged in or does not belong to a group then it should display the regular price. At least that's how I think it shoud work. I know you've been wanting to see this mod work for a long time - take heart, you're really close now (99.9% of the way there!) Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Sethman Posted November 18, 2004 Share Posted November 18, 2004 hahaha, don't worry, I'll get it working and post here when I do. Thanks for the help! :thumbsup: Quote Link to comment Share on other sites More sharing options...
sergiorocha Posted November 29, 2004 Share Posted November 29, 2004 hahaha, don't worry, I'll get it working and post here when I do. Thanks for the help! :thumbsup: <{POST_SNAPBACK}> Hello Everyone, I found a problem in my installation and i think that is comum to a lot of people. I stop in duplicated key problem ? I spend a half day reading the posts and looking for code, and I found a big problem. I tried to resolve the problem in the products_groups table, and I tried everything :'( , then I found that the admin area works NOT with a table call product_groups, but with a table call: table_product_groups. :blush: After that, I resolve the duplicate key problem, removing the primary key on the table call: table_products_grupos. Then I test the catalog, and the different prices not show in the way a put in admin, then I look to the code and found that the catalog uses the table call: products_groups. :blink: Resuming in the admin the prices are writed in the table call: table_products_groups, and the catalog read from a table call: products_groups. :o I hope that someone understood me, and if I help someone I will be very happy. S?rgio Rocha :thumbsup: Quote Link to comment Share on other sites More sharing options...
sergiorocha Posted November 29, 2004 Share Posted November 29, 2004 One more thing. To resolve the table problem on the table products_groups remove the primary key. Then to put the admin and catalog area using the same table on admin/categories.php seach and replace table_products_groups for products_groups. Sergio Rocha 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.
Note: Your post will require moderator approval before it will be visible.