Jump to content

Recommended Posts

This is now a repost. I NEED some/any input! Client is waiting and Prestashop is screwing around -


 


When updating an order status, I'm getting the following error:


 


"Fatal error: Call to undefined method ShopUrl::cacheMainDomainForShop() in /public_html/classes/order/OrderHistory.php on line 91"


 


This is a fairly fresh installation of Prestashop 1.5.6 with a single theme, no outside modules have been used or installed.


 


Any ideas what's causing it and a plausible approach to fixing it which doesn't involve wiping everything and starting fresh? For example, what is the location and purpose of the function being called? What consequences would it have if the lines was removed?


Link to comment
Share on other sites

How did you install presta? Open that class (shopUrl) and look for this


	public static function cacheMainDomainForShop($id_shop)
	{
		if (!isset(self::$main_domain_ssl[(int)$id_shop]) || !isset(self::$main_domain[(int)$id_shop]))
		{
			$row = Db::getInstance()->getRow('
			SELECT domain, domain_ssl
			FROM '._DB_PREFIX_.'shop_url
			WHERE main = 1
			AND id_shop = '.($id_shop !== null ? (int)$id_shop : Context::getContext()->shop->id));
			self::$main_domain[(int)$id_shop] = $row['domain'];
			self::$main_domain_ssl[(int)$id_shop] = $row['domain_ssl'];
		}
	}

If not present, add it

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