Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

QPBPP_V1_3_5 Installation pb


stecale

Recommended Posts

I have installed this version and I have an execution problem which returns the following error :

 

Fatal error: Call to a member function on a non-object in /home/.../catalog/includes/classes/shopping_cart.php on line 266

 

The lines are following :

 

264 // BOF qpbpp

265 $pf->loadProduct($products_id, $languages_id);

266 if ($product = $pfs->getPriceFormatterData($products_id)) {

267 $prid = $product['products_id'];

268 $products_tax = tep_get_tax_rate($product['products_tax_class_id']);

269 $products_price = $pf->computePrice($qty, $nof_other_items_in_cart_same_cat);

270 // EOF qpbpp

271 $products_weight = $product['products_weight'];

 

I have no idea about how correcting this problem. May be, I have missed something during the source code modication.

Thanks for your help

Link to comment
Share on other sites

265	   $pf->loadProduct($products_id, $languages_id);
266		if ($product = $pfs->getPriceFormatterData($products_id)) {
269		  $products_price = $pf->computePrice($qty, $nof_other_items_in_cart_same_cat);

I haven't used this contribution recently, but in line 266, I see $pfs and on lines 265 and 269, I see $pf. Since the error is on 266, I would guess that $pf is correct and $pfs is a typo.

Always back up before making changes.

Link to comment
Share on other sites

I haven't used this contribution recently, but in line 266, I see $pfs and on lines 265 and 269, I see $pf. Since the error is on 266, I would guess that $pf is correct and $pfs is a typo.

 

Thanks for your answer but it's not due to this problem. I have checked it however.

Link to comment
Share on other sites

Thanks for your answer but it's not due to this problem. I have checked it however.

Does your includes/application_top.php around line 260 look like this:

// include currencies class and create an instance
 require(DIR_WS_CLASSES . 'currencies.php');
 $currencies = new currencies();

// BOF qpbpp
 // include the price formatter classes for the price breaks contribution
 require(DIR_WS_CLASSES . 'PriceFormatter.php');
 $pf = new PriceFormatter;
 require(DIR_WS_CLASSES . 'PriceFormatterStore.php');
 $pfs = new PriceFormatterStore;
// EOF qpbpp

Link to comment
Share on other sites

I have installed this version and I have an execution problem which returns the following error :

 

Fatal error: Call to a member function on a non-object in /home/.../catalog/includes/classes/shopping_cart.php on line 266

 

The line is following :

266 if ($product = $pfs->getPriceFormatterData($products_id)) {

 

Hello,

 

check

the $pfs variable must be declared global:

	function calculate() {
  global $languages_id, $pfs, $currencies;

 

 

Stanislav

Link to comment
Share on other sites

Hello,

 

If you have used the Autoinstaller script and you are still able to click the Uninstall button.

Try the latest version which has Improved regular expression pattern for the catalog/includes/classes/shopping_cart.php file.

 

 

Stanislav

Edited by Pektsekye
Link to comment
Share on other sites

Hello,

 

If you have used the Autoinstaller script and you are still able to click the Uninstall button.

Try the latest version which has Improved regular expression pattern for the catalog/includes/classes/shopping_cart.php file.

 

 

Stanislav

 

Thanks to all of you. The problem was due to the global declaration which was missing in the calculate function.

In fact, it seems that the "global $currencies" declaration is missing in the standard version of the includes/classes/shopping_cart.php file.

 

Thanks again

Link to comment
Share on other sites

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...