carmet Posted March 19, 2009 Share Posted March 19, 2009 Hi Jan. Thanks for your advice. It is because there isn't any table of 'products_groups' in my database. So, I think that maybe I need install the 4.2.1 first. Finally, thanks for your advice. From the instruction, there is one instruction which show: 'UPDATE `configuration_group` SET sort_order = last_insert_id() WHERE `configuration_group_id` = last_insert_id();'. After I insert it to database, it shows 'error message' as below: ________________________________________________________ Error SQL query: SET sort_order = last_insert_id( ) WHERE `configuration_group_id` = last_insert_id( ) MySQL said: #1193 - Unknown system variable 'sort_order' _________________________________________________________ Sorry about that I am the new user of oscommerce and didn't know any database knownledge, actually, how to 'UPDATE `configuration_group` into the database?? Can you give me advice on it? Thanks for your attention. Carmet Hi Jan, Sorry, I know how to add it now. Thank you Carmet Quote Link to comment Share on other sites More sharing options...
carmet Posted March 19, 2009 Share Posted March 19, 2009 Hi Jan, You told me that if I want to use the SPPC, I should use the update one of SPPC 4.2.2 only, no need install 4.2.1 to upgrade 4.2.2 because of big work load. However, I checked that if I only install the SPPC 4.2.2, it is not the full package for new user. It was because I found out that some instructions of SPPC4.2.2 must add after the instruction of SPPC4.2.1. such as below: ____________________________________________ in catalog/admin/includes/functions/general.php Line 923-925 (this is in function tep_remove_product) **AFTER** // BOF Separate Pricing Per Customer tep_db_query("delete from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$product_id . "'"); // EOF Separate Pricing Per Customer **ADD** // BOF QPBPP for SPPC tep_db_query("delete from " . TABLE_PRODUCTS_PRICE_BREAK . " where products_id = '" . (int)$product_id . "'"); tep_db_query("delete from " . TABLE_PRODUCTS_TO_DISCOUNT_CATEGORIES . " where products_id = '" . (int)$product_id . "'"); // EOF QPBPP for SPPC ______________________________________________ And in my osc, there isn't any ''// BOF Separate Pricing Per Customer....'', how do I add the new installation?? Therefore, should I install the 4.2.1 first and then upgrade to 4.2.2?? Please kindly advice. Carmet Quote Link to comment Share on other sites More sharing options...
franng Posted March 23, 2009 Share Posted March 23, 2009 Hi All, I want to know is there have anyone reformat the price table html output? I want a vertical price table but my coding is very limited. Did anyone have made the changes before and can email me the code? Thanks a lot!!! my email: fran.nwk@gmail.com B.Regards Fran Ng Quote Link to comment Share on other sites More sharing options...
PropioWeb Posted March 23, 2009 Share Posted March 23, 2009 (edited) Hey Guys, Quik question. I want to be able to print or echo the price breaks for each product on the shopping cart page. I'll explain. Product Name Widget #1 (Save more when you Buy: 4 = $15.95 | Buy: 10 = $12.95) $19.95 How do I go about defining that so I can add it to the shopping cart? Any ideas or help in the right direction would be greatly appreciated. Thanks Edited March 23, 2009 by PropioWeb Quote Samuel Mateo, Jr. osC 2.2 MS2 Installed Mods: WYSIWYG HTMLArea 1.7 | Basic Template System 1.0 | osC-Affiliate | OSC-SupportTicket Featured Products 1.3 | LoginBox 5.2 | LatestNews 1.1.3 | Extras for IE Link to comment Share on other sites More sharing options...
boetje Posted March 24, 2009 Share Posted March 24, 2009 Dear Jan, Thx for a great contrib. It works really well. I do have an issue with another contrib I installed: Attribute Qty Product Info. The thing is that when a product has attributes they are all shown with a seperate quantity box next to the attribute. When Clicking on the add to cart. All available attrib's are put into the cart. I would love for the quantity box above the add to cart button to disappear when attributes are present. Would that be possible? Could you please help me out on how to change this? Thank you for a quick answer. Wkr, Boetje Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 26, 2009 Share Posted March 26, 2009 Quik question. I want to be able to print or echo the price breaks for each product on the shopping cart page. I'll explain. Product Name Widget #1 (Save more when you Buy: 4 = $15.95 | Buy: 10 = $12.95) $19.95 How do I go about defining that so I can add it to the shopping cart? Any ideas or help in the right direction would be greatly appreciated. I would try to use the PriceFormatter.php when in the for ($i=0, $n=sizeof($products); $i<$n; $i++) { loop with $pf->loadProduct((int)$products[$i]['id'], (int)$languages_id); (similar to what is used on product_info.php). And write a function in PriceFormatter.php that builds and then returns the (Save more when you Buy: 4 = $15.95 | Buy: 10 = $12.95) when there are price breaks. Let's say we call that function getSaveMoreWhenYouBuy. Then after the $pf->etc. you call that function e.g. with $save_more_when_you_buy = $pf->getSaveMoreWhenYouBuy(); Then all you have to do is echo $save_more_when_you_buy on the appropriate spot. Quote Link to comment Share on other sites More sharing options...
Nexius Posted March 30, 2009 Share Posted March 30, 2009 Hi, I have one strange glitch with this very useful plugin. Say that I have two different products in my store which cost $10, or $8 if 10+ are ordered. Then, a customer orders 10 of ITEM01 (which charges $80) but only 1 of ITEM02; still ITEM02 is discounted as if 10+ are ordered even though that is not the case. Any easy cure for this? Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 30, 2009 Share Posted March 30, 2009 Hi, I have one strange glitch with this very useful plugin. Say that I have two different products in my store which cost $10, or $8 if 10+ are ordered. Then, a customer orders 10 of ITEM01 (which charges $80) but only 1 of ITEM02; still ITEM02 is discounted as if 10+ are ordered even though that is not the case. Any easy cure for this? That should only happen when both ITEM02 and ITEM01 are in the same discount category. If not, it shouldn't happen. Quote Link to comment Share on other sites More sharing options...
rfscholl Posted March 31, 2009 Share Posted March 31, 2009 I have a slightly different application and I am wondering if this controb can do it. I want to have it so that if a customer orders 1 of an item it is $100, then it is $50 for each additional. Can this do it or is anyone aware of a modification to do this? Thanks! Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted April 1, 2009 Share Posted April 1, 2009 I have a slightly different application and I am wondering if this controb can do it. I want to have it so that if a customer orders 1 of an item it is $100, then it is $50 for each additional. osC and this contribution are written in such a way that you work with a price per item. You can rewrite the PriceFormatter class to calculate in this way but you would still need to work with a price per item. Since osC uses the price per item, then calculates tax and rounds down to two decimals (the most common situation for most currencies like dollars, euros, pounds) you get rounding errors. So those functions have to be changed also to first do the calculation of base price times number of items and then calculate tax. Quote Link to comment Share on other sites More sharing options...
Boxman90 Posted April 1, 2009 Share Posted April 1, 2009 (edited) Anybody here for a quick fix? I checked all the files if they were correctly placed (but i'm a php noob so I just made the adjustments as stated in the tut) and it's telling me this when i watch the categories on the admin panel (im using the dutch language): 1146 - Table 'arnout.products_to_discount_categories' doesn't exist select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_qty_blocks, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, ptdc.discount_categories_id, dc.discount_categories_name from products p left join products_to_discount_categories ptdc on p.products_id = ptdc.products_id left join discount_categories dc using(discount_categories_id), products_description pd, products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '4' and p.products_id = p2c.products_id and p2c.categories_id = '0' order by pd.products_name [TEP STOP] What did I do wrong? (cause obviously it's my fault :P) Edit// something with price_break.sql I read from another thread. How do I apply this? Again, I'm a total noob :P Edited April 1, 2009 by Boxman90 Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted April 2, 2009 Share Posted April 2, 2009 Edit// something with price_break.sql I read from another thread. How do I apply this? You would need access to something like phpMyAdmin. There are two ways basically to apply a .sql file. Either copy and paste the "code" in a text box (don't recall how it is called on the tabs, I don't use it very often) or upload the sql file (again don't know where that is located but it must have been posted dozens of times somewhere on this forum). Strange thing is that the error statement does not mention the field products_qty_blocks not being there. This QPBPP field is also introduced with the sql file. So it looks like some of the sql commands were executed but not all? Quote Link to comment Share on other sites More sharing options...
dan.m Posted April 5, 2009 Share Posted April 5, 2009 I just installed QPBPP yesterday, 04/04/09. I am able to enter a products price breaks, see the results in a preview, able to save the record, and then go back to the record to see the information, on the admin side. But, when I login to the store, as a user, and try to view the product I get this error: ============================================================================== 1146 - Table 'dpmatis_osc1.TABLE_PRODUCTS_TO_DISCOUNT_CATEGORIES' doesn't exist select pd.products_name, p.products_model, p.products_image, p.products_id, p.manufacturers_id, p.products_price, p.products_weight, p.products_quantity, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, ptdc.discount_categories_id from products p left join specials s on p.products_id = s.products_id left join TABLE_PRODUCTS_TO_DISCOUNT_CATEGORIES ptdc on p.products_id = ptdc.products_id, products_description pd where p.products_status = '1' and pd.products_id = p.products_id and p.products_id = '36' and pd.language_id = '1' [TEP STOP] ============================================================================== This error occurs for every product. When I go into phpMyAdmin ... the table does exist but there are no records. I used phpMyAdmin to modify the MySQL structure by pasting price_break.sql into the SQL tab. Everything seemed to run fine there. HELP! I would like to fix this error and be able to shop but would also like to understand what is causing this error and what role the PRODUCTS_TO DISCOUNT_CATEGORIES plays in the osC system. Thanks ... Dan M Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted April 5, 2009 Share Posted April 5, 2009 ==============================================================================1146 - Table 'dpmatis_osc1.TABLE_PRODUCTS_TO_DISCOUNT_CATEGORIES' doesn't exist That means that you didn't add the define for TABLE_PRODUCTS_TO_DISCOUNT_CATEGORIES to includes/database_tables.php (might be both on the catalog side and the admin side). Quote Link to comment Share on other sites More sharing options...
dan.m Posted April 5, 2009 Share Posted April 5, 2009 That means that you didn't add the define for TABLE_PRODUCTS_TO_DISCOUNT_CATEGORIES to includes/database_tables.php (might be both on the catalog side and the admin side). That was it !! You certainly know your product! Thank You ... Dan Quote Link to comment Share on other sites More sharing options...
dan.m Posted April 6, 2009 Share Posted April 6, 2009 How do I format the pricing table? Can someone tell me where the table is being formatted with the quantities and pricing for each quantity ? ==================================================== Currently the table displays price breaks from Left to Right. I would like to display pricing from Top to bottom. I see in product_info.php that here is a line of code that says ... $product_price = $pf->getPricingString(); When I comment out that line the entire pricing table disappears ... OK So I thought the getPricingString was a class ... but I cannot locate it anywhere. I see in classes there are 2 files that sound related ... PriceFormatter.php & PriceFormatterStore.php but I cannot see where the table is being formatted there either?? Hope someone can point me in the right direction. Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted April 6, 2009 Share Posted April 6, 2009 How do I format the pricing table? Can someone tell me where the table is being formatted with the quantities and pricing for each quantity ? ==================================================== Currently the table displays price breaks from Left to Right. I would like to display pricing from Top to bottom. I see in product_info.php that here is a line of code that says ... $product_price = $pf->getPricingString(); When I comment out that line the entire pricing table disappears ... OK So I thought the getPricingString was a class ... but I cannot locate it anywhere. I see in classes there are 2 files that sound related ... PriceFormatter.php & PriceFormatterStore.php but I cannot see where the table is being formatted there either?? Hope someone can point me in the right direction. getPriceString is a function in the class PriceFormatter.php. Actually the old (now commented out) function showed the price breaks vertically. Just comment out the new function and uncomment the old function (lower). Quote Link to comment Share on other sites More sharing options...
dan.m Posted April 8, 2009 Share Posted April 8, 2009 How do I get the correct price from the QPBPP table when the user enters a quantity in the cart? Example ... 1 - 100.00 2 - 90 3 - 80 currently if I enter 3 in the cart the total calcualtes to 100.00 ( for 1pc price) No matter what quantity you put in the cart the total us calculated from the unit price for 1pc pricing (NET / GROSS PRICE) If sonmeone can point me in the right direction .... Thanks Dan Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted April 8, 2009 Share Posted April 8, 2009 How do I get the correct price from the QPBPP table when the user enters a quantity in the cart? Example ... 1 - 100.00 2 - 90 3 - 80 currently if I enter 3 in the cart the total calcualtes to 100.00 ( for 1pc price) No matter what quantity you put in the cart the total us calculated from the unit price for 1pc pricing (NET / GROSS PRICE) I would expect a problem with adding this contribution to your shop. Either an error adding it or you already have a contribution in there that nullifies what you are doing here or something along those lines. Quote Link to comment Share on other sites More sharing options...
dan.m Posted April 9, 2009 Share Posted April 9, 2009 This is the 1st and only contribution I have added to osC. Do you know where I would look or what file I to look in to see if I missed and addition/change? Quote Link to comment Share on other sites More sharing options...
lindsayanng Posted April 9, 2009 Share Posted April 9, 2009 the only way you would know if you messed something up would be if you got an error, or if the contribution plain does not work. Quote A great place for newbies to start Road Map to oscommerce File Structure DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways! HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you Proud Memeber of the CODE BREAKERS CLUB!! Link to comment Share on other sites More sharing options...
Guest Posted April 9, 2009 Share Posted April 9, 2009 I have version osCommerce 2.2-MS2 and the everything seems to work except /includes/classes/ shopping_cart.php which just thows an error whether I add the code by hand or with the supplied file. I get stuff like Fatal error: Call to undefined function: calculate_price. The original file does not look like it has the same code as the supplied.... help? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 9, 2009 Share Posted April 9, 2009 Quote Link to comment Share on other sites More sharing options...
Guest Posted April 9, 2009 Share Posted April 9, 2009 Then when I use the supplied code I get this message in the store: Fatal error: Call to undefined function: calculate_price() in /includes/classes/shopping_cart.php on line 310 Quote Link to comment Share on other sites More sharing options...
Guest Posted April 9, 2009 Share Posted April 9, 2009 Okay...I think the prob is me running PHP Version 4.4.4. Can anyone give me a shopping_cart.php file that works with PHP 4? I can't upgrade at this time as I have too many other sites to upgrade at this time if I did.... 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.