0

Here i want to add modal popup form when ADD AMOUNT button was clicked.And join with another database how i can do it ..Please prefer me code to add popup form and to save the form with join table ...Here my database...

to add modal form and grid`

class UpgradeSchema implements UpgradeSchemaInterface { public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context) { $installer = $setup->startSetup();

    if (version_compare($context->getVersion(), '0.0.2') < 0) {
        $this->createTableWithForeignKeys($installer);
    }
}

protected function createTableWithForeignKeys(SchemaSetupInterface $installer)
{
    $table = $installer->getConnection()
        ->newTable('sharesoft_donations_amount')
        ->addColumn(
            'amount_id',
            Table::TYPE_INTEGER,
            null,
            ['identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true],
            'Backorder Unique entity ID'
        )
        ->addColumn(
            'amount',
            Table::TYPE_FLOAT,
            null,
            ['nullable' => true],
            'Amount'
        )
        ->addColumn(
            'donations_id',
            Table::TYPE_INTEGER,
            null,
            ['unsigned'=>true, 'nullable'=>false, 'default' => '0'],
            'Donations Id'
        )
        ->addIndex(
            $installer->getIdxName(
                'sharesoft_donations_amount',
                ['donations_id'],
                AdapterInterface::INDEX_TYPE_UNIQUE
            ),
            ['donations_id'],
            AdapterInterface::INDEX_TYPE_UNIQUE
        )
        ->addForeignKey( 
            $installer->getFkName(
                'sharesoft_donations_amount', 
                'donations_id', 
                'sharesoft_donations', 
                'id' 
            ),
            'donations_id', 
            $installer->getTable('sharesoft_donations'),
            'id', 
            Table::ACTION_CASCADE
        )

        ->setComment('Amount informations');

    $installer->getConnection()->createTable($table);
}

}

`

0

Not sure would this help - https://devdocs.magento.com/guides/v2.3/ui_comp_guide/components/ui-modal.html Take a look at this and let me know

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.