Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

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

Posted
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;

Posted

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!

Posted
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:

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...