I’m trying to put qty to 0 if qty < 0, but it's not working for me i all time have qty on minus my code don’t working for me public function salesOrderSaveAfter($event) { $order = $event->getOrder(); $orderIncrementId = $order->getIncrementId(); foreach ($order->getAllVisibleItems() as $item) { $oldQty = (int)$item->getProduct()->getStockItem()->getQty(); $qtyOrdered = […]
Blog
I have 6 years of data, temperature recorded in 15 min increments. I’d like to find the max, min, avg by month (so max temp from all januarys, max from all feb. etc.) When I plot the pivot table I get “0” in the value field. I plot Month_2 as […]
I have a bunch of .sql files and in quite a few of them we use package I wrote called ‘carlmann_demo’. Whatever file uses such package will do as follows: -- This line will be present in every file that uses carlmann_demo exec carlmann_demo.testProlog; -- Uses of carlmann_demo other than […]
I’m trying to create conditional formatting based on the following spreadsheet: My intention is that if Space is not empty and Note is, the cell will glow red with anger. I’m using the following formula for the conditional formatting: =and(if(isblank(D2),"FALSE","TRUE"),if(isblank(E2),"TRUE","FALSE")) Looks great, but that only works for cell E2. How […]
I have my video and audio connected through an HDMI cable to my screen. I have GF108 selected as the default audio output device and all audio goes there except Firefox. Firefox instead insists on sending audio to the onboard audio hardware. This happened a couple of days ago when […]
When my GPU is in the primary PCI slot, I sometimes get loads of garbled sound when I run the audio through the HDMI. The GPU also performs far worse on benchmarks. In the primary slot I get 30fps on Novabench, in the secondary slot I get 90fps. Is this […]
This article was created in partnership with Print Peppermint. Thank you for supporting the partners who make SitePoint possible. Everyone has a business card—is yours any different? Designing the ideal card for your business is a project that deserves real time and thought. For a fresh approach, consider Print Peppermint. […]
Almost all web applications require server-based data storage, and MySQL continues to be the most-used database solution. This article discusses various options for using MySQL on your local system during development. MySQL is a free, open-source relational database. MariaDB is a fork of the database created in 2010 following concerns […]