#1067 - invalid default value for created_at or updated_at in table sales_flat_order_item
Posted Over 2 years ago. Visible to the public.
Alter the columns:
SET sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
ALTER TABLE `sales_flat_order_item` CHANGE `created_at` `created_at` TIMESTAMP NULL DEFAULT NULL COMMENT 'Created At';
ALTER TABLE `sales_flat_order_item` CHANGE `updated_at` `updated_at` TIMESTAMP NULL DEFAULT NULL COMMENT 'Updated At';
Last edit
Over 2 years ago
kiatng
Related cards:
validation.js
/*
* Really easy field validation with Prototype
* http://tetlaw.id.au/view/javascript/really-easy-field-validation
* Andrew Tetlaw
* Version 1.5.4.1 (2007-01-05)
*
* Copyright (c) 2007 Andrew Tetlaw
* Permission is hereby granted, free of c...
JOINS in Zend_Db_Select
OM uses Zend Version 1.12.16.
Adding Another Table to the Query with JOIN
Many useful queries involve using a JOIN to combine rows from multiple tables. You can a...
nginx config
See production grade nginx and docker config here.
Some notes on this:
- the PCI work was trial and error, we did set up, the external audit did penetration/probe testing, we adjusted settings...
Add new input type in product custom options
custom module productcoption
config.xml
<config>
<modules>
<Somemod_ProductCoption>
<version>0.0.1</version>
</Somemod_ProductCoption>
</modules>
<global>
<resources>
<productcopti...
Warning: Invalid argument supplied for foreach() in lib/Zend/Locale/Format.php on line 853
PHP Version 7.4.7 OpenMage 1.9.4.5
if ($day !== false) {
$parse[$day] = 'd';
if (!empty($options['locale']) && ($options['locale'] !== 'root') &&
(!is_object($options['locale']) || ((string) $options['locale'] !== 'root')...
Grid Column Options
Column Types
Take a look at Mage_Adminhtml_Block_Widget_Grid_Column::_getRendererByType()
to dive into the different column types:
app\code\core\Mage\Adminhtml\Block\Widget\Grid\Column\Renderer\Abstract.php
- date
- datetime
- number
1....
Form Field
A sample of different options to add field in Mage_Adminhtml_Block_Widget_Form
Ref Varien_Data_Form_Element_Abstract
lib\Varien\Data\Form\Element\Abstract.php
Add Suffix to Element Names
$form = new Varien_Data_Form(['field_name_...
How to use cache in OpenMage / Magento 1.x to speed things up
Mechanism: cache in model
First, save the cache
// app\code\core\Mage\Core\Model\App.php Mage_Core_Model_App
/**
* Saving cache data
*
* @param mixed $data
* @param string $id
* @param array $tags
* @param null|false|int ...
Controller Action Response
json response
public function completeAction()
{
$orderId = $this->getRequest()->getParam('order_id', false);
$info['order_id'] = 0;
if ($orderId) {
$order = Mage::getModel('patron/order')->load($...
Filter EAV collection
condA AND (cond1 OR cond2 OR cond3)
$cincId = $session->getCustomerId();
$attributes = array(
array('attribute'=>'mc_by', 'eq'=>$clinicId),
array('attribute'=>'mc_lb_by', 'eq'=>$clinicId),
array('attribute'=>'mc...
Posted by kiatng to OpenMage (2021-09-08 07:57)