lisk Posted November 5, 2005 Posted November 5, 2005 I have uninstalled and reinstalled this contribution twice, and have posted on 40 different PHP support forums for help and nobody can seem to tell me what's going on. I am getting the error "Call to a member function on a non-object" in oscommerce/product_info.php on these lines: $pf->loadProduct((int)$HTTP_GET_VARS['products_id'], (int)$languages_id); $products_price=$pf->getPriceString(); I tried adding $pf = new PriceFormatter; before this code (it is done in the other files) but this just resulted in: Fatal error: Cannot instantiate non-existent class: priceformatter Can someone help me? I am completely new to PHP and this is so frustrating. :( Thanks in advance, Lis Quote
Jack_mcs Posted November 5, 2005 Posted November 5, 2005 Look in your includes/classes directory and make sure you have a file named priceformatter.php. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Jan Zonjee Posted November 5, 2005 Posted November 5, 2005 I am getting the error "Call to a member function on a non-object" in oscommerce/product_info.php on these lines: In addition to Jack's suggestion, you might want to check that you added this code to application_top.php (as per the instructions): // include the price formatter for the price breaks contribution require(DIR_WS_CLASSES . 'PriceFormatter.php'); $pf = new PriceFormatter; Quote
lisk Posted November 5, 2005 Author Posted November 5, 2005 WOOHOO! Thank you both! I had the priceformatter.php uploaded but the change to application_top seems to have gotten rid of the error. Do either of you know how I implment this contribution? Specials doesn't seem to have changed and I don't see anywhere in the admin section to do it. Thank you so much! Quote
Jan Zonjee Posted November 5, 2005 Posted November 5, 2005 Do either of you know how I implment this contribution? Specials doesn't seem to have changed and I don't see anywhere in the admin section to do it. You should (after having put the necessary code there of course) see a new table in the admin/categories.php page (where you normally change description and price of an article) where you can put in the new price break level and at which quantity they should be applied. Looks something like this: Quantity Blocks: (can only order in blocks of X quantity) Price break level 1: Qty: Price break level 2: Qty: Price break level 3: Qty: Price break level 4: Qty: Price break level 5: Qty: Price break level 6: Qty: Price break level 7: Qty: Price break level 8: Qty: 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.