Jump to content

Fatal error: Class 'WebserviceRequest' not found in


Richard le Blanc

Recommended Posts

Hi,

when loading my webshop page www.bengelenspetter.nl i get the HTTP 500 Internal server Error.

This page is under construction but worked fine, now i only can enter the backend. When i enter the "products" page i also get the same error.

I altered the define('_PS_MODE_DEV_', true);  and now my page shows me the next error:

Homepage:

Fatal error: Class 'WebserviceRequest' not found in /home/bengel1q/public_html/classes/Product.php on line 599

When i open the Product.php file and look at the line 599:

self::$_taxCalculationMethod = Group::getPriceDisplayMethod(Group::getCurrent()->id);

i don't know what to do next. This line is part of this script:

    public static function initPricesComputation($id_customer = null)
    {
        if ($id_customer) {
            $customer = new Customer((int)$id_customer);
            if (!Validate::isLoadedObject($customer)) {
                die(Tools::displayError());
            }
            self::$_taxCalculationMethod = Group::getPriceDisplayMethod((int)$customer->id_default_group);
            $cur_cart = Context::getContext()->cart;
            $id_address = 0;
            if (Validate::isLoadedObject($cur_cart)) {
                $id_address = (int)$cur_cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')};
            }
            $address_infos = Address::getCountryAndState($id_address);

            if (self::$_taxCalculationMethod != PS_TAX_EXC
                && !empty($address_infos['vat_number'])
                && $address_infos['id_country'] != Configuration::get('VATNUMBER_COUNTRY')
                && Configuration::get('VATNUMBER_MANAGEMENT')) {
                self::$_taxCalculationMethod = PS_TAX_EXC;
            }
        } else {
            self::$_taxCalculationMethod = Group::getPriceDisplayMethod(Group::getCurrent()->id);
        }
    }

When i turn off the 599 line with the // i get an new error.

When i want to enter the products page at the backend i get this error:

Fatal error: Class 'WebserviceRequest' not found in /home/bengel1q/public_html/classes/Product.php on line 2975

This line contains the next text:

 if (isset(self::$_prices[$cache_id])) 

Its part of the next script:

        }

        $cache_id = (int)$id_product.'-'.(int)$id_shop.'-'.(int)$id_currency.'-'.(int)$id_country.'-'.$id_state.'-'.$zipcode.'-'.(int)$id_group.
            '-'.(int)$quantity.'-'.(int)$id_product_attribute.
            '-'.(int)$with_ecotax.'-'.(int)$id_customer.'-'.(int)$use_group_reduction.'-'.(int)$id_cart.'-'.(int)$real_quantity.
            '-'.($only_reduc?'1':'0').'-'.($use_reduc?'1':'0').'-'.($use_tax?'1':'0').'-'.(int)$decimals;

        // reference parameter is filled before any returns
        $specific_price = SpecificPrice::getSpecificPrice(
            (int)$id_product,
            $id_shop,
            $id_currency,
            $id_country,
            $id_group,
            $quantity,
            $id_product_attribute,
            $id_customer,
            $id_cart,
            $real_quantity
        );

        if (isset(self::$_prices[$cache_id])) {
            /* Affect reference before returning cache */
            if (isset($specific_price['price']) && $specific_price['price'] > 0) {
                $specific_price['price'] = self::$_prices[$cache_id];
            }
            return self::$_prices[$cache_id];
        }

Is there someone who can give me some directions to solve thsi problem so i can launchmy webshop?

 

Thanks

Link to comment
Share on other sites

  • 2 years later...

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
×
×
  • Create New...