#1067 - invalid default value for created_at or updated_at in table sales_flat_order_item
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';
Related cards:
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....
Default All Product Custom Options to Store 0
If the custom options of a product are the same across stores, but somehow there are not defaulted to store 0, the method below will default all custom options to store 0:
admin > product page > Custom Options > Change to other store > F12 to bri...
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...
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...
Order Currency & Rate
base_currency_code
Base currency is used for all online payment transactions. Scope is defined by the catalog price scope ("Catalog" > "Price" > "Catalog Price Scope").
global_currency_code
The default currency configured in the admin, De...
DB Table Upgrade Script
Add Foreign Key
/** @var Mage_Core_Model_Resource_Setup $installer */
$installer = $this;
$installer->startSetup();
/** @var Varien_Db_Adapter_Pdo_Mysql $connection */
$connection = $installer->getConnection();
$table = $installer->getT...
Add dynamic block contents in category page
In backend > Catalog > Manage Categories, we can configure a category page and put it on the main menu. The page contents are rendered in
app\design\frontend\base\default\template\catalog\category\view.phtml
If we want to render an HTML tab...
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...
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_...