Child pages
  • [in-commerce] SQL error, when attempting to buy Service product [5.2.2-B1]
Skip to end of metadata
Go to start of metadata

In In-Commerce it is possible to create several types of products:

  • tangible - require to be shipped
  • service - no shipping, good for service-like actions, like supporting stuff
  • downloadable - when order is confirmed user can download file, associated with that product
  • subscription - when order is confirmed user is subscribed to a user group associated with that product

Each product also have associated price, which is stored in the "ProductPricings" table.

When creating new service type product, then:

  • record in "ProductPricings" table isn't created
  • administrator entered price is ignored
  • attempt to buy such product from Front-End will result in this SQL error:

 

SELECT pp.PriceId
FROM inp_ProductsPricing AS pp
LEFT JOIN inp_Products AS p ON p.ProductId = pp.ProductId
WHERE (pp.ProductId = 2) AND (pp.PriceId = )
LIMIT 0,1

 

Stack Trace:

Function: kDBConnection->GetOne in order_calculator.php on line 473
Function: OrderCalculator->getPriceBracketByQty in order_calculator.php on line 397
Function: OrderCalculator->getPlainProductPrice in order_calculator.php on line 257
Function: OrderCalculator->addProduct in order_manager.php on line 434
Function: OrderManager->addProduct in orders_event_handler.php on line 3152
Function: OrdersEventHandler->AddItemToOrder in orders_event_handler.php on line 996
Function: OrdersEventHandler->OnAddToCart in event_handler.php on line 114
Function: kEventHandler->processEvent in event_manager.php on line 262
Function: kEventManager->HandleEvent in application.php on line 2098
Function: kApplication->HandleEvent in request_manager.php on line 160
Function: kRequestManager->runEvent in request_manager.php on line 48
Function: kRequestManager->process in event_manager.php on line 470
Function: kEventManager->ProcessRequest in application.php on line 1051
Function: kApplication->Run in index.php on line 22

Solution

Related Tasks