jond Posted December 4, 2004 Posted December 4, 2004 Any updates on a final fix for the products new page? If so, a fresh contibution would be great. Separate pricing for retail/wholesale is huge and should be a working part of oscommerce...plus its 99% complete! Quote
Sethman Posted December 4, 2004 Posted December 4, 2004 I will get this fixed and repackaged. I have been extremely busy lately and haven't been able to get to it. What Sergio was saying should work. The tables need to be named 'products_groups' and not 'table_products_groups' - the same thing in admin and catalog. Also, you need to remove the primary key in the table called 'products_groups' As soon as I do this, I will repackaged and upload to the contrib section. It will be a few days because I'm still very busy, but I will get to it. :D Quote
jond Posted December 6, 2004 Posted December 6, 2004 Sethman, Thank you very much for your efforts on this. Im looking forward to integrating this mod. I have just one question - Will the updated contribution include all the fixes, like adding the '}' in the specials.php file, etc. Basically, will the install instructions be completely rewritten? Thanks! Quote
Sethman Posted December 7, 2004 Posted December 7, 2004 Yes. I will make sure that the contrib will work perfectly before posting it here. I will update the instructions to make it an easy process. Hopefully I can get to it soon, as I am using it on a live shop as we speak. But there are other issues that I am dealing with on this same store that are taking priority at the moment. I will get to it as soon as I can. :D Quote
khaaliq Posted December 8, 2004 Posted December 8, 2004 I am getting this error in admin when I try to add a wholesale price to a product 1062 - Duplicate entry '27' for key 1 insert into products_groups (products_id, products_price, customers_group_id, customers_group_price) values ('27', '499.9900', '2', 'r') [TEP STOP] I also have to wholesale fields at the bottom of the product screen in admin. Ca n someone tell me how I can fix this? Quote
Sethman Posted December 8, 2004 Posted December 8, 2004 Khalliq just read the forum for a few pages back, you should find the answer Quote
Marvin Miller Posted December 8, 2004 Posted December 8, 2004 Did anyone ever find the answer to the products_new.php issue? I think it was the only issue left? Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4
Sethman Posted December 8, 2004 Posted December 8, 2004 hey marvin, I will be getting to it soon... I was looking at it before when we were chatting and I think I have narrowed it down, I just haven't had the time to finish... but I am determined to. I will make sure that I post on here when I repackage it. Quote
khaaliq Posted December 8, 2004 Posted December 8, 2004 Khalliq just read the forum for a few pages back, you should find the answer <{POST_SNAPBACK}> Hey Sethman, If you were referring to this post 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... I tried this and it did not work. Could it be because my errors are different? My error is below. 1062 - Duplicate entry '27' for key 1insert into products_groups (products_id, products_price, customers_group_id, customers_group_price) values ('27', '499.9900', '2', 'r') [TEP STOP] Quote
surfking Posted December 8, 2004 Posted December 8, 2004 (edited) I want to use different HTML disclaimers during checkout for different customers. For example, I have 2 different customer pricing - dealer and retail. I want to have special html comments for dealers, and then special html comments for retail. I am guessing this is a simple in/then PHP query, however I know nothing about php. How would I go about doing this. For example on my checkout_payment page I have the following notice, but I only want retail to see it "Retail Customers Notice - We can only ship to the credit card billing address " Edited December 8, 2004 by surfking Quote
Babysweet Posted December 9, 2004 Posted December 9, 2004 Hey Sethman, If you were referring to this post I tried this and it did not work. Could it be because my errors are different? My error is below. <{POST_SNAPBACK}> if you go back to the contributions page where you got the separate pricing per customer, it has directions on what you should do to fix that error. it works. Quote Sincerely, Joseph Seabert
Babysweet Posted December 9, 2004 Posted December 9, 2004 I need to add 10 pricing groups, How do I add this. please don't tell me I have to configure the entire install for this. I have done a key word search on this question, found one person asking this, but there has not been a reply. boogie boogie boo :P ( o )( o ) Quote Sincerely, Joseph Seabert
khaaliq Posted December 9, 2004 Posted December 9, 2004 if you go back to the contributions page where you got the separate pricing per customer, it has directions on what you should do to fix that error. it works. <{POST_SNAPBACK}> Babysweet, I did this too. If you are getting a duplicate key entry, go into your database and open the "products_groups" table and make the "products_id" the primary key. That will fix your problem. No file attached. Emmanuel Maybe I am not doing this correctly. This is what I did. In phpmyadmin I clicked on the "properties" link in the "products_groups" table. I then clicked on the "primary" link in the "products_id" field. After that I went to admin and added the wholesale price to a product and I got this error; 1062 - Duplicate entry '21' for key 1 insert into products_groups (products_id, products_price, customers_group_id, customers_group_price) values ('21', '79.9900', '2', 'r') [TEP STOP] Did I do this right? Quote
Sethman Posted December 9, 2004 Posted December 9, 2004 it must not be making the products_groups the primary key. That is the only thing that has been causing that error. Try to do it again, and if it doesn't work, contact your host and ask them about it. What version of phpmyadmin are you using? Quote
sergiorocha Posted December 10, 2004 Posted December 10, 2004 Babysweet,I did this too. Maybe I am not doing this correctly. This is what I did. In phpmyadmin I clicked on the "properties" link in the "products_groups" table. I then clicked on the "primary" link in the "products_id" field. After that I went to admin and added the wholesale price to a product and I got this error; Did I do this right? <{POST_SNAPBACK}> Khaaliq, Take a look in my post in a few pages before. I talk about a duplicate table and about admin and frontend uses a diferent tables, the admin use a table call table_product_groups and the catalog uses a table call product_group. You need seach and replace (on admin) where is writed table_products_groups for products_groups. Then remove the primary key from products_groups Quote
khaaliq Posted December 10, 2004 Posted December 10, 2004 Khaaliq, Take a look in my post in a few pages before. I talk about a duplicate table and about admin and frontend uses a diferent tables, the admin use a table call table_product_groups and the catalog uses a table call product_group. You need seach and replace (on admin) where is writed table_products_groups for products_groups. Then remove the primary key from products_groups <{POST_SNAPBACK}> Sergio, I replaced in admin/categories table_products_groups with products_groups. I removed the primary key from products_groups and I get this error; 1146 - Table 'khaaliq_puresoap.PRODUCTS_GROUPS' doesn't exist select customers_group_id, customers_group_price from PRODUCTS_GROUPS where products_id = '26' and customers_group_id = '1' order by customers_group_id [TEP STOP] When I put categories back the way that I had it I get not errors but the prices that I added the wholesale prices to are all 0.00. Quote
Babysweet Posted December 10, 2004 Posted December 10, 2004 Grasshopper, one thing, you do the primary key change in MySql, you must remove the old primary key, then make the new primary key. wow what I just typed is vague. it just sounds like to me that you are not doing this in the right place. the MySql is the database, its separate from PHP aspect. let me see if I can be clearer. you go into your mysql database administration, get into the structure of your database, find the correct table. then you want to edit that table, the primary key is indicated by an underline of the name of the field. Below the fields is where you can edit the primary key, what you want to do is drop the primary key, then go back up to the fields and assign the proper field as primary. Do this and you will be allowed to attempt to snatch the rock from my hand. Boogie boo boo :-" ( y ) Quote Sincerely, Joseph Seabert
Babysweet Posted December 10, 2004 Posted December 10, 2004 So, may I take from the absence of any reply that there is no way to add more groups. I really don't wish to rewrite the code. hmmmmmm poopy assistance requested. you might ask, why would I need 10 groups. well honestly I don't know, I am doing this for a "friend" and that is what they want. Friends suck Boogie boo boo ( o )( o ) ( y ) Quote Sincerely, Joseph Seabert
Sethman Posted December 10, 2004 Posted December 10, 2004 why can't you just add 10 price groups? I think the bad thing right now is that you need at least one customer at each price level to keep the price level. So I think you might have to add 10 "fake" customers at each level. Does it just not let you add that many? Quote
Babysweet Posted December 12, 2004 Posted December 12, 2004 why can't you just add 10 price groups? I think the bad thing right now is that you need at least one customer at each price level to keep the price level. So I think you might have to add 10 "fake" customers at each level. Does it just not let you add that many? <{POST_SNAPBACK}> There is the question, how do I add the price groups in the first place Quote Sincerely, Joseph Seabert
Sethman Posted December 12, 2004 Posted December 12, 2004 (edited) ah... I see. You must add the price group to an existing customer by using the Admin>>Customers>>Edit The bad thing about this contrib at this time, is that you have to have at least one customer at each price level for the price level to even exist. So if you want 10 different price levels, you must have 10 different customers, each at one price level. The way I do it, is name one customer "Retail", one "Wholesale", one "VIP", etc. etc. and give them the same price level as their name. So if you want 10, you could name them, One with price level 1, Two with price level 2, and so on. In other words, if you want to create a new price level, you either have to assign it to an existing customer, which will create the new price level, or you have to create an entirely new customer and assign them the new price level. Make sense? Hope this helps Edited December 12, 2004 by Sethman Quote
Babysweet Posted December 12, 2004 Posted December 12, 2004 ah... I see. You must add the price group to an existing customer by using the Admin>>Customers>>Edit The bad thing about this contrib at this time, is that you have to have at least one customer at each price level for the price level to even exist. So if you want 10 different price levels, you must have 10 different customers, each at one price level. The way I do it, is name one customer "Retail", one "Wholesale", one "VIP", etc. etc. and give them the same price level as their name. So if you want 10, you could name them, One with price level 1, Two with price level 2, and so on. In other words, if you want to create a new price level, you either have to assign it to an existing customer, which will create the new price level, or you have to create an entirely new customer and assign them the new price level. Make sense? Hope this helps <{POST_SNAPBACK}> Ah Ha, I will do it, Thanks for explaining it. Quote Sincerely, Joseph Seabert
mat123slade Posted December 13, 2004 Posted December 13, 2004 Hi, I'm using the seperate price per customer contribution, and I would like the customer_group_name to appear next to the customer name in the admin/orders.php so when I view my orders, I can see if it is an order made by public, distributor or other. I understand a little php but I haven't been able to get it to work. Does anybody have the solution to the problem? Thanx in advance. I'm adding the column name here (for people interested) : <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" width='30'><?php echo 'ID #'; ?></td> <td class="dataTableHeadingContent">Group</td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> I haven't bothered with language, Group will do fine (ID # is so I can show the ID number of the order). And for the content : <td class="<?php echo $current_row; ?>"><?php echo '<font face=verdana size=1>' . $orders['orders_id']; ?></font></td> <td class="<?php echo $current_row; ?>"><?php echo '' . $customers['customers_group_id']; ?></font></td> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $orders['customers_name']; ?></td> <td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_total']); ?></td> <td class="dataTableContent" align="center"><?php echo tep_datetime_short($orders['date_purchased']); ?></td> <td class="dataTableContent" align="right"><?php echo $orders['orders_status_name']; ?></td> <td class="dataTableContent" align="right"><?php if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> So the bit of code that I have got wrong is <?php echo '' . $customers['customers_group_id']; ?> Anyone know what I should put here ? Thanx a lot. Quote
Sethman Posted December 14, 2004 Posted December 14, 2004 when you are typing <?php echo '' . $customers['customers_group_id']; ?> you are calling the group_id from the TABLE_ORDERS, which does not contain a group_id. You need to call it from the TABLE_CUSTOMERS. How to do that... I do not know. But at least I can point you in the right direction... :thumbsup: 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.