Jump to content
Sign in to follow this  
lisk

Quantity Price Breaks - can ANYONE fix this?

Recommended Posts

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

Share this post


Link to post
Share on other sites

Look in your includes/classes directory and make sure you have a file named priceformatter.php.

 

Jack

Share this post


Link to post
Share on other sites
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;

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites
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:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×