Jump to content

Edit History

Carlos Ucha

Carlos Ucha

Hi developers!

I was able to create orders programmatically on a custom module until 1.7.7.0 update. Now this exception is thrown:
Shop context types other than "single shop" are not supported

I tried adding this code lines without success

$shop = new Shop(1); $employee = new Employee(1); 

$this->context->employee = $employee; 

$this->context->shop = $shop; 

Shop::setContext(Shop::CONTEXT_SHOP, $shop->id);

Additional information

PrestaShop version: 1.7.7.0

PHP version: 7.2.25

Any help would be very appreciated! 

Carlos Ucha

Carlos Ucha

Hi developers!

I was able to create orders programmatically on a custom module until 1.7.7.0 update. Now this exception is thrown:
Shop context types other than "single shop" are not supported

I tried adding this code lines without success

$shop = new Shop(1); $employee = new Employee(1); 

$this->context->employee = $employee; 

$this->context->shop = $shop; 

Shop::setContext(Shop::CONTEXT_SHOP, $shop->id);

Additional information

PrestaShop version: 1.7.7.0

PHP version: 7.2.25

Any help would be very appreciated! 

×
×
  • Create New...