Jump to content


Walter

Member Since 11 May 2017
Offline Last Active Oct 13 2020 07:09 AM
-----

Posts I've Made

In Topic: Product Inventory Update

12 October 2020 - 05:19 AM

Hi Jack, thanks for the response.

I noticed a wrong syntax in the trigger above.

For a proper inventory deduction following trigger works perfectly. (this is very raw and straight forward as it does not have any conditional checks whatsoever, like it does not check anything e.g. if the invoice/quote is paid etc.)

 

CREATE TRIGGER `Stock Update`
AFTER INSERT ON `x2_quotes_products`
FOR EACH ROW
BEGIN
UPDATE x2_products
SET inventory=(inventory-NEW.quantity)
WHERE id=NEW.productID;
END

In Topic: Update to x2 version 8.0

07 April 2020 - 05:18 PM

Thanks a lot alt_f4 - upgraded successfully 


In Topic: Update to x2 version 8.0

26 March 2020 - 01:59 PM

Hi,

Upgrade gives a following error:

 

Exception: "CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away" in /x2system/framework/db/CDbCommand.php L543

 

I've tried to increase max_allowed_packet to 1GB and timeout settings to maximum possible. Error still persists. What else can be done here?

 

Thanks a lot in advance!